Open main menu

DAVE Developer's Wiki β

Changes

Template:Building the Yocto BSP

1,545 bytes added, 16 January
Introduction
''{{{kit-repo}}}'' 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>{{{kit-repo}}}-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>smartapt-get</code> tool. Please refer to [[Advanced_use_of_Yocto_build_system_(''{{{kitDESK-MX8M-AN-repo}}}'')#Using_pre0001:_Package_Management_with_apt-built_package_archiveget |this sectionapplication note]] for more details. 
To generate the supported root file systems, the build of the Yocto BSP has to be run. The output of this process is an image containing the U-Boot binary file, the Linux kernel image, and the selected root file system image. The following sections describe in detail how to execute this operation.
{{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 [[Advanced_use_of_Yocto_build_system_(https://www.nxp.com/docs/en/supporting-information/L5.15.71_2.2.0_LINUX_DOCS.zip NXP documentation on this BSP], i.e. the ''i.MX Yocto Project User'{{{kit-repo}}}s Guide'')|this document]] , which talks about the advanced use of host setup for the Yocto build system.}}
==== Initialize the build environment ====
Check that the following packages are install:
 
<pre class="workstation-terminal">
dvdk@vagrant:~$ sudo apt-get update && sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool
</pre>
 
Before running the build, the environment must be initialized properly.
''{{{kit-repo}}}'' 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@vagrant:~$ mkdir -p ~/desk-mx-l/yocto
dvdk@vagrant:~$ cd ~/desk-mx-l/yocto
dvdk@vagrant:~/desk-mx-l/yocto$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo-1 > repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29945 100 29945 0 0 64816 0 --:--:-- --:--:-- --:--:-- 64676
dvdk@vagrant:~/desk-mx-l/yocto$ chmod a+x repo
</pre>
 
then, fetch the Yocto repositories with the proper branch:
 
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/yocto$ ./repo init -u git@git.dave.eu:desk-mx-l/desk-mx-l-bsp.git -b refs/tags/desk-mx8m-l-4.0.0
dvdk@vagrant:~/desk-mx-l/yocto$ ./repo sync -c
</pre>
 
==== Initialize DISTRO and MACHINE ====
Select the Weston backend (you will be asked to accept the EULA):
 
<pre class="workstation-terminal">
dvdk@vagrant:~/{{{kitdesk-repo}}}$ curl http://commondatastorage.googleapis.com/git-repomx-downloads/repo > repodvdk@vagrant:~l/{{{kit-repo}}}yocto$ chmod a+x repodvdk@vagrant:~/{{{kitDISTRO=fsl-repo}}}$ ./repo init imx-u git@git.dave.eu:{{{kitwayland MACHINE=desk-repo}}}/{{{kitmx8mp source desk-repo}}}setup-bsprelease.git sh -b {{{kitbuild-repo}}}-''TBD''wayland...dvdk@vagrant:~Do you accept the EULA you just read? (y/{{{kit-repo}}}$ n) y EULA has been accepted. Welcome to Freescale Community BSP.../repo syncdvdk@vagrant:~/{{{kitdesk-repo}}}$ source {{{kitmx-repo}}}l/yocto/build-bsp-init-env.shwayland$
</pre>
8,221
edits