Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to compile a Linux (exact version not too important, using the latest stable branch) binary for the sparc (OpenSparc) architecture. The thing is:
1. I don't have a decent cross compilier from AMD64 -> Sparc that can create the image on a given AMD64 computer (I've tried, the toolchain created an erroneous binary file).
2. The only Sparc-Machine in my disposal has Solaris installed on it.
So, when I try to compile linux on the Solaris machine I get several errors, all regarding either defines that don't exist (relocation defines for ARM and MIPS in elf.h header), or are linux specific (for example strsep/asprintf).
Although all the errors I've encountered so far are superficial problems that I can correct, I fear I'll encounter many more errors along the way, some of them harder-to-fix than those.
Did anyone already managed such a feat (compiling linux on a solaris machine)? if so, could he give me some tips on how he managed it?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
These are good guesses, unfortunately as far as I know, unless you have an UltraSPARC T CPU and then could experiment with Linux LDOMs ( http://www.sun.com/servers/coolthreads/ldoms/index.jsp ), there are no virtual machines on top of the SPARC CPU that would support a Linux installation. Virtual-Box is x86/x64 only.
Well, I need this linux in order to use it with Sun's SAM simulation for the OpenSparc T2 machine - and correct me if I'm wrong here, but that's a 64-bit machine, so 32-bit architecture isn't good enough for me.
Userland 32 bit binaries run on 64 bit but I'm confused by your reply.
If you want to build a Linux binary in order to run it on a SPARC simulator, that means you already have a Linux OS running on it, do you ?
Then why won't you compile that binary on that environment ?
Or are you trying to port the lx brand on Sparc ?
I'll try to make things clearer - SAM runs on an AMD64 with solaris installed on it (SAM wouldn't normally compile and run on a system running Linux OS).
The linux I want to compile is for usage as a guest OS in the simulation - but I don't have a running Linux OS at this point.
Thanks everybody - I managed to finish the changes in the linux code in order to allow it to compile without its gnu-specific functionality and linux-specific definition on a Sparc Architecture (regarding last reply, I stated I already have a Sparc machine in my disposal, only with solaris on it).
Hope it will go well...
If not, I'll install a distribution of linux on a different partition, and compile the code there.
Thanks,
Mintz Yuval
Last edited by mintzyuval; 06-04-2009 at 01:50 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.