Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Development/Building Boot Image

1,446 bytes added, 14:05, 17 February 2022
no edit summary
The System Controller Unit (SCU) represents the evolution of centralized control for system-level resources on i.MX8. The heart of the system controller is a Cortex-M4 that executes System Controller Firmware. The SCF is an essential part of the i.MX8 architecture. Please find more information about SCF [https://community.nxp.com/t5/Connects-Training-Material/Infotainment-Connectivity-Security-Introduction-to-the-System/ta-p/1115096 here].
TF-A binary<code>bl31.bin</code>, <code>scfw_tcm.bin </code> and <code>u-boot.bin </code> are combined together to generate a binary file called <code>flash.bin</code>; the <code>imx-mkimage</code> tool is used to generate '''flash.bin''', and flash.bin needs to which will be flashed into the bootable storage device.
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.
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
-rwxrwxr-x 1 dvdk dvdk 94328 Feb 17 14:56 spl/u-boot-spl.bin
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/u-boot-imx$ ls -la u-boot.bin
-rw-rw-r-- 1 dvdk dvdk 861312 Feb 17 14:55 u-boot.bin
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage/u-boot-imx$
</pre>
</pre>
Please note that this is usually a generic command that generates all required binaries (kernel + device trees) and build the TF-A binary for the different selected platform. In other words For [[ORCA SOM| ORCA]] SOM: it is not usually required to specify a different target depending on specific board configuration.<pre>make PLAT=imx8mp bl31</pre> For [[MITO 8M Mini SOM| MITO 8M Mini]] SOM:<pre>make PLAT=imx8mm bl31</pre>
=== Get i.MX firmware ===
where BOARD is: <code>imx8mp-mito8mplus</code> or <code>imx8mm-mito8mmini</code>
For [[ORCA SOM | ORCA]]SOM
<pre class="workstation-terminal">
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$ ./imx8mp-mito8mplus_generate_flash.bin
Compiling mkimage_imx8
PLAT=imx8mp HDMI=no
Compiling mkimage_imx8
gcc -O2 -pipe -g -feliminate-unused-debug-types mkimage_imx8.c -o mkimage_imx8 -lz
23582+0 records in
23582+0 records out
94328 bytes (94 kB, 92 KiB) copied, 0.0379032 s, 2.5 MB/s
./../scripts/dtb_check.sh imx8mp-evk.dtb evk.dtb
Use u-boot DTB: imx8mp-evk.dtb
./../scripts/pad_image.sh tee.bin
...
...
...
...
========= OFFSET dump =========
Loader IMAGE:
header_image_off 0x0
dcd_off 0x0
image_off 0x40
csf_off 0x2b800
spl hab block: 0x91ffc0 0x0 0x2b800
 
Second Loader IMAGE:
sld_header_off 0x58000
sld_csf_off 0x59020
sld hab block: 0x401fcdc0 0x58000 0x1020
 
******************************
******************************
 
flash.bin generated successfully
write it on a SD card with
dd if=flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync
 
******************************
******************************
dvdk@vagrant:~/desk-mx-l/desk-mx8-mkimage$
</pre>
 
For [[MITO 8M Mini SOM | MITO M8M Mini]] SOM:
<pre>
./imx8mm-mito8mmini_generate_flash.bin
</pre>
----
[[Category:ORCA]] [[Category:MITO 8M Mini]]
8,244
edits