]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
verdin-imx8mm: switch to use binman to pack images
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>
Sat, 9 Oct 2021 20:41:07 +0000 (22:41 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 20 Oct 2021 13:08:26 +0000 (15:08 +0200)
Use binman to pack images.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
arch/arm/dts/imx8mm-verdin-u-boot.dtsi
arch/arm/mach-imx/imx8m/Kconfig
board/toradex/verdin-imx8mm/imximage.cfg
configs/verdin-imx8mm_defconfig
doc/board/toradex/verdin-imx8mm.rst

index 1fc499806dbc958708f886dbe94fca54ee020c9e..6a7e9d776c81e8e0521251b31a0111f845c294a7 100644 (file)
@@ -1,11 +1,15 @@
 // SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
- * Copyright 2020 Toradex
+ * Copyright 2020-2021 Toradex
  */
 
 #include "imx8mm-u-boot.dtsi"
 
 / {
+       binman: binman {
+               multiple-images;
+       };
+
        firmware {
                optee {
                        compatible = "linaro,optee-tz";
 &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 = <0x5fc00>;
+                       filename = "u-boot.itb";
+               };
+       };
+};
index a210ce7cf784127c8595fb117508018784c81eca..c68053b282b86fb17c87047c261d7d170ee2e57f 100644 (file)
@@ -110,6 +110,7 @@ config TARGET_PICO_IMX8MQ
 
 config TARGET_VERDIN_IMX8MM
        bool "Support Toradex Verdin iMX8M Mini module"
+       select BINMAN
        select IMX8MM
        select SUPPORT_SPL
        select IMX8M_LPDDR4
index b8b25ff4201785f21f6249b7c5b7f469fefb7b47..fcc92009f3b51e02cb6562d5f36105f581635953 100644 (file)
@@ -1,16 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2020 Toradex
+ * Copyright 2020-2021 Toradex
  */
 
 #define __ASSEMBLY__
 
-FIT
 BOOT_FROM      emmc_fastboot
-LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
-SECOND_LOADER  u-boot.itb              0x40200000 0x60000
-
-DDR_FW lpddr4_pmu_train_1d_imem.bin
-DDR_FW lpddr4_pmu_train_1d_dmem.bin
-DDR_FW lpddr4_pmu_train_2d_imem.bin
-DDR_FW lpddr4_pmu_train_2d_dmem.bin
+LOADER         u-boot-spl-ddr.bin      0x7e1000
index 98799994cea10e2b10db21f25ee4c8c583ac7a48..1c8b505656ab7c4d664dc921906e6e8ab479fde5 100644 (file)
@@ -23,7 +23,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_USE_BOOTCOMMAND is not set
 CONFIG_DEFAULT_FDT_FILE="fsl-imx8mm-verdin-dev.dtb"
index b9f7dc39c9660ed5f4fd6c9dce77eedea6de4a57..a11c82da2f5c6df5d3af0ae37e79d6472722c77d 100644 (file)
@@ -34,10 +34,10 @@ Get the DDR Firmware
 .. code-block:: bash
 
     $ cd ..
-    $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin
-    $ chmod +x firmware-imx-8.4.1.bin
-    $ ./firmware-imx-8.4.1.bin
-    $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./
+    $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.1.bin
+    $ chmod +x firmware-imx-8.10.1.bin
+    $ ./firmware-imx-8.10.1.bin
+    $ cp firmware-imx-8.10.1/firmware/ddr/synopsys/lpddr4*.bin ./
 
 Build U-Boot
 ------------
@@ -46,7 +46,7 @@ Build U-Boot
     $ export CROSS_COMPILE=aarch64-linux-gnu-
     $ export ATF_LOAD_ADDR=0x920000
     $ make verdin-imx8mm_defconfig
-    $ make flash.bin
+    $ make
 
 Flash to eMMC
 -------------
@@ -78,21 +78,28 @@ Output:
 
 .. code-block:: bash
 
-    U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
-    Normal Boot
-    Trying to boot from MMC1
-
-    U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
-
-    CPU:   Freescale i.MX8MMQ rev1.0 at 0 MHz
-    Reset cause: POR
-    DRAM:  2 GiB
-    MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
-    Loading Environment from MMC... OK
-    In:    serial
-    Out:   serial
-    Err:   serial
-    Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial:
-    Net:   eth0: ethernet@30be0000
-    Hit any key to stop autoboot:  0
-    Verdin iMX8MM #
+U-Boot SPL 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200)
+Normal Boot
+WDT:   Started with servicing (60s timeout)
+Trying to boot from MMC1
+NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b
+NOTICE:  BL31: Built : 18:02:12, Aug 16 2021
+
+
+U-Boot 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200)
+
+CPU:   Freescale i.MX8MMQ rev1.0 at 1200 MHz
+Reset cause: POR
+DRAM:  2 GiB
+WDT:   Started with servicing (60s timeout)
+MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
+Loading Environment from MMC... OK
+In:    serial
+Out:   serial
+Err:   serial
+Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.1A, Serial# 06760554
+Carrier: Toradex Verdin Development Board V1.1A, Serial# 10754333
+Setting variant to wifi
+Net:   eth0: ethernet@30be0000
+Hit any key to stop autoboot:  0
+Verdin iMX8MM #