Part1 : Environment setup and initial build <-- You are here
Part2 : Build u-boot using Yocto
Part3 : Build Kernel using Yocto
Part4 : Package Development using Yocto
Part5 : Application Development using ADT
In this blog series we will walk you through the process of getting BSP source archives, cross-compiling , generating binaries for targets , developing system packages and creating sdcard for targets using yocto tool.
A bit on yocto:
The Yocto Project is an open source project that provides templates, tools and methods to create custom Linux-based systems for embedded products.
The framework helps in cross-compilation by providing tools and packages for the build process and generation of images for target platform.
The yocto toolset has a number of recipes and it is maintained by the Yocto community and developed by Freescale for i.MX platforms.
In this blog we will build a sdcard image for Riotboard using available sources on Yocto project.
I am using an Ubuntu 14.04 32bit host for this activity.
Updating host system with required packages to support yocto build framework.
sudo apt-get install gawk wget git-core diffstat unzip texinfo libsdl1.2-dev build-essential chrpath\
sed wget cvs subversion git-core coreutils \
unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \
python-pysqlite2 diffstat help2man make gcc build-essential \
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
mercurial autoconf automake groff libtool xterm curl lzop asciidoc
We need to have a tool to pull the packages, we are using repo here :
sudo mv repo /bin/repo
sudo chmod 0755 /bin/repo
downloading yocto sources from official repository:
sudo repo init -u git://github.com/embest-tech/fsl-arm-yocto-bsp.git -b embest_imx-3.10.17-1.0.0_ga
not using sudo in the above repo command will result in below error :
Next we need to configure yocto to generate BSP images for Riotboard
~/fsl-arm-yocto-bsp$ MACHINE=riotboard source fsl-setup-release.sh -b build -e fb
A directory named build will be created inside fsl-arm-yocto-bsp .
This contains the layers/directories used by bitbake to search for recipe while building package/image.
These recipe files can be configured (later in the blog series) according to our requirement.
The Riotboard config is at : “sources/meta-fsl-arm-extra/conf/machine/riotboard.conf ”
the local.conf in build/conf can be configured to add more libraries to image (we will see that later)
~/fsl-arm-yocto-bsp/build$ cat conf/local.conf | grep 'MACHINE\|THREAD\|IMAGE'
MACHINE ??= 'riotboard'
EXTRA_IMAGE_FEATURES = "debug-tweaks"
BB_NUMBER_THREADS = '4'
IMAGE_INSTALL_append = " mysql5 "
~/fsl-arm-yocto-bsp/build$ bitbake fsl-image-fb
You will get a warning like below, which can be safely ignored
after build you will get below images in build/tmp/deploy/images/riotboard
Device Tree blob
Now the above image is ready to be flashed.
To flash sdcard image :
sudo dd if=fsl-image-fb-riotboard.sdcard of=/dev/mmcblk0 bs=1M
make sure the boot switch is set to boot from sdcard
For more instructions on sdcard setup, check here.
flashing sdcard image from windows, check here.