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

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "{{InfoBoxTop}} {{Applies To Diva}} {{Applies To Yocto}} {{InfoBoxBottom}} == History == {| class="wikitable" border="1" !Version !Date !DIVELK version !Notes |- |3.0.0 |Jun...")
 
(Build DIVELK Yocto BSP)
Line 92: Line 92:
  
 
<pre class="workstation-terminal">
 
<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 fb
+
dvdk@vagrant-ubuntu-trusty-64:~/diva$ source diva-bsp-init-env.sh
dvdk@vagrant-ubuntu-trusty-64:~/diva$ bitbake diva-image-networking
+
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake divelk-image-matrix
 
</pre>
 
</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''.
 
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''.
  
=== Build additional packages ===
+
To build an SDK that can be used with Eclipe Yocto ADT, use a image based SDK, e.g.:
 
 
To build additional packages the user must first enter the directory where the <code>diva-bsp-init-env.sh</code> is placed and source it
 
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
dvdk@vagrant-ubuntu-trusty-64:~/diva$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build-fb -e fb
+
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake -c populate_sdk divelk-image-devel
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$
 
 
</pre>
 
</pre>
  
And then can run any of the [http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#usingpoky-components-bitbake bitbake] command.
+
=== Build the Qt5 image ===
 +
 
 +
To build an SDK that can be used with QT Creator to build QT5 applications, use the following target:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake memtester
+
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake meta-toolchain-arago-tisdk
 
</pre>
 
</pre>
  
The resulting packages (the default format is ipk) can be found inside ''build/tmp/deploy/rpm''.
+
=== Other images ===
  
<pre class="workstation-terminal">
+
divelk-image-devel: a small image with some useful development and debugging tools
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ ls -l tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester*
+
divelk-image-networking: based on divelk-image-devel, add lots of networking tools
-rw-r--r-- 1 dvdk dvdk  9967 Sep  7 05:43 tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester-4.1.3-r0.cortexa7hf_vfp_neon.rpm
+
 
-rw-r--r-- 1 dvdk dvdk 25544 Sep  7 05:43 tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester-dbg-4.1.3-r0.cortexa7hf_vfp_neon.rpm
+
=== Build additional packages ===
-rw-r--r-- 1 dvdk dvdk  2884 Sep  7 05:42 tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester-dev-4.1.3-r0.cortexa7hf_vfp_neon.rpm
+
 
-rw-r--r-- 1 dvdk dvdk  5611 Sep  7 05:44 tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester-doc-4.1.3-r0.cortexa7hf_vfp_neon.rpm
+
To build additional packages the user must first enter the directory where the <code>diva-bsp-init-env.sh</code> is placed and source it
</pre>
+
 
 +
And then can run any of the [http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#usingpoky-components-bitbake bitbake] command.

Revision as of 14:29, 20 June 2017

Info Box
Diva-am335x-overview.png Applies to Diva
Yocto-logo.png Applies to Yocto

History[edit | edit source]

Version Date DIVELK version Notes
3.0.0 Jun 2017 DIVELK 3.0.0

Quick reference[edit | edit source]

Repository Information
Repository BSP Manifest Yocto BSP Layer
URL git@git.dave.eu:diva/diva-bsp.git git@git.dave.eu:diva/meta-diva.git
stable branch diva-fido diva-fido
stable tag divelk-3.0.0 divelk-3.0.0
Build targets
Name Description
divelk-image-qt5 QT5.x support
divelk-image-devel minimal for development/debugging image
divelk-image-networking based on divelk-image-devel plus networking tools
divelk-image-matrix based on TI matrix GUI rfs


This is a quickstart guide to build Yocto BSP for DIVA SOM, to rebuild the binaries (u-boot, linux kernel, root file system) provided with DIVELK releases.

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

Build System prerequisite[edit | edit source]

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

Initialize the build environment[edit | edit source]

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

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-fido
dvdk@vagrant-ubuntu-trusty-64:~/diva$ ./repo sync

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@vagrant-ubuntu-trusty-64:~/diva$ source diva-bsp-init-env.sh
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake divelk-image-matrix

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.

To build an SDK that can be used with Eclipe Yocto ADT, use a image based SDK, e.g.:

dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake -c populate_sdk divelk-image-devel

Build the Qt5 image[edit | edit source]

To build an SDK that can be used with QT Creator to build QT5 applications, use the following target:

dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake meta-toolchain-arago-tisdk

Other images[edit | edit source]

divelk-image-devel: a small image with some useful development and debugging tools
divelk-image-networking: based on divelk-image-devel, add lots of networking tools

Build additional packages[edit | edit source]

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

And then can run any of the bitbake command.