Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Development/Building Boot Image

263 bytes added, 13:27, 24 July 2023
Updates for DESK-MX8-L 4.0.0 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"|First DESK-MX8M-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:#ededed; padding:5px; color:#000000" |{{oldid|17540|17540}}| 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" |24/02/2023| 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-2.0.0 release|-! 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" |{{oldid|18030|18030}}
! 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" |24/02/2023
! 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-24.0.0 release
|-
|}
|-
! stable branch
| desk-mx8m-l-24.x.x
|-
! stable tag
| desk-mx8m-l-24.0.0
|}
In the following paragraphs we will explain how to get or build those binaries to be combined in a single binary to be flashed in the bootable storage device.
=== Instructions Prepare environment === 
It is assumed that the development environment has been set up properly as described [[DESK-MX8M-L#Quick_start_guide|here]].
* start the Linux development VM and login into the system
* open a terminal window and ''cd'' into <code>desk-mxmx8-lmkimage</code> directory
<preclass="workstation-terminal">dvdk@vagrant:~$ cd desk-mx-l/desk-mx8-mkimagedvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$
</pre>
=== Clone * in case of needs you can update your local repository with the repositories ===following git command* clone ''recursively'' the Boot repositories
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l$ git clone --recursive git@git.dave.eu:desk-mx-l/desk-mx8-mkimage.$ git -b desk-mx8m-l-2.0.0Cloning into 'desk-mx8-mkimage'...remote: Enumerating objects: 57, done.remote: Total 57 (delta 0), reused 0 (delta 0), pack-reused 57Receiving objects: 100% (57/57), 7.14 KiB | 7.14 MiB/s, done.Resolving deltas: 100% (28/28), done.dvdk@vagrant:~/desk-mx-l$ pull
</pre>
* update configure the submodule (i.e. sync the sub-repositories)build environment 
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$ git submodule updateCloning into '/home/dvdksource ~/desk-mx-l/desk-mx8-mkimage/imx-atf'...Cloning into '/home/dvdk/desk-mxmx8m-l/desk-mx8-mkimage/imx-mkimage'4.0.0_env.Cloning into '/home/dvdk/desk-mx-l/desk-mx8-mkimage/u-boot-imx'...Submodule path 'imx-atf': checked out 'a72158b5e10527b9e13a64f8305b4210423fa09b'Submodule path 'imx-mkimage': checked out '8947fea369ab3932259630232cfb9f87b8f9dda1'Submodule path 'u-boot-imx': checked out '2af0221006d686ae561a68f324c56bf2da3953ad'dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$ sh
</pre>
In case of ca=== Build U-certificates failures, which may appears during https access Boot === First step is to some repobuild U-Boot binaries:the same instructions can be found in the dedicated [[DESK-MX8M-L/Development/Building_U-Boot | wiki page]]
<preclass="workstation-terminal">fatal: unable to access 'httpsdvdk@vagrant:~$ cd ~/desk-mx-l/source.codeaurora.org/external/imx/imxdesk-mx8-mkimage.git/': server certificate verification failed. CAfile: /etc/ssl/certs/cau-boot-certificates.crt CRLfile: nonefatal: clone of 'https://source.codeaurora.org/external/imx/imx-mkimage.git' into submodule path '/home/dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/imxu-boot-mkimage' failedFailed to clone 'imx-mkimage'. Retry scheduled...$
</pre>
a possible solution is to disable * select the SSL verification setting:proper <code>defconfig</code> and start the ''make'' compilation
export GIT_SSL_NO_VERIFYFor [[ORCA SOM| ORCA]] SOM:<pre class=1"workstation-terminal">dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/u-boot-imx$ make imx8mp_mito8mplus_defconfigdvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/u-boot-imx$ make -j$(nproc)</pre>
=== Enable the cross-compilation ===* configure the build environment for cross-compilationFor [[MITO 8M Mini SOM| MITO 8M Mini]] SOM:<preclass="workstation-terminal">source dvdk@vagrant:~/homedesk-mx-l/desk-mx8-mkimage/u-boot-imx$ make imx8mm_mito8mmini_defconfigdvdk@vagrant:~/desk-mx-l/desk-mx8mmx8-lmkimage/u-boot-imx$ make -2.0.0_env.shj$(nproc)
</pre>
=== Build U-Boot ===
First step is to build U-Boot binaries: the same instructions can be found in the dedicated [[DESK-MX8M-L/Development/Building_U-Boot | wiki page]]
<pre>
cd u-boot-imx
</pre>
* select the proper <code>defconfig</code> and start the ''make'' compilation
<pre>
make imx8mp_mito8mplus_defconfig
make
</pre>
This steps produce the <code>u-boot-spl.bin</code> and <code>u-boot.bin</code> files used at the last step.
 
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/u-boot-imx$ ls -la spl/u-boot-spl.bin
This process builds the ARM Trusted Firmware: please find more information [https://trustedfirmware-a.readthedocs.io/en/v2.2/plat/imx8.html here]
<preclass="workstation-terminal">dvdk@vagrant:~$ cd ~/desk-mx-l/desk-mx8-mkimage/imx-atf/dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/imx-atf$
</pre>
* for building the ATF, the following var has to be ''unset''
<preclass="workstation-terminal">dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/imx-atf$ unset LDFLAGS
</pre>
For [[ORCA SOM| ORCA]] SOM:
<preclass="workstation-terminal">dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/imx-atf$ make PLAT=imx8mp bl31
</pre>
For [[MITO 8M Mini SOM| MITO 8M Mini]] SOM:
<preclass="workstation-terminal">dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/imx-atf$ make PLAT=imx8mm bl31
</pre>
<pre class="workstation-terminal">
dvdk@vagrant:~$ cd ~/desk-mx-l/desk-mx8-mkimage/dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$ ./fetch_firmware.sh--20222023-0207-17 1124 15:3725:2421-- https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.1018.binResolving www.nxp.com (www.nxp.com)... 104.12087.105170.182Connecting to www.nxp.com (www.nxp.com)|104.12087.105170.182|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1467137 1513050 (1.4M) [application/octet-stream]Saving to: ‘firmware-imx-8.1018.bin’
firmware-imx-8.1018.bin 100%[=========================================================================================================================================>] 1.40M 44M 4--.63MB-KB/s in 0.3s 05s
20222023-0207-17 1124 15:3725:25 21 (431.63 1 MB/s) - ‘firmware-imx-8.1018.bin’ saved [14671371513050/14671371513050]
Welcome to NXP firmware-imx-8.1018.bin
WARNING: EULA has been auto-accepted; this implies that you agree with it.
Unpacking file ................................................................................ donedvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$
</pre>
For [[ORCA SOM | ORCA]] SOM:
<pre class="workstation-terminal">
dvdk@vagrant:~$ cd ~/desk-mx-l/desk-mx8-mkimage/
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$ ./imx8mp-mito8mplus_generate_flash.bin
Compiling mkimage_imx8
devwiki_user
120
edits