Difference between revisions of "Building the Yocto BSP (XELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
m (Build Axel Yocto BSP)
m
Line 6: Line 6:
  
 
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.
 
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.
 +
 +
Since the XELK virtual machine is already configured to match all the requirements for using the Yocto build system, developers who wants to quickly build a Yocto image can directly go to section 4.4.3.
  
 
For more information regarding Yocto build system, go to its [[:Category:Yocto|dedicated category page]]
 
For more information regarding Yocto build system, go to its [[:Category:Yocto|dedicated category page]]
Line 21: Line 23:
  
 
=== Build Axel Yocto BSP ===
 
=== Build Axel Yocto BSP ===
 +
 +
==== Initializing the build environment ====
  
 
Bora Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories to build  
 
Bora Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories to build  
Line 33: Line 37:
 
</pre>
 
</pre>
  
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.
+
==== 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:
 +
 
 +
<pre class="workstation-terminal">
 +
dvdk@dvdk-vm:~/belk$ source axel-bsp-init-env.sh build
 +
dvdk@dvdk-vm:~/belk/build$ bitbake base-rootfs-image
 +
</pre>
  
 
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''.
 
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''.

Revision as of 11:35, 26 November 2014

Info Box
Axel-04.png Applies to Axel Ultra
Axel-lite 02.png Applies to Axel Lite
Yocto-logo.png Applies to Yocto

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.

Since the XELK virtual machine is already configured to match all the requirements for using the Yocto build system, developers who wants to quickly build a Yocto image can directly go to section 4.4.3.

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

Build System prerequisite[edit | edit source]

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[edit | edit source]

Initializing the build environment[edit | edit source]

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

dvdk@dvdk-vm:~/belk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
dvdk@dvdk-vm:~/belk$ chmod a+x repo
dvdk@dvdk-vm:~/belk$ ./repo init -u git@git.dave.eu:dave/axel/axel-bsp.git -b axel
dvdk@dvdk-vm:~/belk$ ./repo sync
dvdk@dvdk-vm:~/belk$ source axel-bsp-init-env.sh build
dvdk@dvdk-vm:~/belk/build$ bitbake base-rootfs-image

Build the Yocto image[edit | edit source]

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:~/belk$ source axel-bsp-init-env.sh build
dvdk@dvdk-vm:~/belk/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[edit | edit source]

To build additional packages the user must first enter the directory where the bora-bsp-init-env.sh is placed and source it

dvdk@dvdk-vm:~/xelk$ source bora-bsp-init-env.sh build
dvdk@dvdk-vm:~/xelk/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