Lartza
Posts: 3
Joined: Thu Jul 05, 2012 8:19 am

Raspberry Pi 2

Wed Feb 04, 2015 8:13 am

Got my package yesterday, didn't feel like hacking together Arch Linux ARM for the new Raspberry Pi yet, so I installed Gentoo instead.

Gotta say that it's a lot snappier. Emerge is still obviously slower than a desktop, and I/O is still a problem you need to resolve with NFS etc but you might not need to set-up a distcc anymore if you don't mind waiting a bit. I'm at least enjoying everything so far, Ubuntu or Windows 10 aren't really for me :)

PS. Installing is quite easy with the guide, just replace the stage3 with armv7a and get kernel7.img from github instead of kernel.img(but no need to rename), the few raspberrypi-* stuff in portage is going to need a little refreshment but all in good time :)
PPS. -march=armv7-a -mtune=cortex-a7 -mfpu=neon

Anyone else still having fun with Gentoo on the Pi? :)

RichardPickman
Posts: 5
Joined: Sat Feb 07, 2015 3:09 pm

Re: Raspberry Pi 2

Sat Feb 07, 2015 4:04 pm

I got my RPI2 since Yesterday and i am trying to figure out how to install Gentoo with all the benefits of the RPI2. All tutorials are focused on the first RPI.

What do i have to do, to install Gentoo with a ARMv7 Kernel, Raspberry Pi Firmware and fitting CFLAGS? Any Tutorial available?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10583
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry Pi 2

Sat Feb 07, 2015 4:17 pm

The mark 2 PI model B i only out for lass than a week, probably gentoo makers don't even have one yet.
So its unlikely gentoo for ARMv7 PI's is already available, and unmodified gentoo won't run on a PI2, at the very least the bootfiles and kernel needs to be updated to add ARMv7 support.

RichardPickman
Posts: 5
Joined: Sat Feb 07, 2015 3:09 pm

Re: Raspberry Pi 2

Sun Feb 08, 2015 9:58 am

Well, i was hoping the OP would show some of his magic :D

Tried to install gentoo according to the quick install guide and Lartza's hints, but i am getting nowhere. I am a little desperate now :?

waa
Posts: 4
Joined: Mon Feb 09, 2015 7:26 pm

Re: Raspberry Pi 2

Mon Feb 09, 2015 7:29 pm

Hi,

with the information given by the first post and some searching through RPI and Gentoo forums/wiki, I could successfully install Gentoo on the RPI2, with the standard kernel.

I created a short howto that is available here:
https://plus.google.com/102209178485446 ... NTqe6sVW87

I now also created a howto if you want to compile your own kernel (using the Raspberry PI2's kernel files from Github):
https://plus.google.com/102209178485446 ... YGYMxUqLxm

RichardPickman
Posts: 5
Joined: Sat Feb 07, 2015 3:09 pm

Re: Raspberry Pi 2

Tue Feb 10, 2015 4:12 pm

Great Work.

Now i got Gentoo to work on my RPI2. Thaks a lot for your Tutorial.

Did you try to add MAKEOPTS="j5" into your make.conf? Since we have now a multicore CPU, this should speed up compiling.
I am trying it now on my RPI2. Maybe i can tell you more shortly about speed or bugs with this flag.

waa
Posts: 4
Joined: Mon Feb 09, 2015 7:26 pm

Re: Raspberry Pi 2

Wed Feb 11, 2015 10:03 am

Hi!

Yes, I forgot the MAKEOPTS on the rpi2. But I have now started to use distcc (the distcc wiki entry from Gentoo for the rpi is still valid, just use armv7a* instead of arm6j*), so I don't know how fast the compilation process really is.

The one core compilation was quite slow, but it is still useable...

Luser
Posts: 3
Joined: Fri Feb 13, 2015 1:46 pm

Re: Raspberry Pi 2

Fri Feb 13, 2015 2:01 pm

Thanks for the description Wolfgang!

Unfortunately following the exact descriptions do not work on my Raspberry 2.
I do not get any signal and both lights are on constantly.
Does one of you have any ideas (or a stage4 for comparison)?

Best.

waa
Posts: 4
Joined: Mon Feb 09, 2015 7:26 pm

Re: Raspberry Pi 2

Fri Feb 13, 2015 3:52 pm

Hi Luser,

but you do get the standard signal from the HDMI cable when turning on the device, right? The 4 pixels that fill the screen with 4 colors? Also the kernel should boot shortly after that?!

Just to be sure: Can you rule out an issues with the microSD card? Does it work with the Raspbian image?

Luser
Posts: 3
Joined: Fri Feb 13, 2015 1:46 pm

Re: Raspberry Pi 2

Fri Feb 13, 2015 4:07 pm

Now that you say it: I don't see that screen.
The SD card works fine. I bootet an arch from this card before.

waa
Posts: 4
Joined: Mon Feb 09, 2015 7:26 pm

Re: Raspberry Pi 2

Fri Feb 20, 2015 4:49 pm

I think you should always see this screen, since it is the video initialization screen. Nevertheless, I will re-evaluate my howto, as soon as I have finished my RPI2 installation using another SD card... Sorry, I'm currently busy and could not do any further tests.

poinck
Posts: 1
Joined: Sat Feb 21, 2015 7:48 pm

Re: Raspberry Pi 2

Sat Feb 21, 2015 7:53 pm

@waa: I have currently a distcc-setup, too. Do you have "localhost" in "distcc-config --get-hosts" as well? I wonder what would be better for compile-time.

Luser
Posts: 3
Joined: Fri Feb 13, 2015 1:46 pm

Re: Raspberry Pi 2

Mon Feb 23, 2015 12:11 pm

waa wrote:....
Thanks for trying to help out!

I'll try with the second RPI that I have in a few days.

el_Salmon
Posts: 17
Joined: Thu Jan 10, 2013 2:22 pm

Re: Raspberry Pi 2

Tue Mar 03, 2015 7:08 pm

waa wrote:Hi,

with the information given by the first post and some searching through RPI and Gentoo forums/wiki, I could successfully install Gentoo on the RPI2, with the standard kernel.

I created a short howto that is available here:
https://plus.google.com/102209178485446 ... NTqe6sVW87
I have followed your tutorial. The problem is keyboard is not responding. I can see some messages about the keyboard is detected during boot, so I cannot configure system because SSH is not enabled by default. The keyboard is working fine with my Linux laptop and I'm using a 2 A power supply.

garlicbready
Posts: 3
Joined: Sun Mar 22, 2015 7:31 pm

Re: Raspberry Pi 2

Sun Mar 22, 2015 7:38 pm

You might find this interesting (I take no responsibility if you break stuff ;) )
https://github.com/grbd/GBD.Rpi2.Gentoo

I've been putting together my own notes for installing gentoo onto the rpi2, it's still a work in progress (I still need to recompile a new kernel instead of using the raspian one / setup my own overlay / get the userspace tools working etc)
I'm still quite supprised at how fast it is at compiling on it's own and how little heat it's generating

For the keyboard issue, it might be a problem with missing the kernel modules inside the gentoo install if your using the kernel from raspian

EvadingGrid
Posts: 6
Joined: Thu Mar 17, 2016 1:02 pm

Re: Raspberry Pi 2

Thu Mar 17, 2016 1:31 pm

The way I did it, was very quick and simple.

I wrote instructions, to help others who just want Gentoo and not a PhD in all things Raspbian.
http://ukginger.net/Gentoo2/


In short, Raspbian is still on the SD Card, Gentoo is on an external USB Hardrive...
CHOST = armv7a-hardfloat

Kernel is simply pulled from Raspberry Foundation GiT.
It really was a very fast, quick, painless install.

Of course some people will play with the flags, GCC manual has a warning about setting the FPU as "neon-vfpv4" . . . as it is not IEEE 754 compliant and it just will not work without the additional -funsafe-math-optimizations. My opinion is that vanilla gentoo with armv7a-hardfloat is enough optimisation when balanced with my free time.

EvadingGrid
Posts: 6
Joined: Thu Mar 17, 2016 1:02 pm

Re: Raspberry Pi 2

Thu Mar 24, 2016 10:47 am

I did compile a stage-3 specific for the hardware acceleration unit "neon" and to use the "vfpv4" floating point unit.


This page :
http://ukginger.net/Gentoo2/install-pi2too-6-base.html

The File is armv7a_neonvfpv4_hardfp-20160320

Gentoo Generic
CFLAGS="-02 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard "

Optimised for Raspberry 2 and 3
CFLAGS="-02 -pipe -march=armv7-a -mfpu=neon-vfpv4 -ffast-math -mfloat-abi=hard "

Really one has to read the cryptic GCC documentation and poke around ARM website to make sense of it all. But the short version is that Raspbian has an antique binary for ARM 6, gentoo does a generic one size fits all ARM 7, but the Raspberry has the sexy extra hardware acceleration and the newer floating point so, knowing people would want it, I cooked it.

I am rather cynical as to actual speed improvements, but for a Raspberry 3 an optimised Stage-3 probably makes a lot of sense - should you be trying to play say X265 encoded video.

Return to “Gentoo”

Who is online

Users browsing this forum: No registered users and 1 guest