As a software guy not used to playing much with hardware, I decided this weekend to try and set up the galileo so that I could do coding directly on the board - since it is a x86 PC after all. Therefore I decided to see about installing a "regular", "full-fat" linux distribution on the board, so I could use regular make and gcc on the board, and choose from a wide variety of precompiled packages.
Given the instruction set support of the galileo, the options for distro to use are limited since many 32-bit distributions assume an i686. :-( My initial choice was slackware, but after some thought I decided that having apt-get was just too useful to miss out on, so went with debian. Given the issues already described in other discussions on this forum of trying to boot arbitrary kernels from the galileo grub menu, I decided that the easy way to try and get things working was to use the existing yocto image and kernel and just replace the root filesystem. Here is roughly what I did.
- Got the clanton sd-card image from the galileo site up and running, with console displayed over serial port
- Set up a simple vm in virtualbox, and installed a minimal debian linux image in it.
- Then on the sd card with my clanton image created a 4GB empty file, and ran mkfs.ext3 on it to create a filesystem
- Then I mounted that filesystem in loopback mode and rsynced the root filesystem from the vm into there. Some cleanup was then needed, e.g. delete and create new empty /sys and /proc directories.
- Mounted the image-clanton-full.ext3 file from the sd card also as a loopback filesystem and copied over from there the /lib/modules/<kernel-version> folder so that the kernel modules would be accessible.
- Unmounted both loopback filesystems, and moved the clanton image file to a ".bak" file and renamed the new debian root filesystem to take its place.
- Put SD card into galileo and boot.
At that point, things mostly worked ok. Was missing a couple of directories that I had to create on the filesystem that were needed for mount points, e.g. the "realroot" mount point. Debian didn't output a console to serial line by default so had to connect in via ssh as root (thankfully I had installed ssh in the vm before copying the disk image!), but a quick edit of /etc/inittab fixed that - once I realised it was ttyS1 rather than ttyS0 I needed.
In summary. The good:
- Galileo runs debian.
- "apt-get install build-essential" just works. Doesn't take excessively long either.
- Running vim, gcc and make then seems to work fine for the couple of basic pieces of C code I tried writing. Building a slightly larger software package didn't seem excessively slow either.
- did I mention apt-get?
1 Certain packages/binaries have seg-faults in libpthread. No idea what is causing this as haven't had a chance to investigate yet. This has caused the following problems for me:
* I can't ssh to the galileo as a non-root user. Connecting as root works fine, and connecting as a regular user over serial works ok though
* some startup server daemons fail to run, e.g. ntpd, which is ok so long as they aren't ones I really want.
2 No kernel headers installed so compiling kernel modules against the yocto kernel image is not yet possible.
So, anyone else tried getting a grown-up linux distro onto the galileo board, and seen any similar or other issues?