some time ago, I managed to get an Intel Galileo board to boot Gentoo Linux and have DHCP, SSH and GPIO (all io ports!) up and running. I cross-compiled the image as a "arch=i486" to avoid any segmentation faults with libpthread as observed in i586-like builds of other Linux images (e.g., Debian). A major advantage of Gentoo as everything is build/compiled in accordance with the desired architecture. I compiled my own Clanton/Galileo The image uses a patched Vanilla Kernel in Version 3.19.2 including support for Swap partitions and all Galileo specific features (GPIO...).
GCC version is 4.9.3, Python is available in version 2.7.10, 3.4.3. I also included a tiny LED-blink example in the default user's home directory, which was compiled on the Galileo board itself and gets the onboard LED blinking, yay!
I just finished uploading the dd-gziped image to one of the servers at our university and made that freely available:
md5sum of the above file should match: 570a966d3dabb0007c20d120bce03925
The image can be copied over to any >4GB microSD card like so:
gunzip -c galileo-gentoo-4GB-GPIO-kernel-3.19.2-gcc4.9.3-20160805.img.gz | dd of=/dev/ bs=10m
Login over SSH (I did not test serial console):
- upgraded to gcc 4.9.3
- updated openssl to 1.0.2h
- latest updates as in Gentoo's Portage tree (date: 2016-08-05)
- shrinked image size by using "zerofree" to wipe out unused bytes from the image
- changed to newer kernel 3.19.2 (patched/built from vanilla sources) - provided by xbolshe, credits
- newer kernel gives much better hardware support, especially on mini-PCIe cards (WiFi, bluetooth and so on...)
- fixed a DHCP issue, which caused eth0 device not to be usable and thus ntp-date also failed to set the system time at boot time
- switched system localization from de_DE.UTF-8 to more international en_US.UTF-8
- shrinked image size by using "zerofree" to wipe out unused bytes from the image
- latest updates as in Gentoo's Portage tree (date: 2015-10-15)
nodeJS is NOT integrated, as it won't run (and: compile) due to missing SSE2 extension in quark soc
- updated openssl to 1.0.2d
- added "htop" system monitor
- latest updates as in Gentoo's Portage tree (date: 2015-09-22)
- updated openssl to 1.0.1m
- latest updates as in Gentoo's Portage tree (date: 2015-06-01)
- various other system (security) fixes
- enabled support for SWAP partitions (finally!) in the new kernel
- enabled 1-wire library as a kernel module to support sensors based on the 1-Wire protocol, e.g., D18B20 temperature sensor - not possible with 3.8.7 yocto kernels
- added some more cryptographic modules (md5, aes, ripe...) - not possible with 3.8.7 yocto kernels
- added a 256MB swap partition to support memory hungry compile operations - not possible with 3.8.7 yocto kernels
- upgraded glibc to version 2.19 (before 2.17)
- updated openssl to 1.0.1j
- fixed critical bash issues - including latest security patches by Gentoo
- added support for serial console as proposed by Kazu-Zamasu
- added "distcc" support to help compilation processes from other hosts
- latest updates (openssl,...) as in Gentoo's Portage tree (date: 2014-07-21)
Some interesting results:
The memory footprint: around 28 to 30 MB used after system boot only!
The openssl speed benchmark performs slightly faster than De...
Amazingly I was able to run:
emerge -uDU --with-bdeps=y @world
Without breaking anything. (It took just over 20 hours though, as Portage compiles everything on device, and our device isn't the fastest on the block.) But because it builds on device with device settings I guess it has no problem adjusting for Galileo's oddities. Everything runs well, and I am 100% up to date. (Vastly different story for Ubilinux and package management.)
Looks like Ethernet doesn't throw an error on boot anymore. So I assume an update ironed things out. Will try to figure out why.
I was able to setup Bluez (My node app requires BLE). But unfortunately I wasn't able to install nodejs from Portage. I asked on the Gentoo forum: https://forums.gentoo.org/viewtopic-p-7804792.html?sid=dee8f41663e159818a8f913e37b757bf# 7804792 https://forums.gentoo.org/viewtopic-p-7804792.html?sid=dee8f41663e159818a8f913e37b757bf# 7804792 [The core issue is: # CHECK(cpu.has_sse2()) failed ]
And hope they can give me an idea about it. But I want to ask here as well, because the Intel Yocto image ships with nodejs (and it works). So it must have been built with these flags enabled.
Does anyone have any advice about how to build/get nodejs that will be compatible with this arch?
Semi aside: Somebody mentioned the possibility of building packages in a Gentoo VM (as it can take days to build some on the Galileo) and then transferring the built package over. But would that cause issues due to the various hardware quirks on the Galileo? Is it possible to totally simulate the environment?
Do you use a Galileo 2 during that boot? I own a Galileo 1 and don't have any issues to bring up eth0 device during boot. Pls provide information if that was a Galileo 2 device.
@German localization: well it's up to you to fix it to the language setting preferred
Great work to make WiFi work with your mini-pcie card. Basically, I considered doing so months ago, yet I could not get commonly used devices for testing.
I just added a "September" release of the image (see original post and related link), which addresses security related stuff. On request by some people here, I will bring out another release of the image to incorparate "pciutils lshw rfkill wpa_supplicant" packages as well. Any further wishes for the October release? I will wait for some days to collect those, before I package things up. Btw: Can anyone confirm "eth0" bootup issues (Galileo 1/2)? Recent September release just boots like a charm and gets DHCP address assigned in two different environments.
Still, if anyone could provide a pre-built/binary version of a Galileo patched kernel that is > 3.8.x or even better > 3.14.x we could support more WiFi devices out of the box via the related kernel modules. Personally, I don't have the time to fiddle around with kernel builds atm and I do not have WiFi devices either, sadly...
Where is a tar.gz kernel archive (including kernel & modules) patched for Galileo 1 boards that also supports the board modifications needed to have hardware GPIO support?
may be this link will be interesting for you:
I will try your kernel on my Galileo Gen 1 board and evaluate it on robustness and functionality. It might be included in my October release of the Galileo Gentoo dd Image. Thx for pointing me to your custom image with 3.19.x kernel. :-)
Did you use a vanilla image and is Swap functionality enabled in that kernel?
i just made a first attempt on booting your kernel, yet it stalls somewhere early during the boot.. :/ - My first guess: Is Ext3 compiled into the kernel or as a module? I suspect it can't find/mount my real root filesystem where I put the modules of your kernel (/lib/modules/...). Sadly I have no serial cable at hand for debugging. Could you please confirm if "Ext3" partition support is compiled into the kernel image?
Another idea, could you post the ".config" or compressed as "config.gz" from your kernel build at the github project page? Thereby, others can quickly see, what features are enabled. Please also put a hint there, that u have used clean vanilla sources, it is a "pro"-Feature to use your kernel
Thx in advance, BR
BTW, there is a crash in https://download.mi.hs-heilbronn.de/galileo/galileo-gentoo-4GB-GPIO-Swap-20150922.img.gz https://download.mi.hs-heilbronn.de/galileo/galileo-gentoo-4GB-GPIO-Swap-20150922.img.gz on Gen1 with the option 3.8.13:
Also there is a DE locale by default:
Ich glaube, das ist die falsche standardmäßig Sprache.
It is better to use like this:
Only have Galileo Gen 2s here (Gen 1 is permanently bricked)
I was unfortunately unable to get Node js to work on this processor. How does Intel support node on the Galileo? Do ether of you have any advice on this?
I have tried to change a kernel to 3.19.2 in https://download.mi.hs-heilbronn.de/galileo/galileo-gentoo-4GB-GPIO-Swap-20150922.img.gz https://download.mi.hs-heilbronn.de/galileo/galileo-gentoo-4GB-GPIO-Swap-20150922.img.gz
And here is a result. A lot of problems are there, but potentially it works.
xbolshe Great work! Much appreciated.
What are the steps you conducted to get the the September image bootable with a Galileo 1 board? I think, I'm missing something..., or it is a hardware difference (Board Gen1 here).
I would like to reproduce it on my board and try to figure out what needs to be fixed.
After that, we can try to solve "NojeJS" BorisKourt
a lot of work is done. I have released new image.
Just download it and put all files to a partiton1 of your image except "image-full-quark.ext3".
And select menu item shown below:
Do not forget to copy drivers from modules-quark.tgz to rootfs after booting. And reboot after that.
Regarding nodejs I may say that I have no such problem with SSE:
You may check nodejs 4.1.0 in the last image.
But I have another problems
about "Only have Galileo Gen 2s here (Gen 1 is permanently bricked)":
if your Gen1 is alive from a hardware point of view, and the problem is only in a software,
you may try to use this tool on your Gen2 to restore Gen1:
I just extracted your latest kernel build into my image and somehow could boot on my Galileo-Gen1 board. I accidentally forgot to copy the ".efi" files to the boot partition. Moreover, it seems that it is now "rootpartition=mmcblk0p2" instead of "real_root=..." in grub.conf. With that the mount of the on-SD card partition (mmcblk0p2) is possible, the kernel boots... so far so good
something is going wrong with bringing up eth0 and thus no DHCP/SSH which i depend on to manage the Galileo board afterwards (remember: no serial debugging cable :/). Did you have the same issue when you meant "But I have another problems"? No DHCP/SSH? With the previous oldskool kernel 3.8.13 it worked like a charm.
From the kernel log in /var/log/dmesg I can find:
eth0: PHY ID 20005c90 at 1 IRQ POLL (stmmac-1:01) active
which reads pretty "ok" so far. Still, the rest of DHCP/SSH seems to go wrong?!
yes,I have added new option 'rootpartition' in grub.conf to load rootfs from a partition.
I have never saw any problem with an ethernet driver for Kernel 3.19.2.
DHCP client is out of Linux Kernel. It is related with your rootfs image.
In my case eth0 works good, but DHCP does not work. But I know a workaround
Ok, that's interesting and strange at the same time... Obviously, your workaround is only useful for people with serial access , we all love if dhcpcd just works during boot and brings up some connectivity...
hmmm, I guess, dhcpcd needs different parameters at boot time to work with kernels 3.19 (or a little newer)... I will try to investigate on that and probably will just have a fixed IP config in my local setup. Ideas welcome, though.
xbolshe BorisKourt cc:/ cgkades sebby3000
I got the new 3.19.2-xbolshe kernel working AND correct DHCP / SSH running after boot. Time is set correctly via ntp-date as well . The trouble was caused by an issue with rc-runlevel config of dhcpcd vs. net.eth0 scripts which screwed up the ipv4 address lease process and made eth0 unusable (I guess, this was caused by an update of OpenRC or udev). Finally, all this is solved now and we will have a newer kernel integrated in my next release - credits xbolshe
I also removed the old "intel_cln_gip" module that was only present in the 3.8.x kernels so far. I think we are a step closer here for a sane October release of that image.
- as requested by BorisKourt I emerged the packages pciutils, lshw, wpa_supplicant, rfkill to give others those tools for debugging/checking individual hardware
- as mentioned by xbolshe I switched to en_US.UTF-8 as default localization of the Gentoo image
Things to do:
- emerge nodejs ?
- any other wishes / ideas what to add/change ?