]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8mm_beacon: Switch to binman for generating image
authorAdam Ford <aford173@gmail.com>
Fri, 22 Oct 2021 21:43:40 +0000 (23:43 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 7 Jan 2022 17:10:59 +0000 (12:10 -0500)
To eliminate a warning when using custom imx tools for generating
a binary, use binman to generate flash.bin.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi
arch/arm/mach-imx/imx8m/Kconfig
board/beacon/imx8mm/Kconfig
board/beacon/imx8mm/README
board/beacon/imx8mm/imximage-8mm-lpddr4.cfg [new file with mode: 0644]
configs/imx8mm_beacon_defconfig

index 73ddfdade6ad729d063204403dfaaa32e6eb0337..3c034a85e35f33f42b3e7a1e5526391adcc5c187 100644 (file)
@@ -6,6 +6,10 @@
 #include "imx8mm-u-boot.dtsi"
 
 / {
+       binman: binman {
+               multiple-images;
+       };
+
        wdt-reboot {
                compatible = "wdt-reboot";
                wdt = <&wdog1>;
 &wdog1 {
        u-boot,dm-spl;
 };
+
+&binman {
+        u-boot-spl-ddr {
+               filename = "u-boot-spl-ddr.bin";
+               pad-byte = <0xff>;
+               align-size = <4>;
+               align = <4>;
+
+               u-boot-spl {
+                       align-end = <4>;
+               };
+
+               blob_1: blob-ext@1 {
+                       filename = "lpddr4_pmu_train_1d_imem.bin";
+                       size = <0x8000>;
+               };
+
+               blob_2: blob-ext@2 {
+                       filename = "lpddr4_pmu_train_1d_dmem.bin";
+                       size = <0x4000>;
+               };
+
+               blob_3: blob-ext@3 {
+                       filename = "lpddr4_pmu_train_2d_imem.bin";
+                       size = <0x8000>;
+               };
+
+               blob_4: blob-ext@4 {
+                       filename = "lpddr4_pmu_train_2d_dmem.bin";
+                       size = <0x4000>;
+               };
+       };
+
+       spl {
+               filename = "spl.bin";
+
+               mkimage {
+                       args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
+
+                       blob {
+                               filename = "u-boot-spl-ddr.bin";
+                       };
+               };
+       };
+
+       itb {
+               filename = "u-boot.itb";
+
+               fit {
+                       description = "Configuration to load ATF before U-Boot";
+                       #address-cells = <1>;
+                       fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
+
+                       images {
+                               uboot {
+                                       description = "U-Boot (64-bit)";
+                                       type = "standalone";
+                                       arch = "arm64";
+                                       compression = "none";
+                                       load = <CONFIG_SYS_TEXT_BASE>;
+
+                                       uboot_blob: blob-ext {
+                                               filename = "u-boot-nodtb.bin";
+                                       };
+                               };
+
+                               atf {
+                                       description = "ARM Trusted Firmware";
+                                       type = "firmware";
+                                       arch = "arm64";
+                                       compression = "none";
+                                       load = <0x920000>;
+                                       entry = <0x920000>;
+
+                                       atf_blob: blob-ext {
+                                               filename = "bl31.bin";
+                                       };
+                               };
+
+                               fdt {
+                                       description = "NAME";
+                                       type = "flat_dt";
+                                       compression = "none";
+
+                                       uboot_fdt_blob: blob-ext {
+                                               filename = "u-boot.dtb";
+                                       };
+                               };
+                       };
+
+                       configurations {
+                               default = "conf";
+
+                               conf {
+                                       description = "NAME";
+                                       firmware = "uboot";
+                                       loadables = "atf";
+                                       fdt = "fdt";
+                               };
+                       };
+               };
+       };
+
+       imx-boot {
+               filename = "flash.bin";
+               pad-byte = <0x00>;
+
+               spl: blob-ext@1 {
+                       offset = <0x0>;
+                       filename = "spl.bin";
+               };
+
+               uboot: blob-ext@2 {
+                       offset = <0x57c00>;
+                       filename = "u-boot.itb";
+               };
+       };
+};
index 276b8bd97422855f025991b584da5b5cc26e56fa..a2822f8c28fabb261555c6a84030f86dd9640c6c 100644 (file)
@@ -117,6 +117,7 @@ config TARGET_VERDIN_IMX8MM
 
 config TARGET_IMX8MM_BEACON
        bool "imx8mm Beacon Embedded devkit"
+       select BINMAN
        select IMX8MM
        select SUPPORT_SPL
        select IMX8M_LPDDR4
index 58799c1a6553fe3d9490a497aac3f77d25fc55d2..63f064e8cb85ccbc2036e8cf4434e72e755596cb 100644 (file)
@@ -10,7 +10,7 @@ config SYS_CONFIG_NAME
        default "imx8mm_beacon"
 
 config IMX_CONFIG
-       default "arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg"
+       default "board/beacon/imx8mm/imximage-8mm-lpddr4.cfg"
 
 source "board/freescale/common/Kconfig"
 
index dce176fa0b236ed38071ca074e05eda9af69217b..03d9412f0d63cd2d30c45ac433c282b1f64377ea 100644 (file)
@@ -12,8 +12,8 @@ Get and Build the ARM Trusted firmware
 Note: $(srctree) is U-Boot source directory
 
 $ git clone https://source.codeaurora.org/external/imx/imx-atf
-$ git checkout imx_4.19.35_1.0.0
-$ make PLAT=imx8mm bl31 ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-
+$ git checkout imx_5.4.70_2.3.0
+$ make PLAT=imx8mm bl31 CROSS_COMPILE=aarch64-linux-gnu-
 $ cp build/imx8mm/release/bl31.bin $(srctree)
 
 Get the DDR firmware
@@ -26,7 +26,7 @@ $ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin $(srctree)
 Build U-Boot
 ============
 $ make imx8mm_beacon_defconfig
-$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000
+$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu-
 
 Burn U-Boot to microSD Card
 ===========================
diff --git a/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg b/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg
new file mode 100644 (file)
index 0000000..90573be
--- /dev/null
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+#define __ASSEMBLY__
+
+BOOT_FROM      sd
+LOADER         u-boot-spl-ddr.bin      0x7E1000
index de005433e2d4531bae22a1e966a746eae59ffabc..9aea5bf18174ed1fb2728b5f16ccbc8ae5416a20 100644 (file)
@@ -21,7 +21,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000
 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_OF_SYSTEM_SETUP=y
 CONFIG_DEFAULT_FDT_FILE="imx8mm-beacon-kit.dtb"
 CONFIG_SPL_BOARD_INIT=y