Open main menu

DAVE Developer's Wiki β

Changes

Building the Yocto BSP (BELK/BXELK)

1,313 bytes removed, 13:12, 12 September 2017
no edit summary
{{WorkInProgress}}
{{InfoBoxTop}}
{{Applies To Bora}}
}}
 
 
==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-fido
| lynx-fido
|-
! stable tag
| xuelk-1.2.0
| xuelk-1.2.0
|}
 
{| class="wikitable" border="1"
|+Build targets
! Name
! Description
|-
| bora-image
| Minimal image
|-
| bora-image-devel
| This image include tools for development/debugging
|-
| bora-image-networking
| In addition <code>bora-image-devel</code>, this image provides several networking tools
|-
|<code>lynx-image-networking-sbc-lynx-xeno</code>
|With respect to the <code>lynx-image-networking</code> image, this includes additional libraries required to run the Linux kernel featuring the Xenomai real-time extension. For more details about it, please refer to https://xenomai.org/.
|}
==Introduction==
{{ImportantMessage|text=This process requires a lot of hardware resources in terms of disk storage, RAM, and processing power. For this reason, it also is recommended to consider the use of a physical machine. For more details on this topic, please refer to [[Advanced_use_of_Yocto_build_system_(BELK/BXELK)|this document]] which talks about the advanced use of the Yocto build system.}}
 
===Prerequisites===
BELK/BXELK MVM is already configured to build this Yocto version/configuration, therefore no additional packages have to be installed by the user in order to run the Yocto BSP build process.
=== Initialize the build environment ===
BELK/BXELK Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories. To install it, please use the following commands:
<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynxbelk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repodvdk@dvdk-vm:~/lynxbelk$ chmod a+x repodvdk@dvdk-vm:~/lynxbelk$ ./repo init -u git@git.dave.eu:lynxbora/lynxbora-bsp.git -b lynxbora-fidomortydvdk@dvdk-vm:~/lynxbelk$ ./repo syncdvdk@dvdk-vm:~/belk$ source bora-bsp-init-env.sh
</pre>
=== Run Running the build === 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, The process may be slowed down significantly 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 to consider the following options: * migrating Migrating the build system to a physical machine* assuming Assuming that the host system has the required resources, extending the hardware capabilities of the default DVDK MVM (eg: e.g. 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:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build-fb -e fbdvdk@dvdk-vm:~/lynxbelk/build$ bitbake lynx<target-image-networkingname>
</pre>
Where <code><target-image-name></code> is one of the images listed in [[#Quick sreference|here]].
The Once the build process is completed, the resulting files (the U-Boot binaries, the Linux kernelimage, devicetree and u-boot binariesthe device tree blob, plus the .tar.gz compressed root file systemimage, etc.) will then be available inside ''in <code>build/tmp/deploy/images/sbc-lynx''</code>.
In addition to ===Generating the typical imagesSDKs===After creating an image as described in the previous version, the XUELK provides corresponding SDK can be generated by oissuing the following toocommand:*<codepre class="workstation-terminal">lynxbitbake <image_name -imagec populate-networking-sbc-lynx-xenosdk</codepre>**With respect to the Again, replace <code>lynxtarget-image-networking</codename> image, this includes additional libraries required to run with one of the Linux kernel featuring the Xenomai real-time extension. For more details about it, please refer to https://xenomai.org/images listed in [[#Quick sreference|here]].
=== Build Building 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
The generic procedure to generate the Yocto BSP image is the following:
<pre class="board-terminal">
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:bora/bora-bsp.git -b bora-morty
dvdk@dvdk-vm:~/belk$ ./repo sync
dvdk@dvdk-vm:~/belk$ source bora-bsp-init-env.sh
dvdk@dvdk-vm:~/belk/build$ bitbake <target-image-name>
</pre>
bora-image
bora-image-devel
bora-image-networking
The components listed in the table above can be kept in sync and up to date with DAVE Embedded Systems' repositories.
The following table lists the pre-built root file systems included in the MVM.{| class="wikitable" border="1"!Kit version<br>BELK<br>BXELK!Image name!Build commands!Path|-|rowspan="3"|<br>4.0.0<br>2.0.0|<code>bora-image</code>|<pre>dvdk@dvdk-vm:~/belk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repodvdk@dvdk-vm:~/belk$ chmod a+x repodvdk@dvdk-vm:~/belk$ ./repo init -u git@git.dave.eu:bora/bora-bsp.git -b bora-mortydvdk@dvdk-vm:~/belk$ ./repo syncdvdk@dvdk-vm:~/belk$ source bora-bsp-init-env.shdvdk@dvdk-vm:~/belk/build$ bitbake bora-image</pre>|<code>/home/dvdk/bora/rfs/belk-4.0.0</code>|-|<code>bora-image-devel</code>|<pre>dvdk@dvdk-vm:~/belk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repodvdk@dvdk-vm:~/belk$ chmod a+x repodvdk@dvdk-vm:~/belk$ ./repo init -u git@git.dave.eu:bora/bora-bsp.git -b bora-mortydvdk@dvdk-vm:~/belk$ ./repo syncdvdk@dvdk-vm:~/belk$ source bora-bsp-init-env.shdvdk@dvdk-vm:~/belk/build$ bitbake bora-image-devel</pre>|<code>/home/dvdk/bora/rfs/belk-4.0.0</code>|-|<code>bora-image-networking</code>|<pre>dvdk@dvdk-vm:~/belk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repodvdk@dvdk-vm:~/belk$ chmod a+x repodvdk@dvdk-vm:~/belk$ ./repo init -u git@git.dave.eu:bora/bora-bsp.git -b bora-mortydvdk@dvdk-vm:~/belk$ ./repo syncdvdk@dvdk-vm:~/belk$ source bora-bsp-init-env.shdvdk@dvdk-vm:~/belk/build$ bitbake bora-image-networking</pre>|<code>/home/dvdk/bora/rfs/belk-4.0.0</code>|-|}
4,650
edits