View previous topic :: View next topic |
Author |
Message |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Sat Sep 15, 2012 9:50 pm Post subject: [SOLVED] armv6j stage with busybox and uclibc |
|
|
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 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Sat Sep 15, 2012 10:39 pm Post subject: |
|
|
hcaulfield57,
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Sat Sep 15, 2012 10:59 pm Post subject: |
|
|
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? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Sat Sep 15, 2012 11:23 pm Post subject: |
|
|
hcaulfield57,
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Sat Sep 15, 2012 11:45 pm Post subject: |
|
|
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Sun Sep 16, 2012 12:54 pm Post subject: |
|
|
hcaulfield57,
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Sun Sep 16, 2012 5:46 pm Post subject: |
|
|
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! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
roarinelk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/838331152404721ec919a4.jpg)
Joined: 04 Mar 2004 Posts: 520
|
Posted: Sun Sep 16, 2012 6:30 pm Post subject: |
|
|
the "v6j" in the triplet gave me headaches as well.
Something like this worked for me:
EXTRA_ECONF="--with-arch=armv6j" crossdev -t armel-hardfloat-linux-uclibc |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Sun Sep 16, 2012 7:46 pm Post subject: |
|
|
Thanks for the tip, I will give that a try, if reinstalling non-hardened Gentoo does not work. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Mon Sep 17, 2012 5:45 am Post subject: |
|
|
I've tried a couple things all of which have failed:
EXTRA_ECONF="--with-arch=armv6j" crossdev -t armel-hardfloat-linux-uclibc
--> fails on gcc
EXTRA_ECONF="--with-arch=armv6j" crossdev -t arm-hardfloat-linux-uclibc
--> fails on uclibc
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Mon Sep 17, 2012 5:49 pm Post subject: |
|
|
hcaulfield57,
crossdev -S -v -t armv6j-hardfloat-linux-gnueabi works for me without the -S on both harened and non hardened ~amd64 /non-multilib/ installs.
It may be useful to read or post at bugs.gentoo.org _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Mon Sep 17, 2012 6:19 pm Post subject: |
|
|
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Wed Sep 19, 2012 2:19 am Post subject: |
|
|
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:
Code: |
armv6j-hardfloat-linux-uclibceabi
|
Hope this helps anyone who has similar problems. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hcaulfield57 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 13 Mar 2012 Posts: 148
|
Posted: Wed Sep 19, 2012 7:19 am Post subject: |
|
|
NeddySeagoon wrote: |
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. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|