I should be getting a Raspberry Pi soon, and being an avid fan of Gentoo, I wanted to install it on it. It looks like many people have had success with Gentoo on the RPi, and following the wiki looks straight forward enough. However I was hoping to create a smaller environment on the RPi using busybox and uclibc. As far as I can tell there are no stages for this available. Is there a way to set up this environment with Gentoo, or should I just try the normal armv6j stages or make my own setup outside of Gentoo.

Last edited by hcaulfield57 on Wed Sep 19, 2012 2:20 am; edited 1 time in total

There are lots of Gentoo learning opportunities without going down the busybox ulibc path.
You will want to use NFS or a USB HDD if you will build anything on the Pi. Cross compiling with distcc is very useful too.

Just now, my Pi is powered off a USB port on my HP Microserver, which provides all of its filesystems except /boot over NFS.
/boot must be on the SD card.

Once its up and running play with ulibc and busybox. I can tell you busybox works well as I build it static for a rescue shell._________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

I hadn't thought of NFS, might look into that. So how would I go about having a busybox/uclibc system though? Because the stage3 online is just a normal GNU system, unless I'm mistaken? Thank you for the input, it should be fun to see what I can do with this.

EDIT: Looked some more at NFS, looks pretty straight forward, I assume then you can just have /boot and an initramfs on the RPi for mounting the other partitions?

I don't use an initrd. There is no need, provided /usr and /var are on / (root)
I don't use ip=dhcp either, but I suppose I should.

As you say, the armv6j stage 3 is a normal stage3.

You will need crossdev set up, as per the wiki. What you put into its rootfs at the start is up to you. You can start with nothing excapt a cross tool chain.
That fails fairly early on as perl and python are very cross compile hostile.
Parts of the python build system are built and need to run on the host during the build ... thats two packages best build on the Pi with the help of distcc and your cross compiler._________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

Ah, I see about just starting from a crossdev toolchain. Question though, if you have everything but /boot on NFS, how does the kernel mount the root filesystem without initramfs? Or am I misunderstanding something. Thanks for the input, looking at distcc and crossdev, this should be fun, just trying to think of a purpose for it now. Was going to say hulu on my widescreen television, but unfortunately (or fortunately) no flash.

The kernel needs tp contain everything needed to mount root over nfs, the same as it does to mount root over usb or root on a local HDD, when you don't use an initrd.
I can give your a kernel command line that works on Raspberry Pi if you like but that might spoil your adventure, so I'll wait until you ask.

Before youu get your pi you can try crossdev with an empty root filesystem and see how far emerge -e @system gets you inside emerge-wrapper.
Turn on FEATURES=buildpkg in th cross environment so you save your arm packages and can use emerge -K on the Pi to install them there without a rebuild.
Don't get too carried away - expect s chroot into the arm environment to fail :)_________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

Thanks Yea, I did a little research last night, and didn't realize that you could tell the kernel the root was over NFS from the boot loader, I was under the impression that initramfs was necessary for that, but turns out it's not.

I actually started last night, with:

Code:

crossdev -v -t armv6j-hardfloat-linux-uclibc

but unfortunately that failed with the first build of gcc. I'm not sure if it's because a) computer I was compiling on is hardened or b) because of the change of gnueabi to uclibc. So, going to keep trying. I assume some people have got it work, so it's not impossible!

I'm going to try with just glibc now, I would like to use uclibc, but I'm not sure why it's not working.

EDIT: Okay, I tried crossdev -S -v -t armv6j-hardfloat-linux-gnueabi now, and that gets through the second compile of gcc, and then fails on the 3rd and last compile of gcc. Very discouraging, I'm done trying for a little while.

Thanks, I'm going to try a few more things, going to try and lower my MAKEFLAGS to -j1 and see if that helps, dunno why it would help, but I think I saw it somewhere that builds were failing with higher amount of jobs. There is nothing weird about this install, so it should work, and more than you have told me that they were able to build a armv6j-hardfloat-linux-gnueabi toolchain, so I'm not sure what the problem is, if I can't figure it out, I will post a bug.

Okay, I filed a bug, and turns out this is a bug other people were having with crossdev on x86. There is something wrong with GNU Fortran and the crossdev build environment, however if USE="-fortran" is enabled, crossdev compiles everything happily. So I finally got my toolchain set up. I was able to build:

Parts of the python build system are built and need to run on the host during the build ... thats two packages best build on the Pi with the help of distcc and your cross compiler.

I understand this, but a problem I'm having, is that yes python and perl will not cross compile, but I want to have a uclibc system and not glibc, so should I install the glibc stage on the Pi, and then crosscompile packages for uclibc and convert the system over to that, or what? Because there are a number of things that will not compile so far with the toolchain I built, and I don't see how I can build in qemu because there is no uclibc stage.