Gentoo Linux


115 posts   Page 1 of 5   1, 2, 3, 4, 5
by ryao » Sun Sep 11, 2011 4:55 am
I know that Ubuntu Linux images will not be available for these devices when they become available, but is there any word on Gentoo Linux images?
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am
by doobedoobedo » Sun Sep 11, 2011 10:15 am
Yes Gentoo supports arm.
emerge crossdev
and read this.
Posts: 36
Joined: Sun Aug 28, 2011 11:03 pm
by ShiftPlusOne » Sun Sep 11, 2011 11:26 am
I am sure Ubuntu images WILL be available, just not officially.

And yes, Gentoo works just fine on ARM. Be careful with Gentoo's embedded handbook though. Important steps are missing, but if you have enough experience, you'll figure it out.
Forum Moderator
Forum Moderator
Posts: 1544
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by thebuell » Tue Sep 20, 2011 8:21 pm
I, for one, will be porting Gentoo to the Raspberry PI as soon as I have one in my hands!
Posts: 33
Joined: Mon Sep 19, 2011 8:22 pm
by ShiftPlusOne » Tue Sep 20, 2011 8:30 pm
There's no porting to do, they already have ARM support. It should just be a matter of dropping in the multimedia drivers and the rest is per the handbook.

It would be nice to build an optimized stage3 tarball though. Right now, it's armv5, so it would be a good idea to change CHOST or build a new stage3 from scratch. The documentation is a bit sketchy on it, but it's not too hard.

But yeah, I'll probably be running gentoo.
Forum Moderator
Forum Moderator
Posts: 1544
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by asb » Tue Sep 20, 2011 8:58 pm
As a proof of concept it would be great to see a -mcpu=arm1176jzf-s with -mfpu=softfp build to see if there's an observable performance difference.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 788
Joined: Fri Sep 16, 2011 7:16 pm
by thebuell » Tue Sep 20, 2011 9:24 pm
From what I've read of the specs, having a VFP will make quite a big difference.
Posts: 33
Joined: Mon Sep 19, 2011 8:22 pm
by asb » Tue Sep 20, 2011 9:29 pm
Definitely some apps and benchmarks could be massively improved, it's more a question of whether the difference will be noticeable in general usage over a wider range of programs. That would give a helpful indication of whether it's worth compiling the whole base system, or whether instead you can just opt to use a few optimised libraries/programs.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 788
Joined: Fri Sep 16, 2011 7:16 pm
by CERN » Wed Sep 21, 2011 11:41 pm
"emerge -DNu world" is one command I would absolutely dread running on that little 700mhz ARM! Not to say that the Pi can't benefit from Gentoo, of course, but it certainly would be frustrating to keep it up-to-date.

And it'd be hectic on the memory card's MTBF! (even with distcc)

I think the coolest thing to do would be to create a Pi-oriented fork of Gentoo, where it retains portage, etc, but has an additional package manager for pre-Pi-compiled binary packages. Something like Sabayon, if Sabayon did ARM (it doesn't!). :p

If the preset USE flags on the binaries were sane, it would be pretty great. People who want more/less functionality could always use emerge (probably with distcc), but more or less, a binary package system could save a lot of compile time / save the need to be near computers set up for distributed compiling, at least for most things.
Posts: 2
Joined: Wed Sep 21, 2011 10:23 pm
by thebuell » Thu Sep 22, 2011 8:23 am
The GPU onboard is very powerful, perhaps someone might do a Canadian cross compile using it to generate ARM binaries. Just a thought.

AS for memory cards, there's no evidence to suggest that it would wear out prematurely. It's just a case of finding good quality ones that will last.
Posts: 33
Joined: Mon Sep 19, 2011 8:22 pm
by jamesh » Thu Sep 22, 2011 8:34 am
Quote from asb on September 20, 2011, 21:58
As a proof of concept it would be great to see a -mcpu=arm1176jzf-s with -mfpu=softfp build to see if there's an observable performance difference.


Hmm. I might try building the Debian kernel with that enabled (if it isn't already) - anyone have any ideas in the makefiles/config I would set that up - to save me looking for it?
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11559
Joined: Sat Jul 30, 2011 7:41 pm
by ShiftPlusOne » Thu Sep 22, 2011 8:53 am
I don't think it will be that easy.
Forum Moderator
Forum Moderator
Posts: 1544
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by jamesh » Thu Sep 22, 2011 9:28 am
I'm presuming there are some global compiler options in the kernel build somewhere....is that not the case?
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11559
Joined: Sat Jul 30, 2011 7:41 pm
by thebuell » Thu Sep 22, 2011 9:41 am
I think you'll probably have to select the ARM processor in the kernel configuration *and* specifiy the compiler flags you need when building the kernel. Sometihng like

MAKEOPTS="-mpu=... ..." make kernel
should do the job...
Posts: 33
Joined: Mon Sep 19, 2011 8:22 pm
by ShiftPlusOne » Thu Sep 22, 2011 10:10 am
If you know all the options you need, then yeah, it's not a problem (as long as the CPU shows up under 'system type').
Forum Moderator
Forum Moderator
Posts: 1544
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by jamesh » Thu Sep 22, 2011 1:54 pm
Been digging around the Arm makefiles. We already compile for Armv6 specifically, but not for the specific Arm device being used, and as far as I can see we don't set -mfloat-abi=softfp, although since the kernel is integer anyway I am not sure that would make any difference.

This is the c flags line for Arm, not sure whether -msoft-float is the best option, and it appears Thumb is enabled - not sure that is necessary. I think the following tuning is done

tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)

KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11559
Joined: Sat Jul 30, 2011 7:41 pm
by doobedoobedo » Thu Sep 22, 2011 1:56 pm
Quote from CERN on September 22, 2011, 00:41
I think the coolest thing to do would be to create a Pi-oriented fork of Gentoo, where it retains portage, etc, but has an additional package manager for pre-Pi-compiled binary packages. Something like Sabayon, if Sabayon did ARM (it doesn't!). :p

If the preset USE flags on the binaries were sane, it would be pretty great. People who want more/less functionality could always use emerge (probably with distcc), but more or less, a binary package system could save a lot of compile time / save the need to be near computers set up for distributed compiling, at least for most things.
No need for a fork, emerge -k will pull in pre-compiled binary packages, emerge -b will build them. See man emerge.
Posts: 36
Joined: Sun Aug 28, 2011 11:03 pm
by jamesh » Thu Sep 22, 2011 2:03 pm
Actually, the only important bit in my last email is the tuning line - the other line isn't used.

So we might be able to get a slightly faster kernel by modding the tune line to exactly match the processor, and enable softfp
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11559
Joined: Sat Jul 30, 2011 7:41 pm
by Blars » Fri Sep 23, 2011 8:33 am
Actually, for gentoo you should enable hardfp not softfp. They are not binary compatable, but gentoo isn't about binary compatability. Debian armel uses softfp to be binary compatable with arms with no vfp.
Posts: 88
Joined: Sun Aug 28, 2011 3:22 am
by asb » Fri Sep 23, 2011 8:58 am
Blars: Is armel not using -mfpu=soft for compatibility with cores with no FP. -mfpu=softfp as I suggested means to use a floating point unit, but retain soft floating point calling conventions. Though yes, -mfpu=hard would be better still, but you sacrifice binary compatibility with normal armel binaries.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 788
Joined: Fri Sep 16, 2011 7:16 pm
by jamesh » Fri Sep 23, 2011 9:43 am
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11559
Joined: Sat Jul 30, 2011 7:41 pm
by asb » Fri Sep 23, 2011 9:54 am
Aargh, I meant -mfloat-abi.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 788
Joined: Fri Sep 16, 2011 7:16 pm
by PhilipJFry » Mon Oct 17, 2011 8:53 pm
I've been using gentoo for nearly 10 years and find it difficult using anything else. Anyway if any one is interested I've compiled a very raspberry tuned gentoo. According to this page http://dev.gentoo.org/~armin76...../chost.xml the processor used on the raspberry pi is ARMv6ZK Subarchitecture so I've built using the CHOST armv6zk-unknown-linux-gnueabi. I've then recompiled the entire system using the the following CFLAGS -O2 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard. It's running nicely on qemu at the moment, can't wait to try it on the real thing.
Posts: 3
Joined: Wed Oct 12, 2011 8:06 pm
by thebuell » Mon Oct 17, 2011 10:26 pm
Quote from PhilipJFry on October 17, 2011, 21:53
I've been using gentoo for nearly 10 years and find it difficult using anything else. Anyway if any one is interested I've compiled a very raspberry tuned gentoo. According to this page http://dev.gentoo.org/~armin76...../chost.xml the processor used on the raspberry pi is ARMv6ZK Subarchitecture so I've built using the CHOST armv6zk-unknown-linux-gnueabi. I've then recompiled the entire system using the the following CFLAGS -O2 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard. It's running nicely on qemu at the moment, can't wait to try it on the real thing.


Do you have a bootable image and stages I can test out with my qemu? Thanks
Posts: 33
Joined: Mon Sep 19, 2011 8:22 pm
by cb88 » Mon Oct 17, 2011 10:48 pm
will it be possible to get both hardfloat and softfloat versions of the graphics drivers? Because if not then you won't be able to do anything with 3D at reasonable speed on gentoo hardfloat.
Posts: 1
Joined: Mon Oct 17, 2011 9:37 pm