]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: imx8qm-rom7720: switch to binman
authorOliver Graute <oliver.graute@kococonnector.com>
Fri, 4 Nov 2022 15:03:37 +0000 (16:03 +0100)
committerStefano Babic <sbabic@denx.de>
Wed, 9 Nov 2022 16:12:32 +0000 (17:12 +0100)
Switch to use binman to pack images

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
arch/arm/dts/imx8qm-rom7720-a1.dts
arch/arm/dts/imx8qm-u-boot.dtsi [new file with mode: 0644]
arch/arm/mach-imx/imx8/Kconfig
board/advantech/imx8qm_rom7720_a1/imximage.cfg
configs/imx8qm_rom7720_a1_4G_defconfig
doc/board/advantech/imx8qm-rom7720-a1.rst

index d1f2fff869fdfc73f614d3913d2582abfe224940..332d441c6d3336f3fc6092ccd90a300dfc421ca2 100644 (file)
@@ -10,6 +10,7 @@
 /memreserve/ 0x80000000 0x00020000;
 
 #include "fsl-imx8qm.dtsi"
+#include "imx8qm-u-boot.dtsi"
 
 / {
        model = "Advantech iMX8QM Qseven series";
diff --git a/arch/arm/dts/imx8qm-u-boot.dtsi b/arch/arm/dts/imx8qm-u-boot.dtsi
new file mode 100644 (file)
index 0000000..f3fc90c
--- /dev/null
@@ -0,0 +1,133 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 NXP
+ */
+
+/ {
+       binman: binman {
+               multiple-images;
+       };
+};
+
+&binman {
+       u-boot-spl-ddr {
+               align = <4>;
+               align-size = <4>;
+               filename = "u-boot-spl-ddr.bin";
+               pad-byte = <0xff>;
+
+               u-boot-spl {
+                       align-end = <4>;
+                       filename = "u-boot-spl.bin";
+               };
+       };
+
+       spl {
+               filename = "spl.bin";
+
+               mkimage {
+                       args = "-n spl/u-boot-spl.cfgout -T imx8image -e 0x100000";
+
+                       blob {
+                               filename = "u-boot-spl-ddr.bin";
+                       };
+               };
+       };
+
+       itb {
+               filename = "u-boot.itb";
+
+               fit {
+                       description = "Configuration to load ATF before U-Boot";
+                       fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
+                       fit,fdt-list = "of-list";
+                       #address-cells = <1>;
+
+                       images {
+                               uboot {
+                                       arch = "arm64";
+                                       compression = "none";
+                                       description = "U-Boot (64-bit)";
+                                       load = <CONFIG_SYS_TEXT_BASE>;
+                                       type = "standalone";
+
+                                       uboot-blob {
+                                               filename = "u-boot-nodtb.bin";
+                                               type = "blob-ext";
+                                       };
+                               };
+
+                               atf {
+                                       arch = "arm64";
+                                       compression = "none";
+                                       description = "ARM Trusted Firmware";
+                                       entry = <0x00910000>;
+                                       load =  <0x00091000>;
+                                       type = "firmware";
+
+                                       atf-blob {
+                                               filename = "bl31.bin";
+                                               type = "atf-bl31";
+                                       };
+                               };
+
+                               scfw {
+                                       arch = "arm64";
+                                       compression = "none";
+                                       description = "System Controler Firmware";
+                                       type = "firmware";
+
+                                       scfw_blob {
+                                               filename = "mx8qm-val-scfw-tcm.bin";
+                                               type = "blob-ext";
+                                       };
+                               };
+
+                               seco {
+                                       arch = "arm64";
+                                       compression = "none";
+                                       description = "Seco Firmware";
+                                       type = "firmware";
+
+                                       seco_blob {
+                                               filename = "mx8qm-ahab-container.img";
+                                               type = "blob-ext";
+                                       };
+                               };
+
+                               @fdt-SEQ {
+                                       compression = "none";
+                                       description = "NAME";
+                                       type = "flat_dt";
+
+                                       uboot-fdt-blob {
+                                               filename = "u-boot.dtb";
+                                               type = "blob-ext";
+                                       };
+                               };
+                       };
+
+                       configurations {
+                               default = "@config-DEFAULT-SEQ";
+
+                               binman_configuration: @config-SEQ {
+                                       description = "NAME";
+                                       fdt = "fdt-SEQ";
+                                       firmware = "uboot";
+                                       loadables = "atf";
+                               };
+                       };
+               };
+       };
+
+       imx-boot {
+               filename = "flash.bin";
+               pad-byte = <0x00>;
+
+               spl {
+                       filename = "spl.bin";
+                       offset = <0x0>;
+                       type = "blob-ext";
+               };
+       };
+};
index 2ba7454457ddd01d6047197247d85b546ab72472..a7e3af57dc68ca6051fb0c84204836a617f1f38b 100644 (file)
@@ -82,6 +82,7 @@ config TARGET_CONGA_QMX8
 
 config TARGET_IMX8QM_ROM7720_A1
        bool "Support i.MX8QM ROM-7720-A1"
+       select BINMAN
        select BOARD_LATE_INIT
        select SUPPORT_SPL
        select IMX8QM
index 5ecde0c530907b0d0393422d6710205b24d5ea19..43035088e3779b34b7074acfb3cf432af0cfae04 100644 (file)
@@ -4,8 +4,8 @@
  */
 
 
-/* Boot from SD, sector size 0x400 */
-BOOT_FROM SD 0x400
+BOOT_FROM      sd
+
 /* SoC type IMX8QM */
 SOC_TYPE IMX8QM
 /* Append seco container image */
index c3c93bfdf8a0f0fb0a9a3421c6986f2138c00705..7819bef8638628034c93ec6fb3f52132300d361a 100644 (file)
@@ -20,8 +20,9 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000
 CONFIG_REMAKE_ELF=y
 CONFIG_FIT=y
+CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi"
index bd4be1dbeb492049124fae1dded6330c75fee715..953cf01fde4b452336ddba6ea733f25e61529195 100644 (file)
@@ -57,8 +57,7 @@ Build U-Boot
      $ export ATF_LOAD_ADDR=0x80000000
      $ export BL33_LOAD_ADDR=0x80020000
      $ make imx8qm_rom7720_a1_4G_defconfig
-     $ make u-boot.bin
-     $ make flash.bin
+     $ make
 
 Flash the binary into the SD card
 ---------------------------------