board: sl28: use fit image generator
authorMichael Walle <michael@walle.cc>
Fri, 25 Feb 2022 12:51:56 +0000 (18:21 +0530)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 28 Feb 2022 06:31:02 +0000 (12:01 +0530)
Simplify the binman config and fdt nodes by using the "@..-SEQ"
substitutions and CONFIG_OF_LIST.

Signed-off-by: Michael Walle <michael@walle.cc>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
configs/kontron_sl28_defconfig

index d4b8332..2dcb3c2 100644 (file)
@@ -27,6 +27,7 @@
                fit {
                        offset = <CONFIG_SPL_PAD_TO>;
                        description = "FIT image with multiple configurations";
+                       fit,fdt-list = "of-list";
 
                        images {
                                uboot {
                                        };
                                };
 
-                               fdt-1 {
-                                       description = "fsl-ls1028a-kontron-sl28";
+                               @fdt-SEQ {
+                                       description = "NAME";
                                        type = "flat_dt";
-                                       arch = "arm";
-                                       compression = "none";
-
-                                       blob {
-                                               filename = "arch/arm/dts/fsl-ls1028a-kontron-sl28.dtb";
-                                       };
-                               };
-
-                               fdt-2 {
-                                       description = "fsl-ls1028a-kontron-sl28-var1";
-                                       type = "flat_dt";
-                                       arch = "arm";
-                                       compression = "none";
-
-                                       blob {
-                                               filename = "arch/arm/dts/fsl-ls1028a-kontron-sl28-var1.dtb";
-                                       };
-                               };
-
-                               fdt-3 {
-                                       description = "fsl-ls1028a-kontron-sl28-var2";
-                                       type = "flat_dt";
-                                       arch = "arm";
-                                       compression = "none";
-
-                                       blob {
-                                               filename = "arch/arm/dts/fsl-ls1028a-kontron-sl28-var2.dtb";
-                                       };
-                               };
-
-                               fdt-4 {
-                                       description = "fsl-ls1028a-kontron-sl28-var3";
-                                       type = "flat_dt";
-                                       arch = "arm";
                                        compression = "none";
-
-                                       blob {
-                                               filename = "arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dtb";
-                                       };
-                               };
-
-                               fdt-5 {
-                                       description = "fsl-ls1028a-kontron-sl28-var4";
-                                       type = "flat_dt";
-                                       arch = "arm";
-                                       compression = "none";
-
-                                       blob {
-                                               filename = "arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dtb";
-                                       };
                                };
                        };
 
                        configurations {
-                               default = "conf-1";
-
-                               conf-1 {
-                                       description = "fsl-ls1028a-kontron-sl28";
-                                       firmware = "uboot";
-                                       fdt = "fdt-1";
-                               };
-
-                               conf-2 {
-                                       description = "fsl-ls1028a-kontron-sl28-var1";
-                                       firmware = "uboot";
-                                       fdt = "fdt-2";
-                               };
-
-                               conf-3 {
-                                       description = "fsl-ls1028a-kontron-sl28-var2";
-                                       firmware = "uboot";
-                                       fdt = "fdt-3";
-                               };
-
-                               conf-4 {
-                                       description = "fsl-ls1028a-kontron-sl28-var3";
-                                       firmware = "uboot";
-                                       loadables = "uboot";
-                                       fdt = "fdt-4";
-                               };
+                               default = "@config-DEFAULT-SEQ";
 
-                               conf-5 {
-                                       description = "fsl-ls1028a-kontron-sl28-var4";
+                               @config-SEQ {
+                                       description = "NAME";
                                        firmware = "uboot";
-                                       loadables = "uboot";
-                                       fdt = "fdt-5";
+                                       fdt = "fdt-SEQ";
                                };
                        };
                };
                };
 
                configurations {
-                       conf-1 {
-                               firmware = "bl31";
-                               loadables = "uboot";
-                       };
-
-                       conf-2 {
-                               firmware = "bl31";
-                               loadables = "uboot";
-                       };
-
-                       conf-3 {
-                               firmware = "bl31";
-                               loadables = "uboot";
-                       };
-
-                       conf-4 {
-                               firmware = "bl31";
-                               loadables = "uboot";
-                       };
-
-                       conf-5 {
+                       @config-SEQ {
                                firmware = "bl31";
                                loadables = "uboot";
                        };
                };
 
                configurations {
-                       conf-1 {
-                               loadables = "uboot", "bl32";
-                       };
-
-                       conf-2 {
-                               loadables = "uboot", "bl32";
-                       };
-
-                       conf-3 {
-                               loadables = "uboot", "bl32";
-                       };
-
-                       conf-4 {
-                               loadables = "uboot", "bl32";
-                       };
-
-                       conf-5 {
+                       @config-SEQ {
                                loadables = "uboot", "bl32";
                        };
                };
index b743c2b..cf8aedf 100644 (file)
@@ -55,7 +55,7 @@ CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_RNG=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIST=""
+CONFIG_OF_LIST="fsl-ls1028a-kontron-sl28 fsl-ls1028a-kontron-sl28-var1 fsl-ls1028a-kontron-sl28-var2 fsl-ls1028a-kontron-sl28-var3 fsl-ls1028a-kontron-sl28-var4"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y