Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX6UL-L/Development/Building the Yocto BSP

570 bytes added, 04:52, 28 February 2022
Building the Yocto BSP on DESK-MX6UL-L 3.0.0 release
<section begin="History" />
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.1|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Jun 2021|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK release|-| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |3.0.0| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |Feb 2022| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |3.0.0 DESK release
|-
|}
<section end="History" /><section begin="Body" />
==Building the Yocto BSP==
|-
! stable branch
| sumohardknott| sumohardknott
|-
! stable tag
| desk-mx6ul-l-13.0.10| desk-mx6ul-l-13.0.10
|}
For more information on the Linux filesystem, please refer to http://www.thegeekstuff.com/2010/09/linux-file-system-structure/.
[[DESK-MX6UL-L|DESK-MX6UL-L]] provides one (or more) pre-built root file system, that can be used during the evaluation/development/deployment cycle. For instance, the root file system included in the <code>desk-mx-ldave-image-devel</code> image is suited for the development phase, since it provides a relatively rich set of packages including tools and libraries used to debug the application code. The pre-built root file systems are located here: <code>/home/dvdk/<target_name>/rfs/<kit_name></code>.
Besides the pre-built root file systems, DAVE also provides a rich repository containing pre-built applications and libraries. These packages can be easily installed on the target by using the <code>dnf</code> tool. Please refer to [[Advanced_use_of_Yocto_build_system_(''desk-mx-l'')#Using_pre-built_package_archive|this section]] for more details.
===How to build the Yocto BSP images including the U-Boot binary file, the Linux kernel image, and the target root file system image===
{{ImportantMessage|text=The following procedure requires the access to the DAVE Embedded Systems' git repositories. The access to such repositories is granted to development kit's owners only. Please refer to [[Accessing_DAVE_Embedded_Systems_restricted_git_repositories|this page]] for detailed instructions on how to get it.}}
 
 
{{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 the [https://www.nxp.com/webapp/Download?colCode=imx-yocto-L4.14.98_2.0.0_ga NXP documentation on this BSP], i.e. the ''i.MX Yocto Project User's Guide'', which talks about the hosto setup for the Yocto build system.}}
To install it, please use the following commands:
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/yocto$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo-1 > repodvdk@vagrant:~/desk-mx-l/yocto$ chmod a+x repodvdk@vagrant:~/desk-mx-l/yocto$ ./repo init -u git@git.dave.eu:desk-mx-l/desk-mx-l-bsp.git -b refs/tags/desk-mx6ul-l-13.0.10dvdk@vagrant:~/desk-mx-l/yocto$ ./repo sync -cdvdk@vagrant:~/desk-mx-l/yocto$ DISTRO=fsl-imx-fb MACHINE=desk-mx6ul-axelulite source desk-setup-release.sh -b build-fb
</pre>
==== 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 80GiB of disk space is required for the build. 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, to 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 MVM (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@vagrant:~/desk-mx-l/yocto$ DISTRO=fsl-imx-fb MACHINE=desk-mx6ul-axelulite source desk-setup-release.sh -b build-fbdvdk@vagrant:~/desk-mx-l/yocto/build-fb$ bitbake desk-image-qt5
</pre>
Where <code><target-image-name></code> is one of the images listed in [[#Quick reference|here]].
Once the build process is completed, the resulting files (the U-Boot binaries, the Linux kernel image, the device tree blob, the .tar.gz compressed root file system image, etc.) will be available in <code>build-fb/tmp/deploy/images/desk-mxmx6ul-laxelulite</code>using the environment prepared as stated above.
====Generating the SDKs====
==== Building additional packages ====
To build additional packages the user must first enter the directory where the <code>desk-mxsetup-l-bsp-init-envrelease.sh</code> is placed and source it
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/yocto$ DISTRO=fsl-imx-fb MACHINE=desk-mx6ul-axelulite source desk-setup-release.sh -b build-fbdvdk@vagrant:~/desk-mx-l/yocto/build-fb$
</pre>
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/yocto/build-fb$ bitbake memtester
</pre>
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/yocto/build-fb$ ls -l tmp/deploy/rpm/cortexa7hf_neon/memtester-*-rw-r--r-- 2 4 dvdk dvdk 12112 Apr 21 1513213 Feb 25 12:34 43 tmp/deploy/rpm/cortexa7hf_neoncortexa9t2hf_neon/memtester-4.35.0-r0.cortexa7hf_neoncortexa9t2hf_neon.rpm-rw-r--r-- 2 4 dvdk dvdk 28200 Apr 21 1528049 Feb 25 12:34 43 tmp/deploy/rpm/cortexa7hf_neoncortexa9t2hf_neon/memtester-dbg-4.35.0-r0.cortexa7hf_neoncortexa9t2hf_neon.rpm-rw-r--r-- 2 4 dvdk dvdk 5964 Apr 21 156049 Feb 25 12:34 43 tmp/deploy/rpm/cortexa7hf_neoncortexa9t2hf_neon/memtester-dev-4.35.0-r0.cortexa7hf_neoncortexa9t2hf_neon.rpm-rw-r--r-- 2 4 dvdk dvdk 8888 Apr 21 158973 Feb 25 12:34 43 tmp/deploy/rpm/cortexa7hf_neoncortexa9t2hf_neon/memtester-doc-4.35.0-r0.cortexa7hf_neoncortexa9t2hf_neon.rpm-rw-r--r-- 4 dvdk@vagrantdvdk 12977 Feb 25 12:~43 tmp/deploy/deskrpm/cortexa9t2hf_neon/memtester-mxsrc-l/yocto/build4.5.0-fb$ r0.cortexa9t2hf_neon.rpm
</pre>
devwiki_user
120
edits