Open main menu

DAVE Developer's Wiki β

Changes

Advanced use of Yocto build system (BELK/BXELK)

1,912 bytes added, 16:30, 27 October 2021
no edit summary
{{Applies To Bora}}
{{Applies To BoraX}}
{{Applies To BoraLite}}
{{Applies To Yocto}}
{{InfoBoxBottom}}
{{ImportantMessage|text=As the structure of the BELK/BXELK is based on several tools, it is strongly recommended the reading of [[Logical_structure_of_Bora_and_BoraX_Embedded_Linux_Kits_(BELK/BXELK)|this document]] first.
}}
== History ==
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|3.0.0]]
|First release
|-
|{{oldid|6998|2.0.0}}
|December 2016
|[[BELK/BXELK_software_components#BELK_3.0.2_.2F_BXELK_1.0.1|BELK 3.0.2 / BXELK 1.0.1]]
|Added information about pre-built package archive
|-
|3.0.0
|January 2020
|[[BELK/BXELK_software_components#BELK_4.1.0|BELK/BXELK 4.1.0]]
|Update for BELK 4.1.0
|-
|}
<section begin=BELK/>=Introduction=Advanced use of Yocto build system==The Yocto can be used to 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 [[#Initializing the build environment|here]].
For more information regarding Yocto build system, go to its [[:Category:Yocto|dedicated category page]]
===Prerequisites===
The following prerequisites are required. They need to be done once only.
Some generic development tools are required on the host Linux machine:
<code>:~$ sudo dpkg-reconfigure dash</code>
===Initializing the build environment===
In the BELK, we have simplified the Yocto initialization phase, relying on the <code>repo</code> tool and on a BORA BSP git repository, so that the initialization can be completed with a few commands as reported below:
<pre>
:~/belk$ ./repo sync
</pre>
===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:
The resulting files (kernel, devicetree and u-boot binaries, plus .tar.gz root file system) will then be available inside <code>build/tmp/deploy/images/bora</code>.
===Build additional packages===
To build additional packages the user must first enter the directory where the <code>bora-bsp-init-env.sh</code> is placed and source it:
<pre>
</pre>
The resulting packages (the default format is ipk) can be found inside <code>build/tmp/deploy/ipk</code>.
 
===Using pre-built package archive===
 
Starting from BELK 3.0.1 / BXELK 1.0.0, the archive of pre-built packages belonging to <code>openembedded-core</code> layer is available. This allows to install on the target these packages via <code>smart</code> command, as described [[AN-XELK-003:_Package_Management_with_Yocto|here]].
 
The address of those repositories are detailed in the following table:
 
 
{| class="wikitable" border="1"
!Name
!URL
!Description
|-
|all
|https://yocto.dave.eu/belk-latest/all
|architecture indipendent packages
|-
|cortexa9hf_neon
|https://yocto.dave.eu/belk-latest/cortexa9hf_neon/
|Cortex A9 hf packages
|-
|bora
|https://yocto.dave.eu/belk-latest/bora
|BELK/BXELK packages
|-
|}
 
Please note that:
* to point to a specific BELK revision user can substitute <code>latest</code> keyword with the specific <code>x.y.z</code> release (e.g. https://yocto.dave.eu/belk-3.0.1/armv7a_vfp_neon)
* not all releases of BELK have a dedicated repository. In case your specific version is missing you can use the generic ''latest'' release
* most of the packages are available inside <code>cortexa9hf_neon</code> repository
 
=== Demo on youtube===
 
{| class="wikitable" | width="100%"
| {{#ev:youtube|7kdR9L4D_E0|500|center|Get smart with SMART package manager on ZYNQ |frame}}
|}
<section end=BELK/>
8,226
edits