Gentoo Linux - Taking it On!


javaJake

Jacob Godserv
Joined
Sep 13, 2007
Messages
1,773
Location
USA
Website
myhumblecorner.wordpress.com
Yes, folks, I'm going to take Gentoo head-on and stuff it one way or another into my Pandora. :D

Why Gentoo?
Gentoo has some major advantages that other operating systems just can't provide, and the fundamental reason behind all these features is that you configure it, from the ground up. You don't have to rumage through the entire system to find out what you can clean and what you should keep. You decide what your Pandora should be able to do, even as Gentoo installs each part!

The result depends on how much stuff a user decides he/she wants, but it usually ends up being lighter, faster, and all around more efficient.

Oh, and I almost forgot to mention that, because Gentoo compiles from source, you don't have to wait to get any new versions ported for you - you can do it automatically. :D

That's why the Pandora is a perfect candidate for Gentoo.

Goals (In Order)
  1. To get Gentoo ready to cross-compile when the Pandora ships out.
  2. To get the base Gentoo system (bash, portage, and a properly configured kernel) running on an SD card.
  3. To create a clean .7z image of this newly-installed OS for easy installation, and post it on the Wiki with instructions on how to generate your own if you desire.

Current Progress
  • First step towards getting Gentoo ported is getting something that'll port Gentoo to ARM. Thankfully, Gentoo has documentation on how exactly to do this (surprise, surprise). There's also a utility available you can just install and run (one-liner, folks!) and you've got yourself a cross-compile environment set up. Gentoo is definitely FTW already.
  • Haven't gotten this far, but I want to run some tests and see if I can practice a little in QEMU or some other similar system, and see how I can cross-compile Gentoo into an ARM processor. This will hopefully catch a few of the procedural kinks so everything goes a bit quicker on Pandora-arrived day. ;)

If You Want to Follow Me...
If you want to know how I got as far as I did, I've got a record here just for you (assuming you run Gentoo). Italics means optional.
  1. emerge -av crossdev
  2. crossdev --target arm-unkown-linux-gnueabi -P -v
    • Ignore the "TLS" errors in the first round of glibc compiling. It actually resolves itself later when glibc is recompiled.

I'll keep this topic updated with the latest. Help, suggestions, etc., are more than welcome. :)

Knife's Edge Edition
For the courageous, impatient, or knowledgeable folks, this is a good route to take. viridior is currently setting up a repository where we will keep all of the latest ideas and changes posted. Any steps that are tested and work fine will still be added to the section above.

More coming soon...
 
There are some outdated pre-built stage 3 images for ARM.
Gonna take a look at everything available, I'd love to have Gentoo running on my Pandora even if it didn't have any practical purpose.

EDIT: I believe you're using the wrong architecture, you seem to be building for Alpha.
The right one should be arm-none-linux-gnueabi or, if you wanna rename your compilers and stuff, perhaps arm-gentoo-linux-gnueabi
 
Etinin said:
EDIT: I believe you're using the wrong architecture, you seem to be building for Alpha.
The right one should be arm-none-linux-gnueabi or, if you wanna rename your compilers and stuff, perhaps arm-gentoo-linux-gnueabi

No, alpha is the right one. Internally, crossdev translates arm into alpha, and the Embedded Handbook (good read, btw) says to use alpha for ARM as well as a few other architectures I can't name off the top of my head.

Edit: Woah, you're right. Good catch. I'll purge and reinstall my crossdev, and see what happens. :)
 
I'm a Gentoo user myself, and I love the distro to death. I'm quite up to helping you get a Pandora .7z made once I get my Pandora (cause it's not gonna be easy to test otherwise).
 
I like both ArchLinux and Gentoo, i loved having to start from scratch allowing me to setup stuff and how i wanted =]

Ill look forword to seeing it working in a nice .7z ^_^
 
Etinin said:
EDIT: I believe you're using the wrong architecture, you seem to be building for Alpha.
The right one should be arm-none-linux-gnueabi or, if you wanna rename your compilers and stuff, perhaps arm-gentoo-linux-gnueabi

I think you just killed two birds with one stone, Etinin. The crossdev doesn't need --without-headers anymore, though some new (even more important) issues have popped up. I think I've got the solution to those problems too, but I'm testing them first before I write them up here.
 
Thank you javajake! That means I won't be doing this by myself! I don't think there is a chance that I'd be able to resist putting gentoo on it. I can't wait to start kernel hacking... Only problem being my gentoo box up and quit on me... just software, but I'm getting a new HDD for it anyways, gotta start from scratch. Should be able to start in on it by the end of the week though, it'd be awesome if we had it at least partially working when pandoras arrive.
 
Of course this is something I'll be doing also.

I've done something with gentoo on a hp jornada 720 (arm)
Unfortunately it died a year a go.
so cross compiling a kernel is not to new for me (i probably need a pandora patch for kernel)
 
Nice job :) . I managed to do the same but for aesthetic purposes I preferred arm-gentoo-linux-gnueabi.
Also, another important remark, my crossdev didn't compile the C++ crosscompiler by default, so it's highly recommended you add -s4 to the command line to make sure you get C++.

Make sure you guys patch the kernel so it's optimzed to the OMAP 3235, I'll post an updated ebuild you can add to your overlay directory.
Also if you get an error complaining about dev-manager when emerging vanilla-sources (I preferred that instead of gentoo-sources, as that is the recommended for embedded devices), just emerge udev (also, I recommend that ~arm is set on accepted keywords, so you get OpenRC instead of the old service management crap that pulls in lots of dependencies).
 
well i'm sure glad i'm not the only one ecentric about getting gentoo on the pandora! :D

my question is are you going to try to compile a desktop manager? i normaly use gnome, but that kinda requires memory. i was thinking maybe icewm or xfce. didn't know if you had a plan to figure what is going to easiest to get on it and is a fast interface for the pandora.
 
After i've received my pandora, the first thing that i'll be doing is getting gentoo on my pandora :)
I think it would be good to create a stage4 with baselayout2 (OpenRC) for the pandora, for the ease of installation goodness and performance.

Also i think we'd need xfce as it's small, low momory usage and is fast with the available resources.
 
I've been working on a distro from scratch over the past few months.

I wonder if anyone would be interested in a port to the pandora?

It an RPM(5) packaged distro that uses initng and boots to login in just a few seconds!
 
Etinin said:
Nice job :) . I managed to do the same but for aesthetic purposes I preferred arm-gentoo-linux-gnueabi.
Also, another important remark, my crossdev didn't compile the C++ crosscompiler by default, so it's highly recommended you add -s4 to the command line to make sure you get C++.

Make sure you guys patch the kernel so it's optimzed to the OMAP 3235, I'll post an updated ebuild you can add to your overlay directory.
Also if you get an error complaining about dev-manager when emerging vanilla-sources (I preferred that instead of gentoo-sources, as that is the recommended for embedded devices), just emerge udev (also, I recommend that ~arm is set on accepted keywords, so you get OpenRC instead of the old service management crap that pulls in lots of dependencies).

Be careful - IIRC, we're using the OMAP 3530. You could be optimizing the kernel for the wrong OMAP processor.

Also, there's no real need to compile your own kernel (even though it is Gentoo). The dev team will be releasing the kernels that they build. We can just use these, as they will work best - we're all running the same hardware.
 
Yeah, that was a typo, I got the right patch.
Anyways, I got so used to the Gentoo way of doing things that I kinda enjoy compiling my own kernels. At least for standard PC distros, pre-compiled kernels take longer to load, as they come with lots of noob modules that will be loaded according to the detected hardware (adding a lot of boot time) and even though that won't be the case with Pandora, idk, I guess I'm just crazy.
 
enigma85 said:
well i'm sure glad i'm not the only one ecentric about getting gentoo on the pandora! :D

my question is are you going to try to compile a desktop manager? i normaly use gnome, but that kinda requires memory. i was thinking maybe icewm or xfce. didn't know if you had a plan to figure what is going to easiest to get on it and is a fast interface for the pandora.

Yea, I'm going to try out a number of things. :D

Etinin said:
Yeah, that was a typo, I got the right patch.
Anyways, I got so used to the Gentoo way of doing things that I kinda enjoy compiling my own kernels. At least for standard PC distros, pre-compiled kernels take longer to load, as they come with lots of noob modules that will be loaded according to the detected hardware (adding a lot of boot time) and even though that won't be the case with Pandora, idk, I guess I'm just crazy.

Thanks for your assistance. Whatever you can share will be thoroughly studied. I'm not an expert by any means, but I'm determined, and I usually can figure this stuff out. Usually. ;)
 
Wow, I'm glad there is as much excitement for gentoo on the pandora by so many others. I've already started a gentoo-wiki @ http://www.gentoo-wiki.com/OpenPandora while I was looking into ways of putting Gentoo on the pandora while I awaited mine. The gentoo-wiki is currently just a dump of different things I have been looking into and not a comprehensive site yet, please feel free to edit and improve! I have been an avid Gentoo user since '02 but I have no experience with the ARM platform or messing around with toolchains and cross-compiling. I am eager to learn though, so if we want to get some kind of group together to tackle this count me in!
 
Hey Viridior, those GCC options you got are specifically optimized for the Cortex A8 the Pandora uses (besides the march and mtune ones which obviously are)?
Rather nice apparently, putting them in my CFlags.
 
I was looking through what you wrote up on that wiki page - it seems like a great starting point for all of this. A few questions/comments:

1) Why all of the complicated partition setup?
2) We probably want to stick to KDrive for X stuff - it seems to be what the Pandora team will be using/shipping with the Pandora.
3) The second link in the How-To section at the bottom is broken.
4) Much of the Bluetooth and network connection stuff will be dealt with in the kernel. We can recompile their kernel if we so desire, but changing kernel settings shouldn't be necessary. We should probably just use their kernel sources, patches, and config.
5) Same goes for frequency scaling (from a kernel perspective). From a user perspective, there are various programs that can be used to dynamically set the CPU frequency. There are also a lot of frequency governors available (at least, there are in the x86/amd64 kernels).
 
Back
Top