Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
!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.0{{oldid|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"16113|Feb 2022/02/16}}|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-MX8MX8M-L 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"|{{oldid|17543|2023/02/24}}| 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" |DESK-MX8M-L-2.0.0release|-|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 {{oldid|19807|2023/08/22}}|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-MX8MX8M-L-24.0.0release|-! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2024/04/02! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L-4.1.0 release
|-
|}
|-
! Repository
| BSP Manifest
| Yocto BSP Layer
|-
! URL
| git@git.dave.eu:desk-mx-l/desk-mx-l-bsp.git
| git@git.dave.eu:desk-mx-l/meta-desk-mx.git
|-
! stable branch
| desk-mx8m-l-2.x.x| desk-mx8m-l-24.x.x
|-
! stable tag
| desk-mx8m-l-24.0.0| desk-mx8m-l-2.01.0
|}
| This image include tools for development/debugging
|-
| desk-image-qt5qt6| This image include a Qt5 Qt6 graphic backend on framebuffer
|}
For more information on the Linux filesystem, please refer to http://www.thegeekstuff.com/2010/09/linux-file-system-structure/.
[[DESK-MX8M-L | DESK-MX8M-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-mx8m-l-24.x.x-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_([[DESK-MX8M-L | DESKAN-MX8M0001:_Package_Management_with_apt-L]])#Using_pre-built_package_archive get | 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.
For more general information regarding the Yocto build system, please refer the [[:Category:Yocto|dedicated category page]].
===How to build the Yocto BSP images including the U-Boot binary file, the Linux kernel image, and the target root file system imagewith KAS=== 
{{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/webappdocs/en/supporting-information/Download?colCode=L5.415.70_271_2.32.0_LINUX_DOCS .zip NXP documentation on this BSP], i.e. the ''i.MX Yocto Project User's Guide'', which talks about the hosto host setup for the Yocto build system.}}
==== Initialize the build environment ====
Before running the build, the environment must be initialized properly.
[[DESK-MX8M-L | DESK-MX8M-L]] Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all Check that the required git repositories. To following packages are install it, please use the following commands
<pre class="workstation-terminal">
dvdk@vagrant:~/desk$ sudo apt-mx-l/yocto$ curl http://commondatastorage.googleapis.com/get update && sudo apt install gawk wget gitdiffstat unzip texinfo gcc build-repo-downloads/repoessential chrpath socat cpio python3 python3-1 > repo % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 29945 100 29945 0 0 583k 0 pip python3-pexpect xz-:utils debianutils iputils-ping python3-:-- --:--:-- --:--:-- 596kdvdk@vagrant:~/desk-mx-l/yocto$ chmod a+x repo</pre>then, fetch the Yocto repositories with the proper branch:<pre>./repo init -u git@git.dave.eu:desk-mxpython3-l/deskjinja2 libegl1-mx-l-bspmesa libsdl1.git 2-b refs/tags/deskdev pylint3 xterm python3-mx8msubunit mesa-lcommon-2.0.0./repo sync dev zstd liblz4-ctool
</pre>
In case of <code>ca-certificates</code> failuresBefore running the build, which may appears during https access to some repo:the KAS environment must be initialized properly.
Fetching projects<pre class="workstation-terminal">dvdk@vagrant: 11% (2~$ virtualenv -p /17) meta-freescale-3rdpartyfatal: unable to access 'https:usr/bin/sourcepython3 venvcreated virtual environment CPython3.8.10.codeaurorafinal.org0-64 in 351ms creator CPython3Posix(dest=/externalhome/imxsupportdooraim/meta-nxp-demo-experiencevenv, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/dooraim/.local/share/'virtualenv) added seed packages: server certificate verification failedpip==24. CAfile0, setuptools==69.1.1, wheel==0.42.0 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivatordvdk@vagrant: ~$ source venv/etcbin/sslactivate(venv) dvdk@vagrant:~$ pip3 install kas==4.2Collecting kas==4.2 Downloading kas-4.2.tar.gz (39 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... doneCollecting PyYAML<7,>=3.0 (from kas==4.2) Using cached PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)Collecting distro<2,>=1.0.0 (from kas==4.2) Downloading distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)Collecting jsonschema<5,>=2.5.0 (from kas==4.2) Using cached jsonschema-4.21.1-py3-none-any.whl.metadata (7.8 kB)Collecting kconfiglib<15,>=14.1.0 (from kas==4.2) Downloading kconfiglib-14.1.0-py2.py3-none-any.whl.metadata (39 kB)Collecting attrs>=22.2.0 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached attrs-23.2.0-py3-none-any.whl.metadata (9.5 kB)Collecting importlib-resources>=1.4.0 (from jsonschema<5,>=2.5.0->kas==4.2) Downloading importlib_resources-6.4.0-py3-none-any.whl.metadata (3.9 kB)Collecting jsonschema-specifications>=2023.03.6 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl.metadata (3.0 kB)Collecting pkgutil-resolve-name>=1.3.10 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached pkgutil_resolve_name-1.3.10-py3-none-any.whl.metadata (624 bytes)Collecting referencing>=0.28.4 (from jsonschema<5,>=2.5.0->kas==4.2) Downloading referencing-0.34.0-py3-none-any.whl.metadata (2.8 kB)Collecting rpds-py>=0.7.1 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.1 kB)Collecting zipp>=3.1.0 (from importlib-resources>=1.4.0->jsonschema<5,>=2.5.0->kas==4.2) Downloading zipp-3.18.1-py3-none-any.whl.metadata (3.5 kB)Downloading distro-1.9.0-py3-none-any.whl (20 kB)Using cached jsonschema-4.21.1-py3-none-any.whl (85 kB)Downloading kconfiglib-14.1.0-py2.py3-none-any.whl (145 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.9/certs145.9 kB 12.2 MB/cas eta 0:00:00Using cached PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (736 kB)Using cached attrs-23.2.0-py3-none-any.whl (60 kB) certificatesDownloading importlib_resources-6.4.crt CRLfile: 0-py3-none-any.whl (38 kB)Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB) fatal: unable to access 'https://gitUsing cached pkgutil_resolve_name-1.openembedded3.org/meta10-py3-none-python2/': server certificate verification failedany.whl (4. CAfile: /etc/ssl/certs/ca7 kB)Downloading referencing-certificates0.crt CRLfile: 34.0-py3-none-any.whl (26 kB) fatal: unable to access 'https://sourceUsing cached rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)Downloading zipp-3.codeaurora18.org/external/imxsupport/meta1-nxppy3-demonone-experience/'any.whl (8.2 kB)Building wheels for collected packages: server certificate verification failedkas Building wheel for kas (pyproject.toml) . CAfile.. done Created wheel for kas: /etc/ssl/certs/cafilename=kas-certificates4.crt CRLfile: 2-py3-none-any.whl size=57786 sha256=919ab9cedc442039708d8846f9fb02e8b43d823cb54d8785737bf46361c594a6 fatal: unable to access 'https Stored in directory:/home/dooraim/git.openembedded.orgcache/meta-python2pip/': server certificate verification failed. CAfile: wheels/etc5f/ssl47/certsa7/cae9a292a85a88f96c6b3d834d5e9aceb6927ae2e2b89b123ecbSuccessfully built kasInstalling collected packages: zipp, rpds-py, PyYAML, pkgutil-resolve-name, kconfiglib, distro, attrs, referencing, importlib-resources, jsonschema-specifications, jsonschema, kasSuccessfully installed PyYAML-6.0.1 attrs-23.2.0 distro-certificates1.crt CRLfile: none error: Cannot fetch meta9.0 importlib-resources-6.4.0 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 kas-4.2 kconfiglib-14.1.0 pkgutil-resolve-nxpname-demo1.3.10 referencing-experience from https://source0.codeaurora34.org/external/imxsupport/meta0 rpds-nxppy-demo0.18.0 zipp-experience3.18.1(venv) dvdk@vagrant:~$</pre>
a possible solution is to disable then, fetch the SSL verification setting<code>meta-desk-mx</code> repositories with the proper branch:
export GIT_SSL_NO_VERIFY=1 ==== Initialize DISTRO and MACHINE ====Select the Weston backend:<preclass="workstation-terminal">(venv) dvdk@vagrant:~/desk-mx-l/yocto$ DISTRO=fslgit clone git@git.dave.eu:desk-imxmx-wayland MACHINE=deskl/meta-mx8mp source desk-setup-releasemx.sh git -b build-wayland......dvdk@vagrant:~refs/tags/desk-mxmx8m-l/yocto/build-wayland$4.1.0
</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 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 KAS, with the following commands: * for build <code>dave-image-devel</code> image with <code>DESK-MX8MM-L</code> machine <pre class="workstation-terminal">(venv) dvdk@vagrant:~/desk-mx-l/yocto$ kas build desk-mx8mm-l_devel.yml</pre> * for build <code>dave-image-devel</code> image with <code>DESK-MX8MM-L</code> machine with support of <code>MULTILIB-LIB32</code>  
<pre class="workstation-terminal">
(venv) dvdk@vagrant:~/desk-mx-l/yocto/$ kas builddesk-wayland$ bitbake dave-imagemx8mm-devell_devel_multilib.yml
</pre>
 
* for build <code>dave-image-devel</code> image with <code>DESK-MX8MP-L</code> machine
 
<pre class="workstation-terminal">
(venv) dvdk@vagrant:~/desk-mx-l/yocto$ kas build desk-mx8mp-l_devel.yml
</pre>
 
Where <code>dave-image-devel</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/tmp/deploy/images/desk-mx8m-l-2.x.x<machine_name></code>.
====Generating the SDKs====
After creating an image as described in the previous version, In way to get the corresponding SDK can be generated by issuing for QT6, perform the following command: * for <code>DESK-MX8MM-L</code> machine <preclass="workstation-terminal">bitbake dave(venv) dvdk@vagrant:~/desk-imagemx-devel l/yocto$ KAS_TASK="populate_sdk" kas build desk-c populatemx8mm-sdkl_qt6.yml
</pre>
Again, replace <code>dave-image-devel</code> with one of the images listed in [[#Quick reference|here]].
* for <code>DESK-MX8MP-L</code> machine <pre class="workstation-terminal">(venv) dvdk@vagrant:~/desk-mx-l/yocto$ KAS_TASK="populate_sdk" kas build desk-mx8mp-l_qt6.yml</pre> == Building additional packages ==Generating the Toolchain====Toolchain can be created by the following command: * for <code>DESK-MX8MM-L</code> machine <pre class="workstation-terminal">(venv) dvdk@vagrant:~/desk-mx-l/yocto$ KAS_TARGET="meta-toolchain" kas build desk-mx8mm-l_devel.yml</pre>
To build additional packages the user must select the ''DISTRO'' and source the * for <code>deskDESK-setupMX8MM-release.shL</code> machine with support of <code>MULTILIB-LIB32</code> script
<pre class="workstation-terminal">
(venv) dvdk@vagrant:~/desk-mx-l/yocto$ DISTROKAS_TARGET=fsl"meta-imx-wayland MACHINE=toolchain" kas build desk-mx8mp source deskmx8mm-setup-releasel_devel_multilib.sh -b build-waylanddvdk@vagrant:~/desk-mx-l/yocto/build-wayland$yml
</pre>
And then can run any of the [http://www.yoctoproject.org/docs/latest/mega* for <code>DESK-MX8MP-manualL</mega-manual.html#usingpoky-components-bitbake bitbake] command.code> machine
<pre class="workstation-terminal">
(venv) dvdk@vagrant:~/desk-mx-l/yocto/$ KAS_TARGET="meta-toolchain" kas builddesk-wayland$ bitbake memtestermx8mp-l_devel.yml
</pre>
The resulting ==== Building additional packages ==== To build additional packages, for example <code>memtester</code> the user need to perform the following command <pre class="workstation-terminal">(the default format is rpmvenv) can be found inside ''builddvdk@vagrant:~/tmpdesk-mx-l/deployyocto$ KAS_TARGET="memtester" kas build desk-mx8mm-l_devel.yml</rpm''.pre>
The resulting packages (the default format is deb) can be found inside <code>build/tmp/deploy/deb</code>.
----
[[Category:ORCA]] [[Category:MITO 8M Mini]]
dave_user
423
edits