<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: device tree overlay in secure boot/imx-mkimage in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2139354#M239508</link>
    <description>&lt;P&gt;I've seen that mkimage_fit_atf.sh used in other places. My build uses mkimage_imx8, which doesn't seem to support the -f option to provide the FIT image description. All examples of .its files are for mkimage_uboot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to do now (not sure if that will work) is creating a FIT image and pass that to mkimage_imx8, and the FIT image to be embedded in the boot container. Any idea if that is possible or supported?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jul 2025 10:58:59 GMT</pubDate>
    <dc:creator>eduardo3</dc:creator>
    <dc:date>2025-07-23T10:58:59Z</dc:date>
    <item>
      <title>device tree overlay in secure boot/imx-mkimage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2138348#M239455</link>
      <description>&lt;P&gt;Currently we have our yocto configured to use secure boot, where we sign the bootloader, kernel and device tree.&lt;/P&gt;&lt;P&gt;What I am unable to find are examples using imx-mkimage to create images with multiple device trees / device tree overlays and select them in u-boot.&lt;/P&gt;&lt;P&gt;I've found examples using standard mkimage, which it takes an image tree source (.its) file and how to select a configuration. At this point, I don't know if the same is available in imx-mkimage.&lt;/P&gt;&lt;P&gt;Could you provide an example how to use imx-mkimage to create a boot container with multiple device trees (dtb) and device tree overlays (dtbo)?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 11:13:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2138348#M239455</guid>
      <dc:creator>eduardo3</dc:creator>
      <dc:date>2025-07-22T11:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: device tree overlay in secure boot/imx-mkimage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2139290#M239506</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;eduardo:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;unfortunately we don't have such an example.&lt;/P&gt;
&lt;P&gt;Regarding the image tree source image file (.its)&amp;nbsp; ,&amp;nbsp; &amp;nbsp;it has already been generated, but it is subsequently deleted.&lt;/P&gt;
&lt;P&gt;You can check the Makefile, let's take i.MX93 as an example,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;iMX93/soc.mak&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielchen_0-1753264709237.png" style="width: 614px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349092i4656D62570533294/image-dimensions/614x117?v=v2" width="614" height="117" role="button" title="danielchen_0-1753264709237.png" alt="danielchen_0-1753264709237.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can comment out this line and get the .its file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 10:00:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2139290#M239506</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2025-07-23T10:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: device tree overlay in secure boot/imx-mkimage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2139354#M239508</link>
      <description>&lt;P&gt;I've seen that mkimage_fit_atf.sh used in other places. My build uses mkimage_imx8, which doesn't seem to support the -f option to provide the FIT image description. All examples of .its files are for mkimage_uboot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to do now (not sure if that will work) is creating a FIT image and pass that to mkimage_imx8, and the FIT image to be embedded in the boot container. Any idea if that is possible or supported?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 10:58:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2139354#M239508</guid>
      <dc:creator>eduardo3</dc:creator>
      <dc:date>2025-07-23T10:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: device tree overlay in secure boot/imx-mkimage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2142432#M239651</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/159240"&gt;@eduardo3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;On i.MX8M platform, imx-mkimage support multiple dtbs with&amp;nbsp;supp_dtbs parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;For example, command&amp;nbsp;&lt;EM&gt;make SOC=iMX8MP flash_evk supp_dtbs="kernel_dtb.bin"&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;will add another FDT image and config to flash.bin.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$:~/data/LINUX_8MP/imx-mkimage$ make SOC=iMX8MP flash_evk supp_dtbs="kernel_dtb.bin"
Compiling mkimage_imx8
PLAT=imx8mp HDMI=no
Compiling mkimage_imx8
cc -O2 -Wall -std=c99 -static ../iMX8M/mkimage_imx8.c -o mkimage_imx8 -lz
./../scripts/dtb_check.sh imx8mp-evk.dtb evk.dtb
Use u-boot DTB: imx8mp-evk.dtb
./../scripts/pad_image.sh tee.bin
ERROR: ./../scripts/pad_image.sh: Could not find file tee.bin. Exiting.
./../scripts/pad_image.sh bl31.bin
./../scripts/pad_image.sh u-boot-nodtb.bin evk.dtb kernel_dtb.bin
Padding kernel_dtb.bin to 42272 bytes
BL32=tee.bin DEK_BLOB_LOAD_ADDR=0x40400000 TEE_LOAD_ADDR=0x56000000 ATF_LOAD_ADDR=0x00970000 ../iMX8M/mkimage_fit_atf.sh evk.dtb kernel_dtb.bin &amp;gt; u-boot.its
bl31.bin size:
45392
u-boot-nodtb.bin size:
1083960
evk.dtb size:
60056
kernel_dtb.bin size:
42272
./mkimage_uboot -E -p 0x5000 -f u-boot.its u-boot.itb
FIT description: Configuration to load ATF before U-Boot
Created: Tue Jul 29 16:04:55 2025
Image 0 (uboot-1)
Description: U-Boot (64-bit)
Created: Tue Jul 29 16:04:55 2025
Type: Standalone Program
Compression: uncompressed
Data Size: 1083960 Bytes = 1058.55 KiB = 1.03 MiB
Architecture: AArch64
Load Address: 0x40200000
Entry Point: unavailable
Image 1 (fdt-1)
Description: evk
Created: Tue Jul 29 16:04:55 2025
Type: Flat Device Tree
Compression: uncompressed
Data Size: 60056 Bytes = 58.65 KiB = 0.06 MiB
Architecture: Unknown Architecture
Image 2 (fdt-2)
Description: kernel_dtb.bin
Created: Tue Jul 29 16:04:55 2025
Type: Flat Device Tree
Compression: uncompressed
Data Size: 42272 Bytes = 41.28 KiB = 0.04 MiB
Architecture: Unknown Architecture
Image 3 (atf-1)
Description: ARM Trusted Firmware
Created: Tue Jul 29 16:04:55 2025
Type: Firmware
Compression: uncompressed
Data Size: 45392 Bytes = 44.33 KiB = 0.04 MiB
Architecture: AArch64
OS: Unknown OS
Load Address: 0x00970000
Default Configuration: 'config-1'
Configuration 0 (config-1)
Description: evk
Kernel: unavailable
Firmware: uboot-1
FDT: fdt-1
Loadables: atf-1
Configuration 1 (config-2)
Description: kernel_dtb.bin
Kernel: unavailable
Firmware: uboot-1
FDT: fdt-2
Loadables: atf-1
./mkimage_imx8 -version v2 -fit -loader u-boot-spl-ddr.bin 0x920000 -second_loader u-boot.itb 0x40200000 0x60000 -out flash.bin
Platform: i.MX8M (mScale)
ROM VERSION: v2
Using FIT image
LOADER IMAGE: u-boot-spl-ddr.bin start addr: 0x00920000
SECOND LOADER IMAGE: u-boot.itb start addr: 0x40200000 offset: 0x00060000
Output: flash.bin
fit_size: 1112
1+0 records in
1+0 records out
1112 bytes (1.1 kB, 1.1 KiB) copied, 9.8461e-05 s, 11.3 MB/s
FIT hash: 8bd280d47549b241e0a775a1cfb6205b6b2d178fb0e8aa14f0db408d5868db
========= IVT HEADER [HDMI FW] =========
header.tag: 0x0
header.length: 0x0
header.version: 0x0
entry: 0x0
reserved1: 0x0
dcd_ptr: 0x0
boot_data_ptr: 0x0
self: 0x0
csf: 0x0
reserved2: 0x0
boot_data.start: 0x0
boot_data.size: 0x0
boot_data.plugin: 0x0
========= IVT HEADER [PLUGIN] =========
header.tag: 0x0
header.length: 0x0
header.version: 0x0
entry: 0x0
reserved1: 0x0
dcd_ptr: 0x0
boot_data_ptr: 0x0
self: 0x0
csf: 0x0
reserved2: 0x0
boot_data.start: 0x0
boot_data.size: 0x0
boot_data.plugin: 0x0
========= IVT HEADER [LOADER IMAGE] =========
header.tag: 0xd1
header.length: 0x2000
header.version: 0x41
entry: 0x920000
reserved1: 0x0
dcd_ptr: 0x0
boot_data_ptr: 0x91ffe0
self: 0x91ffc0
csf: 0x9535c0
reserved2: 0x0
boot_data.start: 0x91ffc0
boot_data.size: 0x35660
boot_data.plugin: 0x0
========= OFFSET dump =========
Loader IMAGE:
header_image_off 0x0
dcd_off 0x0
image_off 0x40
csf_off 0x33600
spl hab block: 0x91ffc0 0x0 0x33600

Second Loader IMAGE:
sld_header_off 0x58000
sld_csf_off 0x59020
sld hab block: 0x401fadc0 0x58000 0x1020
fit-fdt csf_off 0x5b020
fit-fdt hab block: 0x401fadc0 0x58000 0x3020
SPL CSF block:
Blocks = 0x91ffc0 0x0 0x33600 "flash.bin"
SLD CSF block:
Blocks = 0x401fadc0 0x58000 0x1020 "flash.bin",\
SLD FIT-FDT CSF block:
Blocks = 0x401fadc0 0x58000 0x3020 "flash.bin"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;To select which dtb to use, user need to implement function&amp;nbsp;&lt;SPAN data-teams="true"&gt;board_fit_config_name_match() in&amp;nbsp;./board/freescale/&amp;lt;soc&amp;gt;/spl.c.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;&amp;nbsp;&amp;nbsp;board_fit_config_name_match() will be called in function fit_find_config_node in&amp;nbsp;./boot/common_fit.c.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;&amp;nbsp; For usage of function board_fit_config_name_match(), see&amp;nbsp;&lt;A href="https://github.com/ARM-software/u-boot/blob/master/doc/README.multi-dtb-fit" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/ARM-software/u-boot/blob/master/doc/README.multi-dtb-fit&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN data-teams="true"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 07:38:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/device-tree-overlay-in-secure-boot-imx-mkimage/m-p/2142432#M239651</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2025-07-29T07:38:12Z</dc:date>
    </item>
  </channel>
</rss>

