Support #599
Updated by Daniel Curtis over 10 years ago
{{>toc}}
This is a guide on how I compiled an image of Yocto Linux for the Intel Galileo SoC on Arch Linux.
*WARNING*: Arch Linux is not an officially supported build OS for Yocto Linux.
h2. Prepare the Environment
* Install a few prerequisite packages:
<pre>
sudo pacman -S cpio gawk wget diffstat unzip gcc-multilib texinfo chrpath socat sdl xterm
</pre>
* Install bitbake from the AUR:
<pre>
yaourt bitbake
</pre>
h3. Fix Python environment
* Create a dummy bin folder in the user directory:
<pre>
mkdir ~/bin
</pre>
#* Then add a symlink python to python2 and the config scripts in it:
<pre>
ln -s /usr/bin/python2 ~/bin/python
ln -s /usr/bin/python2-config ~/bin/python-config
</pre>
* Finally put the new folder at the beginning of your PATH variable:
<pre>
echo 'export PATH=~/bin:$PATH' >> ~/.bashrc
</pre>
h2. Download Prepare the Source Code
* Create a directory for the source code:
<pre>
mkdir ~/git && cd ~/git
</pre>
* Get the latest IoT Yocto Development Kit: version:
<pre>
git clone -b devkit-daisy git://git.yoctoproject.org/meta-intel-iot-devkit iotdk dizzy git://git.yoctoproject.org/poky.git
cd iotdk poky
</pre>
h3. Configure Intel BSP
* Get the latest Intel Board Support Packages into the Yocto directory:
<pre>
git clone git://git.yoctoproject.org/meta-intel -b dizzy
</pre>
* Source poky/oe-init-build-env script, giving it the @iot-devkit-init-build-env@ script: build directory (yocto_build) as a parameter:
<pre>
source iot-devkit-init-build-env oe-init-build-env
</pre>
h2. Build the Yocto Image
* Run bitbake to build iot-devkit-image: Edit @build/conf/local.conf@
<pre>
bitbake iot-devkit-image vi build/conf/local.conf
</pre>
#* *NOTE*: There are many types of image targets for bitbake And modify the config to use, such as: match the *genericx86* machine:
<pre>
iot-devkit-image MACHINE ?= "genericx86"
iot-devkit-prof-dev-image
iot-devkit-prof-image
iot-devkit-spi-image
</pre>
* Fix Add the grub bitbake source: meta-intel layer to the bblayers.conf file:
<pre>
nano ~/git/iotdk/meta-quark-bsp/recipes-bsp/grub/grub_0.97.bb vi build/conf/bblayers.conf
</pre>
#* And modify the SRC_URI to the following: BBLAYERS definition:
<pre>
SRC_URI = "git://github.com/intel-iot-devkit/grub-fedora.git" BBLAYERS ?= " \
/home/user/git/poky/meta \
/home/user/git/poky/meta-yocto \
/home/user/git/poky/meta-yocto-bsp \
/home/user/git/poky/meta-intel \
"
</pre>
h2. Build the Yocto Image
* (Optional) To use the Hob GUI Run bitbake to assist in building, run: build core-image-minimal:
<pre>
bitbake -u hob core-image-minimal
</pre>
h2. Resources
* http://www.yoctoproject.org/docs/1.7.1/mega-manual/mega-manual.html
* http://www.yoctoproject.org/docs/1.7.1/bsp-guide/bsp-guide.html
* http://www.yoctoproject.org/docs/1.7.1/bitbake-user-manual/bitbake-user-manual.html
* http://wiki.ros.org/IntelGalileo/HydroGalileoInitialInstall
* http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage
* https://www.yoctoproject.org/downloads