Hello all,
Since I do not like Yocto (high learning curve, defaults which makes no sense to my requirements etc, long compile times) I build my own BSP for our Galileo gen2 based prototype.
I did this just by using vanilla (open source) components available from the web.
To get started, I fetched crosstool-ng (crosstool-ng/crosstool-ng at 1.20 · GitHub) for building the cross-toolchain. I have put the attached configuration (crosstool-ng.config -> rename to .config in crosstool directory) in it and run:
ct-ng build
I put everything in /opt/cross/quark/toolchain because all my other cross-toolchains are there as well, since it is open source, you can choose what fits yourselves best.
The toolchain has to be build only once, after that you can reuse it, tarbal and/or distribute it (only if the other machines have the same dynamic libraries, else build it again there as well).
The next step would be to clone the Linux kernel from git.kernel.org. I like to use git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git and branch linux-4.0.y . The Intel Quark/Galileo board has been partially supported since some where between 3.19.x and 4.0.y . Not all hardware is ported upstream as of yet, but I do not use the SRAM and/or other missing devices yet.
Copy the attached linux kernel config to the linux source and rename it to .config
Type make menuconfig (or xconfig or whatever you like) and check if the configuration suits your own needs, do not forget to save any changes.
Type make bzImage modules -j<whatever-the-number-of-cpus/threads-you-have+2>
When no errors occur, your kernel + modules are now ready. Keep them here for putting a working image together later.
Now we have our toolchain + kernel, we need to build some root filesystem. I like to use buildroot for that. Buildroot is able to use the cross-toolchain build from above using the attached configuration (buildroot.config).
Clone buildroot git://git.busybox.net/buildroot and rename attached buildroot.config to .config
Run make menuconfig -> you can enable more packages as your requirments need
type make and wait for buildroot to complete.
When no errors occur, our primary/base root filesystem is ready.
Now we have to assemble all this into one working image. What is needed to boot from the microSD card in the Galileo using the default SPI firmware is a directory /boot/grub/grub.cfg on the first partition of the sd card. You can use a loop for building an image locally or use the genext2fs tool from buildroot. For simplicity, I only explain using a real microSD card. Partition it with one primary partition of type linux (83). Make a ext4 filesystem on it. Mount it:
create directory /boot/grub on it and put attached grub.conf on it.
Also extract the buildroot create tar file onto the sd card (if you like, make sure the filepermissions (root:root) are kept in tact).
copy the kernel image linux/arch/x86/boot/bzImage to /boot/linux
if required, also copy the kernel modules to the correct folder (create if needed) on the microsd card (/lib/modules/<kernel-version>/*)
unmount microsd card, put in galileo
boot and see for yourself.
If anyway has questions I will be willing to answer them here. Please excuse my spelling errors...
Have a nice Galileo hacking time!