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

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with " {{ImportantMessage|text=As the SDVX kit is based on Yocto, the implementation of the MVM follows the approach described Managed_Virtual_Machine_(MVM)#Yocto-based_Linux_dist...")
 
Line 73: Line 73:
 
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.
 
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 the SDVX Yocto BSP ==
 
 
=== Initialize the build environment ===
 
 
SDVX Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories to build
 
 
<pre class="workstation-terminal">
 
 
{{ImportantMessage|text=As the XELK 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 ==
 
 
{| class="wikitable" border="1"
 
!Version
 
!Date
 
!XUELK version
 
!Notes
 
|-
 
|{{oldid|6403|1.0.0}}
 
|December 2016
 
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_1.1.0|XUELK 1.1.0]]
 
|
 
|-
 
|{{oldid|7093|1.2.0}}
 
|May 2017
 
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_1.2.0|XUELK 1.2.0]]
 
|
 
|-
 
|-
 
|2.0.0
 
|Sep 2017
 
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_2.0.0|XUELK 2.0.0]]
 
|
 
|-
 
|}
 
 
== Quick reference ==
 
 
{| class="wikitable" border="1"
 
|+Repository Information
 
|-
 
! Repository
 
| BSP Manifest
 
| Yocto BSP Layer
 
|-
 
! URL
 
| git@git.dave.eu:lynx/lynx-bsp.git
 
| git@git.dave.eu:lynx/meta-lynx.git
 
|-
 
! stable branch
 
| lynx-krogoth
 
| lynx-krogoth
 
|-
 
! stable tag
 
| xuelk-2.0.2
 
| xuelk-2.0.2
 
|-
 
|}
 
 
{| class="wikitable" border="1"
 
|+Build targets
 
! Name
 
! Description
 
|-
 
| lynx-image-qt5
 
| QT5.x support
 
|-
 
| lynx-image-devel
 
| minimal for development/debugging image
 
|-
 
| lynx-image-networking
 
| based on lynx-image-devel plus networking tools
 
|-
 
| lynx-image-core
 
| minimal working image with SSH
 
|-
 
| lynx-image-gui
 
| based on lynx-image-core with additional tools to support the graphical environment
 
|}
 
 
==Introduction==
 
This is a quickstart guide to build Yocto BSP for Axel ULite SOM and SBC Lynx, to rebuild the binaries (u-boot, linux kernel, root file system) provided with XUELK releases.
 
 
For more information regarding Yocto build system, go to its [[:Category:Yocto|dedicated category page]]
 
 
== Build System prerequisites ==
 
 
XUELK 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 the XUELK Yocto BSP ==
 
== Build the XUELK Yocto BSP ==
Line 169: Line 78:
 
=== Initialize the build environment ===
 
=== Initialize the build environment ===
  
XUELK Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories to build  
+
SDVX Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories to build  
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
Line 187: Line 96:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build
+
dvdk@ubuntu-xenial:~/sdvx$ DISTRO=fsl-imx-fb MACHINE=sdvx-ul source sdvx-setup-release.sh -b build-ul
dvdk@dvdk-vm:~/lynx/build$ bitbake lynx-image-networking
+
dvdk@ubuntu-xenial:~/sdvx/build-ul$ bitbake dave-image-networking
 
</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/sbc-lynx''.
+
The resulting files (kernel, devicetree and u-boot binaries, plus .tar.gz root file system) will then be available inside ''build/tmp/deploy/images/sdvx-ul''.
  
 
===Generating the SDKs===
 
===Generating the SDKs===
Line 203: Line 112:
 
=== Build additional packages ===
 
=== Build additional packages ===
  
To build additional packages the user must first enter the directory where the <code>lynx-setup-release.sh</code> is placed and source it
+
To build additional packages the user must first enter the directory where the <code>sdvx-setup-release.sh</code> is placed and source it
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build
+
dvdk@ubuntu-xenial:~/sdvx$ DISTRO=fsl-imx-fb MACHINE=sdvx-ul source sdvx-setup-release.sh -b build-ul
dvdk@dvdk-vm:~/lynx/build$
+
dvdk@ubuntu-xenial:~/sdvx/build-ul $
 
</pre>
 
</pre>
  
Line 219: Line 128:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx/build-ul$ ls -l tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester*
+
dvdk@ubuntu-xenial:~/sdvx/build-ul$ ls -l tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester*
 
-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  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
 
-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
Line 231: Line 140:
 
</pre>
 
</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)
 
 
Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:
 
 
<pre class="workstation-terminal">
 
dvdk@ubuntu-xenial:~/sdvx$ DISTRO=fsl-imx-fb MACHINE=sdvx-ul source sdvx-setup-release.sh -b build-ul
 
dvdk@ubuntu-xenial:~/sdvx/build-ul$ bitbake dave-image-networking
 
</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/sbc-lynx''.
 
  
 
===Generating the SDKs===
 
===Generating the SDKs===

Revision as of 09:47, 6 September 2018


200px-Emblem-important.svg.png

As the SDVX 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.

History[edit | edit source]

Version Date SDVX version Notes

1.0.0

September 2018 SDVX-1.1.0

Quick reference[edit | edit source]

Repository Information
Repository BSP Manifest Yocto BSP Layer
URL git@git.dave.eu:sdvx/sdvx-bsp.git git@git.dave.eu:sdvx/meta-sdvx.git
stable branch krogoth krogoth
stable tag sdvx-1.0.0 sdvx-1.0.0
Build targets
Name Description
sdvx-image-qt5 QT5.x support
sdvx-image-devel minimal for development/debugging image
sdvx-image-networking based on sdvx-image-devel plus networking tools
sdvx-image-core minimal working image with SSH
sdvx-image-gui based on sdvx-image-core with additional tools to support the graphical environment

Introduction[edit | edit source]

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

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

Build System prerequisites[edit | edit source]

SDVX 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 the XUELK Yocto BSP[edit | edit source]

Initialize the build environment[edit | edit source]

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

dvdk@dvdk-vm:~/lynx$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
dvdk@dvdk-vm:~/lynx$ chmod a+x repo
dvdk@dvdk-vm:~/lynx$ ./repo init -u git@git.dave.eu:lynx/lynx-bsp.git -b lynx-krogoth
dvdk@dvdk-vm:~/lynx$ ./repo sync

Build the Yocto BSP 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@ubuntu-xenial:~/sdvx$ DISTRO=fsl-imx-fb MACHINE=sdvx-ul source sdvx-setup-release.sh -b build-ul
dvdk@ubuntu-xenial:~/sdvx/build-ul$ bitbake dave-image-networking

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

Generating the SDKs[edit | edit source]

After creating an image as described above, the corresponding SDK can be generated by issuing the following command:

bitbake <target-image-name> -c populate-sdk

Again, replace <target-image-name> with one of the images listed in here.

Build additional packages[edit | edit source]

To build additional packages the user must first enter the directory where the sdvx-setup-release.sh is placed and source it

dvdk@ubuntu-xenial:~/sdvx$ DISTRO=fsl-imx-fb MACHINE=sdvx-ul source sdvx-setup-release.sh -b build-ul
dvdk@ubuntu-xenial:~/sdvx/build-ul $

And then he can run any of the bitbake commands.

dvdk@dvdk-vm:~/sdvx/build-ul$ bitbake memtester

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

dvdk@ubuntu-xenial:~/sdvx/build-ul$ ls -l tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester*
-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
-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

dvdk@ubuntu-xenial:~/sdvx$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo dvdk@ubuntu-xenial:~/sdvx$ chmod a+x repo dvdk@ubuntu-xenial:~/sdvx$ ./repo init -u git@gitlab.lan.dave.eu:sdvx/sdvx-bsp.git -b sdvx-krogoth dvdk@ubuntu-xenial:~/sdvx$ ./repo sync


Generating the SDKs[edit | edit source]

After creating an image as described above, the corresponding SDK can be generated by issuing the following command:

bitbake <target-image-name> -c populate-sdk

Again, replace <target-image-name> with one of the images listed in here.

Build additional packages[edit | edit source]

To build additional packages the user must first enter the directory where the lynx-setup-release.sh is placed and source it

dvdk@dvdk-vm:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build
dvdk@dvdk-vm:~/lynx/build$

And then he can run any of the bitbake commands.

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

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

dvdk@dvdk-vm:~/lynx/build$ ls -l tmp/deploy/rpm/cortexa7hf_vfp_neon/memtester*
-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
-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