View previous topic :: View next topic |
Author |
Message |
danielrendall n00b
Joined: 09 Apr 2003 Posts: 11 Location: Leamington Spa, England
|
Posted: Wed Apr 09, 2003 10:57 pm Post subject: Cross compiling for Sparc on Sparc64 |
|
|
Hello all. Any information on the following problem would be much appreciated!
Starting with the 1.1a ISO, I'm trying to install Gentoo on a Sun IPX. After some faffing, I've got as far as untarring the 1.4_rc3 stage 1 tarball, but then I can't chroot to it because the kernel (2.2.20 I think) is too old for the libraries etc. in the tarball.
However, I have got Gentoo working on an Ultra 10 which I own, starting with the same ISO (obviously using root-sparc64 rather than root-sparc). I figured I'd find out how to cross-compile a Sparc32 kernel on the Ultra 10, then netboot the IPX box.
I've seen some docs about crosscompiling using an x86 as the source machine compiling for a Sparc target, and they talk about building a new version of the binutils and glibc suitable for the sparc architecture. My question is - if I'm using a Sparc64 as the build machine, will the binutils and glibc I have already on the machine work to build the Sparc32 kernel (so I just set ARCH=sparc in my make command), or will I need to build sparc32-specific binutils and glibc first?
Obviously, I could try this and see, but since I'm a bit of a beginner I foresee potential for a lot of pain and anguish which could be avoided if someone could tell me from the outset whether this is likely to work or not |
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Thu Apr 10, 2003 1:01 am Post subject: |
|
|
It is a long time since I have been doing mucg crosscompiling work. It was back in the good-ol days when that was the only way to boostrap a new architecure.
It should be possible to do it the way you describe.
The first step would be to make a crosscompiler version of gcc for the correct architecture, then compile glibc and binutils.
I'm not sure, when it comes to Gentoo, what the next step would be. But at least you have some work to do now and maybe somebody else can fill in the blacks.
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
Kumba Developer
Joined: 16 Jul 2002 Posts: 393 Location: Sigma 957
|
Posted: Thu Apr 10, 2003 6:50 am Post subject: |
|
|
Actually, you shouldn't have a problem using a sparc compiler on a 64-bit sparc system. In reality, linux runs in 32-bit mode on an ultrasparc machine, only the kernel runs in 64bit, so all you have to do it make sure your ${CFLAGS} are set to sparc32 compatible (i.e. v8, supersparc, hypersparc), and just be careful how you compile, and you should wind up with a usable sparc32 compiler.
Best trick is to use the "ebuild" command to individually control portage's merging, so "ebuild foo clean fetch unpack compile install" will do everything except merging into the live system (install installs to an "image" directory). Then you just goto the image directory in portage's temp directory, and tar up the results, move to your sparc32 system, and untar, and you shouldn't have any problems.
I've been kicking an ss20 into shape by doing this. I also had to start from a stage 1.1a because of having a 2.2.x kernel and a glibc that expected 2.4.x. So far, it's proving to be quite a battle. Getting gentoo to install onto my MIPS box was easier.
--Kumba _________________ "The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic |
|
Back to top |
|
|
bent Tux's lil' helper
Joined: 26 Mar 2003 Posts: 75 Location: New Zealand
|
Posted: Thu Apr 10, 2003 7:31 am Post subject: |
|
|
Kumba wrote: |
I've been kicking an ss20 into shape by doing this. I also had to start from a stage 1.1a because of having a 2.2.x kernel and a glibc that expected 2.4.x. So far, it's proving to be quite a battle. Getting gentoo to install onto my MIPS box was easier.
|
Have to agree with you here. The only way I got my ss20 to 1.4 was by getting 1.1a up first, compiling 2.4.18 there, and using that system to chroot into 1.4. The only other Sparc Linux dist I have is Mandrake 7.1, quite old and it uses 2.2.20. There's a beta 1.4 sparc bootable CD out there somewhere, have you heard of / tried that?
Since I've already got Gentoo 1.4 going, I'm not in a big hurry to download it; I'll probably make my own rescue CD from the running system, but it might make installation on a Sparc heaps easier.
-benT |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|