Advanced use of Yocto build system (BELK/BXELK)

From DAVE Developer's Wiki
Revision as of 13:33, 29 October 2015 by U0001 (talk | contribs) (Created page with "{{InfoBoxTop}} {{Applies To Bora}} {{Applies To BoraX}} {{InfoBoxBottom}} == History == {| class="wikitable" border="1" !Version !Date !BELK version !Notes |- |1.0.0 |Novembe...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Info Box
Bora5-small.jpg Applies to Bora
BORA Xpress.png Applies to BORA Xpress

History[edit | edit source]

Version Date BELK version Notes
1.0.0 November 2015 3.0.0 First release

Instructions[edit | edit source]

It is assumed that the development environment has been set up properly as described here. The build process creates an entire Linux distribution from source. The build process can be summarized as follows: Make sure that all the prerequisites are met Initialize the build environment, as described in 3.4.7.2. Optionally ensure the conf/local.conf configuration file, which is found in the Build Directory, is set up how you want it. This file defines many aspects of the build environment including the target machine architecture through the MACHINE variable, the development machine's processor use through the BB_NUMBER_THREADS and PARALLEL_MAKE variables, and a centralized tarball download directory through the DL_DIR variable. Build the image using the bitbake command. If you want information on BitBake, see the BitBake User Manual. 3.4.7.1 Prerequisites The following prerequisites are required and only need to be done once. Some generic development tools are required on the host Linux machine: git curl build-essential diffstat texinfo gawk chrpath ia32-libs (if the host machine is running a 64-bit OS) python-m2crypto These packages can be installed with the following command: sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm It is also recommended to switch the system shell from Ubuntu's standard dash to more universal bash:

~$ sudo dpkg-reconfigure dash

3.4.7.2 Initializing the build environment In the BELK, we have simplified the Yocto initialization phase, relying on the repo tool and on a BORA bsp git repository, so that the initialization can be completed with a few commands as reported below:

~$ mkdir belk && cd belk
~/belk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
~/belk$ chmod a+x repo
~/belk$ ./repo init -u git@git.dave.eu:dave/bora/bora-bsp.git -b bora
~/belk$ ./repo sync

3.4.7.3 Build the Yocto image Please note that even building the basic root file system requires a few hours to complete the process on a mid-hi range desktop PC (4-6 cores, 8-12 GiB RAM), also depending on the Internet connection speed (all source are fetched from the network). Nearly 20GiB of disk space is required for the build. Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:

~$ cd ~/belk
~/belk$ source bora-bsp-init-env.sh build
~/belk/build$ bitbake base-rootfs-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. The resulting files (kernel, devicetree and u-boot binaries, plus .tar.gz root file system) will then be available inside build/tmp/deploy/images/bora. 3.4.7.4 Build additional packages To build additional packages the user must first enter the directory where the bora-bsp-init-env.sh is placed and source it:

~$ cd ~/belk
~/belk$ source bora-bsp-init-env.sh build

And then can run any of the bitbake commands:

~/belk/build$ bitbake memtester

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