When I ordered the ALIX.3D3 board I thought installing Gentoo on this should be a piece of cake, but finally there were some stumbling blocks and that's why I want to summarize how I got gentoo running.
First of all, I recommend installing Gentoo on a normal desktop to get to know the installing process, which is a bit different from graphical installers of mainstream distros. The Gentoo Handbook is a great documentation how this done.
To install gentoo, you have to boot a minimal or "rescue" linux usually from cd/dvd. I tried to convice the bios to boot from a usb cd-rom drive, but I hadn't any success.
So I had to prepare a USB stick to boot from. There's a nice tool UNetbootin which automatically copies ISO images to a usbstick and makes it bootable. I tried a lot with the Linux version of it but didn't had any success regardless of which ISO image or USB stick I took. So I booted windows and tried it with this version. I had success on the first attempt, using the install-x86-minimal.iso from Gentoo and a 3 EUR SD-card Reader with a 4 GB SDHC card in it, formatted as FAT32 as the only partition (not in superfloppy mode).
If you've got a booting usb stick, insert it into a USB plug of the board, attach a USB keyboard and a monitor to the VGA port. Power on and press escape to select the boot menu. There should be an option for the usb stick if everything went fine.
Now the gentoo minimal system should boot and you can proceed with the usual installing (look into Gentoo Handbook for details). The AMD Geode LX800 cpu is a i586 cpu, so you have to install a i386, i486 oder i586 stage (i686 or amd64 won't work!). I installed a i486 stage 3 and updated later to i586.
Partitioning should follow your preferences but don't a forget a swap partition. 256 MB of RAM is not that much and gcc will not compile without!
CFLAGS="-O2 -march=i486 -pipe"
for installation as the gcc version on the stage3 archive don't support the geode march.
The rest of the installation is business as usual. I installed gentoo-sources for a optimized kernel and took this configuration here: ALIX.3D3 kernel-2.6.29-r2 config
After finishing installation and booting with the new kernel, it's time to update the systems to i586. For this, at first update all packages to actual version, especially gcc to version 4.3. Afterwards it's save to change
CFLAGS="-march=geode -Os -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer"
and proceed with changing of the CHOST variable. There's a nice tutorial here: Changing CHOST.
Now you should have a nice and optimized gentoo on your ALIX.3D3
hi dude, im in a problem with an alix 3d3 and gentoo, i have the same problems, usb-cd doesn't work, i try unetbootin at linux, and doesn't work, i try with unetbooting with windows and it doesn't work neither, booting jump to a iMedia linux at mu cf card. i use a transcend cf 2Gb for unetbooting, with a transcend usb adapter, the bios order boot is removable, cdrom, hard disk.
i read this howto with no succed, could you give me a clue about this??
thankyou a lot
First of all, BIOS boot order is not that important. Press ESC while powering up and there should appear a boot menu. If your device doesn't show up there, it won't boot. I tested 3 different usb sticks and only one of them worked.
If none of yours will work, you can try it a different way. Insert the CF card on your desktop into a usb cardreader or into a IDE-CF adapter. Boot from the install-x86-minimal CD (remember to download a i386,i486 or i586 version. i686 won't work). Then install Gentoo normally on the CF and don't forget to setup grub. grub-install scripts doesn't worked for me (Maybe --recheck helps on your system). I had to setup manually. It's described in the Gentoo handbook, Chapter 10.
I installed Gentoo on a 2 GB CF at the first time. It's possible but maybe you get problems when you have a lots of files from portage and kernel sources. You can solve this by either setting a high enough inode count when formatting the root partition (mkfs.ext3 -N number-of-inodes /dev/sdXX). I recommend 250000 inodes or more. Another solutions is to compress portage. There's a nice article on Gentoo Wiki Archive.
thank you i will try installing first into a CF
You're welcome. If your CF is a least 2048901120 Bytes large, you can try my Gentoo 2GB image. You can download it -link removed-.
After downloading and bunzipping just copy it to your CF with dd:
where sdX is your Compact Flash device (not the partition on it!). Plug it in and boot. Root password should be alix.
i install a gentoo into a usb, but you was right, no all usb works, its hard to find one, but well a kingston DT Mini works, and also i will try your image, im downloading it, i hope to finish today, really, thank you for your help
hi, i download you image and then i use dd to pass it to a CF but when i mount it, fdisk -l said that has a invalid partition table. im trying to copy with cp -dpR una cf with a partition table, may be its works.
You're righy. I accidently only made an image of the partition, not the whole disk. I updated the image linked above.
hi twam, finaly my alix 3d3 is running, so i have a one last question, i use debian, so emerge is a new tool for me, so, i cannot emerge anything, also if i do a make menuconfig, i get a errors, so i need update something, thankyou a lot
Congratulations! Which way did you succeed?
There's a nice introdution to portage in the Gentoo Handbook as well. If emerge is complaining about no make.profile or something like that, theres a problem with the squashfs image of portage I mentioned in Comment #2.
make menuconfig? You mean compiling a new kernel? I should work like
well, i think with both, finally i get a usb-boot and install it, so it just custom gentoo, and also your image work too. so i have 2 details with C preprocessor sanity check when i use emerge, and eth0 is a unknwon interface i hace to use eth1, but im on the run, so, i have to read more about gentoo also
If eth0 is unknown (on my image), this because udev wants to keep the device name for each MAC address. Just delete the line with eth0 and eth1 in /etc/udev/rules.d/70-persistent-net.rules and reboot.
ok, i got it, it was a CF geometri error, i install it in a transcend 2 Gb CF, so y change it into a pcengines CF, and the geometri was causing a ext3 error corrupt, so it was the problem, so, until now i don't get it clearly why.
so this is a resume
*usb-live was a kingston data travell
*i install it by unetbootin on debian lenny
*alix bios take it without problem
*i install gentoo into a CF transcend 2gb 133x and don't work
*i use you image into a CF transcend 2 gb 133x and work with errors
*i install gentoo into a CF buy it at pcengines (without brand) and works,
*also your image works pretty nice
so check your cf compatibility
thank you a lot 🙂
I would heavily discourage converting a Geode to i586 CHOST.
While the Geode LX does have all documented i586 and i686 instructions (I believe some undocumented i686 instructions get used by gcc/glibc on i686 CHOST, hence i686 is not for geode), its CPU is more like a i486 as far as instruction scheduling and times go. While -march=geode will mitigate most of that, as the implied -mtune=geode will let gcc know exact instruction costs based on gcc/config/i386/geode.md in gcc sources, glibc will still be using optimized routines for i586 (from sysdeps/i386/i586 in glibc sources), which are much slower on a Geode than the i486 versions. At least i586 being worse than i486 for some reasons is what the consensus is amongst the technical experts of the GeodeLX CPU (including now disbanded AMD Geode technical team, iirc), the details are what I have figured are probably the reasons.
Note that for glibc there's actually code in http://dev.laptop.org/git/geode-perf/ that implements geode specific optimized routines for even more gains, but the work on those seems to have ceased before they got implemented to upstream glibc. I've been meaning to test those, but haven't gotten that far yet. In there are also highly technical explanations and documentation of the work and testing that had been done. Too bad they didn't get them to glibc proper.
As for anecdotal proof of why Gentoo is better on a GeodeLX, once I was implementing some simple thing based on GGI on top of lxfb framebuffer that simply showed a few numbers across the whole resolution that had to be updated every second and with debians glibc (I believe that was i386, but maybe i586, whatever Lenny had) caused the updating to blink unbearably, the memcpy or something was just too slow I figured in the end. As soon as I replaced libc.so.6 with one from a Gentoo -march=geode rootfs, it stopped being a problem at all 🙂 I did not take the find out if it was glibc optimized memcpy routines differences or simply the -march or CHOST difference in that specific case though
Maybe we should have a chat about Gentoo and linux on Geode on IRC or something, my nickname is "leio" in FreeNode.
Oh and as a disclaimer or something, using the correct -march or CHOST or optimized Geode glibc routines doesn't mean it will be much more snappy than with some other choices, it just means that in some (not so often) cases where the bottleneck is something that would benefit from better instruction scheduling and so on it gets noticeably better. In the real world with your average application often it doesn't make all that much of a difference, but who cares, we have Gentoo, we have the possibility to add that extra 1-3% oomph when the real gain is the controllability of USE flags 🙂
Thanks a lot for those very clarifying explanations. Changing to i586 CHOST was a spontaneous idea, because I just thought that i586 would be more adequate for the Geode LX CPU. Do you know any benchmarks who could measure the difference to i486 seriously?
Hello and thank you for this wonderful blog of yours. I've bought an ALIX 3D3 a few days ago and installed Debian Lenny (i386-i486) on Apacer 4GB flash stick. There seems to be some sort of bug in the bootloader on in the kernel - it refuses to boot without a monitor attached to the VGA port. It just freezes on "Detecting EDD" or something like that, just after "Starting up...". After I reattach the monitor it hangs like that for about 3-4 minutes and resumes normal boot, without a monitor it doesn't boot at all. Currently I'm building the newest kernel (22.214.171.124) from kernel.org with some customisations on the config to see if it'll work. Is this a correct approach or should I patch the bios with the beta version from the pc-engines page (and there are alix0.bin and alix2.bin - which one?)
Best Regards, Dimitar.
I installed the BETA bios (alix2.bin) from the PC Engines webpage, but I don't think this is the cause of the problem.
Trying a new kernel is the first I would have done. You can use my .config I linked in the article. This should boot fine.
Hello again. I've compiled a 126.96.36.199 kernel with some modifications to the .config and it works like a charm now. Thank you very much, as the info on your blog was very helpful.
What modifications to the config do you need to make when compiling a kernel? I have tried every distro, and Gentoo and DSL are the only two i've found that don't have a 30minute or so hang during boot. Gentoo, I've found, is too slow for this CPU since you have to compile everything from source. Any other distros that are known to work?
I haven't tried any other distro than Gentoo, but actually every one should work. If you have problems with kernel you can upgrade it on any distro. Download the sources from kernel.org and compile it by yourself. A suitable config for the ALIX.3D3 can be found here. Copy it to /usr/src/linux/.config (if you extracted your kernel to /usr/src/linux) and run
Maybe you have to adjust your boot manager afterwards.
My Alix3d3 just arrived and I tried to boot minimal gentoo from a shcd card.
The shcd card was detected successfully and I could see the grub menu, but when I try to boot gentoo it stops doing anything after loading /gentoo.efimg.mountpoint/gentoo and /gentoo.efimg.mountpoint/gentoo.igz.
I tried it also with grml, but same result.
Are there any boot options I have to use?
I didn't have to set any boot options. EFI sounds a little strange to me, as this board has no EFI firmware. Maybe you picked a wrong image. Also I had problems when using the Linux version of Unetbootin, maybe you should try the Windows version (if you used Unetbootin to put the image on SDHC).
Unfortunately it's still doesn't work for me.
I erased two lines in 70-persistent-net.rules , I even removed this file, still during booting I get dhclient error:
It worked for me with slax 6.1.1 on an usb stick.
No worries guys, I'll try to install it by myself, I need to find a time for it. Complaining it's just my second nature 😉 Anyway, thanks for .config & everything 🙂
Booting an alix3d3 from usb cdrom is simple, just press the pause key right after powerup and wait a minute (or two), until the cdrom has successfully detected a cd. After that, press ESC, until the boot-menu is shown. Select the cdrom there.
The bios is a bit impatient on usb cdroms, so you have to increase the wait-time by using pause.
i had the same errors with the Unetbootin running under Linux.. when i tried with puppylinux it worked. the sources for gentoo were the ones listed as: 2008-live
twam, you did you removed your image? is there a chance to have it back? As this blog entry suggets, its all about gentoo on the alix3d3, i dont want to have something else!
Yes, I removed the image as it took too much space on my small webserver. 🙁 I can make you and upload you a 4 GB version as soon as I have access to my board (2 weeks ETA) if you like
yes, i will be very grateful if you can share it again, Im running a debootsraped debian in my alix and will like to compare with gentoo and hopefully migrate it following your advices here in this post.
twan, hi again, nevermind, i had some spare time and went through the whole process.. right now im choosing a wm. I will try to upload the base image on my site so other can get the gentoo taste on the alix board with a simple dd clone command.
Nice! You can post your link here if you like, so other people will benefit from it.
have a quick question about Alix3d3 performance with DivX files. I tried to run some videos using Mplayer on TinyCoreLinux and that was not too excitement, pretty slow, even when I played a little with settings. Is Gentoo doin any better? Did anyone tried?
My fault guys, it works perfect. Sorry to bother you 😉
Hello, you articles connecte with gentoo on Alix PC are really perfect (LEDs & CPU Temp sensor are best). Please could you help me with my problem, I have Alix PC 3d2 which is different from your version in not having board clock. So after reboot time is 1970-01-01 and my problem is to force running ntp-client before checkfs/checkroot which fails because my partition has been mounted in a future ! I tried to specify that ntp-client will start in boot runlevel and before checkfs, but everytime checkfs is the first in boot section ?
Thank you for your ideas 😉 marxin
I'm sorry that haven't got a solution right off the top of my head. If you were able to put ntp-client in front of this would need a running network, and the running network would need net.eth0 which depends on udev. Udev needs write support on the device for creating its permanent rules... (No guarantee on that dependecies)
Maybe the easiest solution would to disable the filesystems checks at all and do them by hand.
I need help in choosing right type of CF selection for booting ALIX3D3. As it printed in datasheet "Hot swap of CF cards is not supported!". What does it mean?
Will low cost "Compact Flash 8Gb Transcend (133?)" suitable for booting OS. (I want to start from WIN XP embedded for a first time).
And what CF cards do you use with ALIX.3D3?
Usually any compact flash card should work for booting Linux. Windows is a bit special, because the compact flash has to identify itself as a fixed disk instead of removable media. For some cards there exist tools to change this behaviour.
You should check the speed of the card itself and the support of UDMA modi the ensure that it will work on a accepatable speed.
I personally used SanDisks Extreme IV cards in my productive systems as they support UDMA and have a speed of about 40 MB/s, but they're not the cheapest ones. Also SanDisks guarantees me a certain amout of write cycles specified in their datasheets.
Thank you! I've successfully booted Windows XP installation from USB Flash Stick (Kingston Data Traveler) 8 Gb and install it on Transcend Compact Flash 300x based on SLC memory. Everything is working fine with EWF enabled.
I would like to try your CF image to give me a quick start exploring gentoo on alix 3d3!!
I am looking for a minimal deskop pc and thought alix 3d3 + gentoo could be solution?
Ever tried running gentoo desktop on alix 3d3?
I hope you will direct me to download link for CF image 🙂
I sold my Alix.3D3 a few weeks ago, so I don't have the CF image anymore. But a desktop gentoo with a X system is probably a little hard to get on a 4 CF system.
Hi, thanks for your blog, i wanna try gentoo on alix 3d3 to. What was last kernel you used on this board and its there a way that you can publish it? Compiling default kernel on alix would take a lot of time.
The last kernel I used was 2.6.31 IIRC. As I sold the board, I don't have the compiled kernel anymore. But if you don't have the time, to compile it on the alix, you could cross-compile it on another computer. (But setting cross-compiling up, may take longer than compiling it on the ALIX ;))
Sorry i didnt mean on compiled kernel but its .config file :). I sow you wrote that you sold it, any particular reason or just tired of playing with it? 🙂
@crow You can use the config file mentioned in the article and do an "make oldconfig". So you only have to set the options introduced after 2.6.29. This might be a good start.
I sold it, because I didn't had so much time for it and I had no special use for it.
I'm trying to do a similar thing with Slackware. What worries me most is the use of Compact Flash as an hard-disk. You have taken some special technique, like using tmpfs filesystem or aufs2? I have no experience with these file systems and I was wondering if you could show me some guidelines to follow or to read.
Another thing I wanted to ask was whether you had a custom kernel for the card alix3d3 fairly recent. I found a 2.6.29, have you a newer version?
Finally any advice on this project is welcome. Thanks in advance.
I did not use a tmpfs filesystem as the system only had only 256 MB. I always used a custom kernel for the system, usually the most recent one. You can find the config for that in the blog post.
Thanks but where can I find the patch used for leds for kernel 2.6.37.x?
There is no. You have to adopt the old one.
I tried to apply it but I get a "failed HUNK. " The problem is that the vanilla kernel does not have the support of the LEDs for alix boards in the tabs under "device drivers"(LED Support for ALIX.2 and ALIX.3 series
). The same thing happens for the watchdog.
I also wanted to tell you that in your .config the module "pata_cs5536" is not enabled. You have enabled only "pata_amd". Thanks for the help.
As I don't have the ALIX board anymore, I don't have a patch for a more recent kernel, so you have to adapt it own your own. It shouldn't be too difficult.
I can't tell you anymore why i didn't enabled pata_cs5536, but the kernel included everything needed to boot it from CF card.