170
edits
Changes
no edit summary
{{Applies To Yocto}}
{{InfoBoxBottom}}
{{ImportantMessage|text=As the DIVELK kit is based on Yocto, the implementation of the MVM follows the approach described [[Managed_Virtual_Machine_(MVM)#Yocto-based_Linux_distribution|here]]. As such, the reading of [[Managed_Virtual_Machine_(MVM)#Yocto-based_Linux_distribution|this section]] is highly recommended.
}}
== History ==
!Notes
|-
|{{oldid|7096|3.0.0}}
|Jun 2017
|[[Diva_Embedded_Linux_Kit_(DIVELK)#DIVELK_3.0.0|DIVELK 3.0.0]]
|
|-
|-
|4.0.0
|Apr 2018
|[[Diva_Embedded_Linux_Kit_(DIVELK)#DIVELK_4.0.0|DIVELK 4.0.0]]
|
|-
|-
! stable branch
| diva-fidomorty| diva-fidomorty
|-
! stable tag
| divelk-34.0.0| divelk-34.0.0
|}
| divelk-image-devel
| minimal for development/debugging image
|-
| divelk-image-matrix
|}
==Introduction==
This is a quickstart guide to build Yocto BSP for DIVA SOM, to rebuild the binaries (uU-bootBoot, linux Linux kernel, root file system) provided with the DIVELK releases.
For more information regarding the Yocto build system, go to its [[:Category:Yocto|dedicated category page]]
== Build System prerequisite system prerequisites ==
DIVELK MVM is already configured to build this Yocto version/configuration, however , users typically don't use a VirtualBox VM for Yocto builds for performance reasons.
You can refer to [http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#yp-resources Yocto manual setup section] for a list of supported Linux distribution and their configuration to create your own build environment on your favorite distribution.
== Build Building the DIVELK Yocto BSP == === Toolchain ===To build DIVELK BSP first you need to download Linaro toolchain from https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz install it and add it to the PATH.
=== Initialize the build environment ===
dvdk@vagrant-ubuntu-trusty-64:~/diva$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
dvdk@vagrant-ubuntu-trusty-64:~/diva$ chmod a+x repo
dvdk@vagrant-ubuntu-trusty-64:~/diva$ ./repo init -u git@git.dave.eu:diva/diva-bsp.git -b diva-fidomorty
dvdk@vagrant-ubuntu-trusty-64:~/diva$ ./repo sync
</pre>
=== Build the Yocto BSP 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)
<pre class="workstation-terminal">
dvdk@vagrant-ubuntu-trusty-64:~/diva$ DISTRO=fsl-imx-fb MACHINE=diva source diva-bsp-init-env.sh -b build-fb -e fbdvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake divadivelk-image-networkingmatrix
</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/diva''.
<pre class="workstation-terminal">
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh bitbake -b buildc populate_sdk divelk-fb image-e fbdvdk@vagrant-ubuntu-trusty-64:~/diva/build$devel
</pre>
<pre class="workstation-terminal">
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake memtestermeta-toolchain-arago-tisdk
</pre>
=== Build additional packages === To build additional packages the user must first enter the directory where the <pre class="workstation-terminal"code>dvdk@vagrantdiva-ubuntubsp-trustyinit-64:~env.sh</diva/build$ ls -l tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester*code> is placed and source it -rw-r--r-- 1 dvdk dvdk 9967 Sep 7 05And then can run any of the [http:43 tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester-4.1.3-r0www.cortexa7hf_vfp_neonyoctoproject.rpm-rw-r--r-- 1 dvdk dvdk 25544 Sep 7 05:43 tmporg/deploydocs/rpmlatest/cortexa7hf_vfp_neon/memtester-dbg-4.1.3-r0.cortexa7hf_vfp_neon.rpm-rw-r--r-mega- 1 dvdk dvdk 2884 Sep 7 05:42 tmpmanual/deploy/rpm/cortexa7hf_vfp_neon/memtester-dev-4.1.3mega-r0manual.cortexa7hf_vfp_neon.rpm-rw-r--r-- 1 dvdk dvdk 5611 Sep 7 05:44 tmp/deploy/rpm/cortexa7hf_vfp_neon/memtesterhtml#usingpoky-doccomponents-4.1bitbake bitbake] command.3-r0.cortexa7hf_vfp_neon.rpm</pre>