Building the Yocto BSP (XELK)

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Axel-04.png Applies to Axel Ultra
Axel-lite 02.png Applies to Axel Lite
Axel-02.png Applies to AXEL ESATTA
Yocto-logo.png Applies to Yocto

200px-Emblem-important.svg.png As the XELK kit is based on Yocto, the implementation of the MVM follows the approach described here. As such, the reading of this section is highly recommended. 200px-Emblem-important.svg.png


This is a quickstart guide to build Yocto BSP for Axel SOMs, to rebuild the binaries (U-Boot, Linux kernel, root file system) provided with XELK releases.

For more information regarding Yocto build system, go to its dedicated category page

Build System prerequisites

Please read the Yocto manual setup section for a list of supported Linux distribution and their configuration.

DAVE Embedded System uses a standard Ubuntu 12.04.4 LTS Server 64 bit distribution plus the following additional packages:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
     build-essential chrpath socat libsdl1.2-dev xterm

Build AXEL Yocto BSP

Initialize the build environment

AXEL Yocto BSP uses git-repo tool to fetch all the required git repositories to build

dvdk@dvdk-vm:~/xelk$ curl > repo
dvdk@dvdk-vm:~/xelk$ chmod a+x repo
dvdk@dvdk-vm:~/xelk$ ./repo init -u -b axel-dora
dvdk@dvdk-vm:~/xelk$ ./repo sync
dvdk@dvdk-vm:~/xelk$ source -m xelk-l -p package_rpm -b build -e x11
dvdk@dvdk-vm:~/xelk/build$ bitbake axel-fsl-image-x11

Build the Yocto image

Please note that even the basic root file system requires a few hours to build on a mid-hi range desktop (4-6 cores, 8-12 GiB RAM) also depending on your Internet connection speed (all sources are fetched from the network). Nearly 20GiB of disk space is required for the build. Moreover, building inside the DVDK adds some overhead, since the performances of a virtual machine are reduced if compared to the physical hardware. Thus, it's recommended to check the hardware capabilities of the host system and, when building with Yocto is required, developers should consider the following options:

  • migrating the build system to a physical machine
  • assuming that the host system has the required resources, extending the hardware capabilities of the default DVDK (eg: adding more cores and disk space)

Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:

dvdk@dvdk-vm:~/xelk$ source build
dvdk@dvdk-vm:~/xelk/build$ bitbake base-rootfs-image

The resulting files (kernel, devicetree and u-boot binaries, plus .tar.gz root file system) will then be available inside build/tmp/deploy/images/axel.

Build additional packages

To build additional packages the user must first enter the directory where the is placed and source it

dvdk@dvdk-vm:~/xelk$ source build

And then can run any of the [bitbake] command.

dvdk@dvdk-vm:~/xelk/build$ bitbake memtester

The resulting packages (the default format is ipk) can be found inside build/tmp/deploy/ipk.

dvdk@dvdk-vm:~/xelk/build$ ls -l tmp/deploy/ipk/armv7a-vfp-neon/memtester*
-rw-r--r-- 2 dvdk dvdk  7102 Aug 26 16:33 tmp/deploy/ipk/armv7a-vfp-neon/memtester_4.1.3-r0_armv7a-vfp-neon.ipk
-rw-r--r-- 2 dvdk dvdk 21720 Aug 26 16:33 tmp/deploy/ipk/armv7a-vfp-neon/memtester-dbg_4.1.3-r0_armv7a-vfp-neon.ipk
-rw-r--r-- 2 dvdk dvdk   792 Aug 26 16:33 tmp/deploy/ipk/armv7a-vfp-neon/memtester-dev_4.1.3-r0_armv7a-vfp-neon.ipk
-rw-r--r-- 2 dvdk dvdk  2748 Aug 26 16:33 tmp/deploy/ipk/armv7a-vfp-neon/memtester-doc_4.1.3-r0_armv7a-vfp-neon.ipk