Contents:
Part1 : Environment setup and initial build
Part2 : Build u-boot using Yocto
Part3 : Build Kernel using Yocto     <-- You are here
Part4 : Package Development using Yocto
Part5 : Application Development using ADT

 

In the previous blog we have build uboot for Riotboard.

 

The blog will walkthrough the process of fetch,configure,compile and build kernel for i.MX6 Riotboard  using yocto bitbake tool .

 

Setting up yocto for Riotboard:

~$ cd fsl-arm-yocto-bsp

~/fsl-arm-yocto-bsp$  MACHINE=riotboard source fsl-setup-release.sh -b build -e fb

~/fsl-arm-yocto-bsp/build$

 

All the commands henceforth are executed from build directory after above MACHINE configuration.

 

Locating available riotboard specific recipes:

~/fsl-arm-yocto-bsp/build$ bitbake -s | grep linux

2eq8k03.jpg

 

we will select the first one : linux-riotboard (3.10.17 version)

 

 

Kernel source directory :

/build/tmp/work/riotboard-poky-linux-gnueabi/linux-riotboard/3.10.17-r0/git

 

 

Kernel recipe location :

/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-riotboard_3.10.17.bb

 

 

Configuring the Kernel :

~/fsl-arm-yocto-bsp/build$ bitbake -c menuconfig linux-riotboard

 

Generate Kernel Image

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard

 

the newly build kernel uImage:

/build/tmp/deploy/images/riotboard

2s6am1f.jpg

 

Along with the uImage we got a  uImage-imx6solo_RIoTboard.dtb  device tree blob.

More information on DTB here and here.

 

We will build kernel stepwise while going through the yocto build system.

I am aggregating the  build steps here, for detailed info plz check Yocto Documentation.

 

 

Getting list of all task  to-be-executed  during  kernel build:

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c listtasks

vf8dxs.jpg

 

From the yocto website we can execute below tasks for kernel build.

28nn7n.jpg

 

clean up build directory: (not everytime)

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c clean -f

 

fetch linux tarball:

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c fetch -f

 

from the kernel receipe linux-riotboard_3.10.17.bb, its clear it pulls from embest github repo.

wgvwbr.jpg

 

With the Riotboard patches being pushed to mainline kernel, you can configure it to get mainline support.

kernel.org/pub/linux/kernel/git/stable/linux-stable.git

 

if you have a local source the SRC_URI can be changed to :

SRC_URI = "file://<CUSTOM_LINUX_TARBALL>"

 

unpack the source :

This will populate the git folder “tmp/work/riotboard-poky-linux-gnueabi/linux-riotboard/3.10.17-r0/git” with kernel source code.

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c unpack -f

 

Configure kernel :

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c menuconfig -f

a new window will pop-up and you can Configure kernel by enable/disable various options available.

106cyv6.jpg

 

Compile the kernel.

This will generate kernel image, modules and dtb.

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c compile -f

 

Now Deploy only the kernel.

~/fsl-arm-yocto-bsp/build$ bitbake linux-riotboard -c deploy -f

 

you will find the below newly created files in tmp/deploy/images/riotboard

 

2ugoqc2.jpg

 

Okay that's all for now , Next time we build a simple package using the yocto platform .