Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
5,212 Views

[Update] Galileo Gentoo Linux dd-Image freely available - 08-2016

Dear everybody,

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:

https://download.mi.hs-heilbronn.de/galileo/galileo-gentoo-4GB-GPIO-kernel-3.19.2-gcc4.9.3-20160805.... https://download.mi.hs-heilbronn.de/galileo/galileo-gentoo-4GB-GPIO-kernel-3.19.2-gcc4.9.3-20160805....

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):

 

gentoo/gentoo4ever

root/

CHANGELOG:

2016

August

- 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

2015

Oktober

- 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)

- hint:

nodeJS is NOT integrated, as it won't run (and: compile) due to missing SSE2 extension in quark soc

September

- updated openssl to 1.0.2d

- added "htop" system monitor

- latest updates as in Gentoo's Portage tree (date: 2015-09-22)

June

- updated openssl to 1.0.1m

- latest updates as in Gentoo's Portage tree (date: 2015-06-01)

 

- various other system (security) fixes

 

2014

November

- compiled and installed a non-Yocto kernel for the Galileo board - based on official vanilla sources in version 3.8.13 taken from http://www.kernel.org/ http://www.kernel.org

- 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

October

- fixed critical bash issues - including latest security patches by Gentoo

- added support for serial console as proposed by Kazu-Zamasu

July

- 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...

45 Replies
Highlighted
Beginner
132 Views

That would be more detailed instructions on how to install gentoo galileo

0 Kudos
Highlighted
Novice
132 Views

As explained in the original post, you can install the Gentoo image:

"The image can be copied over to any >4GB microSD card like so:

gunzip -c galileo-gentoo-4GB-GPIO-20140721.img.gz | dd of=/dev/ bs=10m"

 

This command can ONLY be called on MacOs or Linux/Unix derivates. If on Windows you need to look for a tool which let's you copy "dd"-Images onto SD-Cards.

0 Kudos
Highlighted
Community Manager
132 Views

Hello!

I try to your Gentoo image. But, not working my Galileo. My Galileo firmware is newest version.

Please look following URL gist. This is Galileo Serial Console boot-log. last result is "Error 17 Cannot mount selected partition"

https://gist.github.com/Kazu-zamasu/d535c4234dea1fae0725 Galileo-Gentoo

I have experience same error, this situation is "Newest Galileo Yoct kernel + Debian" "Previous Galileo Yoct Kernel + Debian" is good.

if you can open the "image-full-clamton.ext3" gentoo image, can I Download?

I try to previous Kernel image on test the Galileo.

Regards,

0 Kudos
Highlighted
Community Manager
132 Views

0 Kudos
Highlighted
Community Manager
132 Views

I am working your Gentoo img! Thank you!!!

But, not working USB serial and RS232 serial port. I wil try improve.

0 Kudos
Highlighted
Community Manager
132 Views

Hello!

I working Galileo serial port.

Please find following. I changed to etc/inittab.

Before

# SERIAL CONSOLES

s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100

# s1:12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100

After

# SERIAL CONSOLES

# s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100

s1:12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100

But, not working USB serial. I will try improve.

this is bootlog.

https://gist.github.com/Kazu-zamasu/eab0cfa56bbc9b8de24a Gentoo-Galileo-bootlog

0 Kudos
Highlighted
Novice
132 Views

Hi Kazu-Zamasu,

I added your proposed fixes (support for serial console) into the image recently. I updated the original post for latest image (link, changes, md5sum).

Best,

 

MaWiesne
Highlighted
Novice
132 Views

Thanks for creating this! One problem, I can't seem to get the NIC to work

* Bringing up interface eth0

* ERROR: interface eth0 does not exist

* Ensure that you have loaded the correct kernel module for your hardware

* ERROR: net.eth0 failed to start

0 Kudos
Highlighted
Novice
132 Views

Hi,

I have been running the Debian now for a while, but I will try this as soon as possible.

Do you think you can use the kernel from here https://github.com/todorez/galileo-linux-stable/ https://github.com/todorez/galileo-linux-stable/ it is kernel version 3.19.2 made for Galileo.

Regards,

Sebastian

0 Kudos
Highlighted
Novice
132 Views

Hi,

Same issue here, no network available. When booting up, I can see in the serial terminal following:

* Bringing up interface eth0

* ERROR: interface eth0 does not exist

* Ensure that you have loaded the correct kernel module for your hardware

* ERROR: net.eth0 failed to start

* Setting clock via the NTP client 'ntpdate' ...

Exiting, name server cannot be used: Temporary failure in name resolution (-3) * Failed to set clock

[ !! ]

* ERROR: ntp-client failed to start

* Starting dcron ...

[ ok ]

* ERROR: cannot start netmount as net.eth0 would not start

I have attached the whole dmesg at pastebin: http://pastebin.com/Wk8DDZ5w http://pastebin.com/Wk8DDZ5w

Aside for this network issue, it looks good.

And one small thing, the installation seems to 'speak' german.

galileo ~ # lsusb

-bash: lsusb: Kommando nicht gefunden.

galileo ~ #

Regards,

Sebastian

0 Kudos
Highlighted
Novice
132 Views

I have the Ethernet issue listed above. I am also unable to enable wireless via the PCI card.

If you look below it appears that the card is registered and the driver functions. But I don't see it as an interface anywhere. (and ifup, iwconfig, or lspci are not available for me to test.)

Any suggestions?

[ 14.239675] Intel(R) Wireless WiF 14.249888] ehci-pci 0000:00:14.3: USB 2.0 started, EHCI 1.00 [ 14.255242] hub 2-0:1.0: USB hub found [ 14.255510] hub 2-0:1.0: 2 ports detected [ 14.314673] iwlwifi 0000:01:00.0: e1:00.0: enabling bus mastering [ 14.315357] iwlwifi 0000:01:00.0: irq 42 for MSI/MSI-X [ 14.340330] intel_cln_gip 0000:00:15.2: enabling device (0000 -> 0002) [ 14.340528] IOAPIC[0]: Set routing entry (1-18 -> 0xc1 -> IRQ 18 Mode:1 Active:1 Dest:1) [ 14.375889] intel_cln_gpio_probe UIO addr 0x90106000 internal_addr 0x00000000 size 3529703424 memtype 4096 [ 14.379856] intel_cq 43 for MSI/MSI-X [ 14.870357] usb 1-2: new full-speed USB device number 2 using ohci_hcd [ 15.434583] pxa2xx-spi pxa2xx-spi.0: registered master spi0 [ 15.460376] spi_master spi0: will run mes476772] pxa2xx-spi pxa2xx-spi.1: registered master spi1 [ 15.477373] spi_master spi1: will run message pump with realtime priority [ 16.264269] iwlwifi 0000:01:00.0: request for firmware file 'iwlw[0m[ 16.430287] Bluetooth: Core ver 2.16 [ 16.430768] NET: Registered protocol family 31 [ 16.430810] Bluetooth: HCI device and connection manager initialized [ 16.435644] BluetoP socket layer initialized [ 16.436061] Bluetooth: SCO socket layer initialized [ 16.486237] usbcore: registered new interface driver btusb [ 23.109664] Adding 262140k swap on /dev/mmcblk0p3. Priority:-gistered protocol family 10
0 Kudos
Highlighted
Valued Contributor II
132 Views

Hi,

have you tried to use commands like shown below?

BR,

xbolshe

0 Kudos
Highlighted
Novice
132 Views

rfkill is not available in root or gentoo users.

0 Kudos
Highlighted
Novice
132 Views

I have installed rfkill, pciutils, and wireless-tools manually. (Transfer via usb)

Rfkill only gives me:

0: hci0: Bluetooth

Soft blocked: no

Hard blocked: no

Which is interesting, because Bluetooth and Wifi are on the same intel pci card. So this means that it should have the same driver? But I don't see wifi.

0 Kudos
Highlighted
Valued Contributor II
132 Views

What is a model of WiFi adapter you use? Probably, it requires a kernel version > 3.10. Or may be need to install a firmware for WiFi adapter.

See https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi

BR,

xbolshe

0 Kudos
Highlighted
Novice
132 Views

It is the iwlwifi 6235, and works with the Intel Yocto Linux image.

When I check lsmod, it appears that a iwlwifi 'driver' is installed. Could be just missing the right version. Do you know how to check which iwlwifi drivers are actually loaded?

Also keep in mind that Ethernet is not available ether! (Which is the weirder part here.

Ill try to download the driver for 6235 and manually load it.

Thanks for your help!

PS: Bluetooth is on the same 6235 card, and is visible, does it use a separate driver?

0 Kudos
Highlighted
Valued Contributor II
132 Views

WiFi and Bluetooth drivers/firmware are separate.

It is possible to use dmesg command to see that a firmware is loaded.

BR,

xbolshe

0 Kudos
Highlighted
Novice
132 Views

That lead me on the right track. Listing steps I took for anyone else that wants to get this to work.

The following tools needed to be installed by the end of it: pciutils, lshw, wpa_supplicant, dhcpcd

pciutils: Provides access to lspci which helps with debugging the network cards

lshw: "Is a small tool to provide detailed information on the hardware configuration of the machine."

wpa_supplicant: Allows connections to wireless networks that use WPA (as well as additional wireless tools)

dhcpcd: Is a DHCP and DHCPv6 client. Needed to manage connections with most devices.

Package install:

The best way to install these without any network access is by following this: https://wiki.gentoo.org/wiki/FAQ# I_have_a_slow_.28or_no.29_Internet_connection_at_home._Can_I_download_sources_somewhere_else_and_add_them_to_my_system.3F FAQ - Gentoo Wiki

If you run: emerge -fp package/atom

It will list the download locations for the required package (and its dependencies). So running emerge -fp pciutils returns:

gentoo@galileo ~ $ emerge -fp pciutils

* Last emerge --sync was 82d 9h 34m 47s ago.

These are the packages that would be fetched, in order:

Calculating dependencies... done!

rsync://de-mirror.org/gentoo/distfiles/pciutils-3.2.0.tar.gz rsync://mirror.netcologne.de/gentoo/distfiles/pciutils-3.2.0.tar.gz rsync://mirror.opteamax.de/gentoo/distfiles/pciutils-3.2.0.tar.gz rsync://ftp.halifax.rwth-aachen.de/gentoo/distfiles/pciutils-3.2.0.tar.gz rsync://ftp.join.uni-muenster.de/gentoo/distfiles/pciutils-3.2.0.tar.gz ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.2.0.tar.gz ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.2.0.tar.gz

Note the mirror links above. Just copy one of them, ie: de-mirror.org/gentoo/distfiles/pciutils-3.2.0.tar.gz and download them on a machine with network access.

Do this for all of the dependencies (some packages will have more than just one.) Copy the archives onto a USB and transfer the files into /usr/portage/distfiles/ on the Galileo.

Important note: set the date to current date! If you don't some packages will fail to build. run date --set="23 AUG 2015 21:16:00"

From there simply run the emerge command without -fp flags. It automatically finds the downloaded archives and uses them to build all the packages.

ie: emerge pciutils

Note: This will take a long while for some packages. Grab a snack!

Driver install:

Once these are installed download the right WiFi driver for your card model from here: https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi

(if you are using an Intel card that is, searching through dmesg as mentioned by xbolshe helps. If you know its an intel card you can search by dmesg | grep iwlwifi )

You can uncompress and copy resulting files into: /lib/firmware

The final step that you will need to do should be to configure you WiFi network information. Edit: /etc/wpa_supplicant/wpa_supplicant.conf my settings:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

 

 

network={

 

ssid="YourSSID"

 

psk="your-secret-key"

 

scan_ssid=1

 

key_mgmt=WPA-PSK

 

}

Note that you can also use a command line interface to connect, (but it didn't work for me! Will try to fix.) by running wpa_cli

Finally this page helped with DHCPCD: https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD Network management using DHCPCD - Gentoo Wiki

As well as this page: <a href="https://wiki.gentoo.org/wiki/Wpa_supplicant# Setup_for_dhcpcd_as_net...

0 Kudos
Highlighted
Novice
132 Views

As a note I am 100% new to Gentoo, so this may be the worst way of going about this. But after two days it's the best I could do.

0 Kudos