aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-07 19:11:58 -0500
committerTom Rini <trini@konsulko.com>2022-01-07 19:11:58 -0500
commit47de135994b59f5787cba233f0102ab97a4e5726 (patch)
tree02c8116479cbd72a6d49ef5c430b9fee87aef7c1
parenta14af7216a220fe8f1b2a5308ed632abe6f9f97f (diff)
parentc225601c60de7757a51ac099a39eee5935dbc37d (diff)
downloadu-boot-WIP/07Jan2022.zip
u-boot-WIP/07Jan2022.tar.gz
u-boot-WIP/07Jan2022.tar.bz2
Merge branch '2022-01-07-imx8-and-buildman-updates'WIP/07Jan2022
- A large number of updates for i.MX8 platforms. We update buildman / binman to be able to fake binaries if needed, for CI, and tell the user the binary won't work. Update platforms to build again with these changes.
-rw-r--r--Makefile1
-rw-r--r--arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi209
-rw-r--r--arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi188
-rw-r--r--arch/arm/dts/imx8mm-evk-u-boot.dtsi123
-rw-r--r--arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi146
-rw-r--r--arch/arm/dts/imx8mm-u-boot.dtsi149
-rw-r--r--arch/arm/dts/imx8mm-verdin-u-boot.dtsi122
-rw-r--r--arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi130
-rw-r--r--arch/arm/dts/imx8mq-evk-u-boot.dtsi2
-rw-r--r--arch/arm/dts/imx8mq-phanbell-u-boot.dtsi2
-rw-r--r--arch/arm/dts/imx8mq-pico-pi.dts1
-rw-r--r--arch/arm/dts/imx8mq-u-boot.dtsi122
-rw-r--r--arch/arm/dts/phycore-imx8mm-u-boot.dtsi122
-rw-r--r--arch/arm/mach-imx/imx8m/Kconfig12
-rw-r--r--arch/arm/mach-imx/imx8m/imximage.cfg12
-rw-r--r--board/beacon/imx8mm/Kconfig2
-rw-r--r--board/beacon/imx8mm/README6
-rw-r--r--board/beacon/imx8mm/imximage-8mm-lpddr4.cfg9
-rw-r--r--board/beacon/imx8mn/Kconfig2
-rw-r--r--board/beacon/imx8mn/imximage-8mn-lpddr4.cfg10
-rw-r--r--board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg2
-rw-r--r--board/gateworks/venice/Kconfig3
-rw-r--r--board/gateworks/venice/README2
-rw-r--r--board/gateworks/venice/imximage-8mm-lpddr4.cfg9
-rw-r--r--configs/imx8mm_beacon_defconfig2
-rw-r--r--configs/imx8mm_venice_defconfig4
-rw-r--r--configs/imx8mn_beacon_2g_defconfig2
-rw-r--r--configs/imx8mn_beacon_defconfig8
-rw-r--r--configs/imx8mq_evk_defconfig2
-rw-r--r--configs/imx8mq_phanbell_defconfig2
-rw-r--r--configs/pico-imx8mq_defconfig2
-rw-r--r--doc/board/nxp/imx8mq_evk.rst3
-rw-r--r--tools/binman/cmdline.py2
-rw-r--r--tools/binman/control.py26
-rw-r--r--tools/binman/entry.py23
-rw-r--r--tools/binman/etype/blob.py18
-rw-r--r--tools/binman/etype/blob_ext.py8
-rw-r--r--tools/binman/etype/mkimage.py20
-rw-r--r--tools/binman/etype/section.py20
-rw-r--r--tools/binman/ftest.py15
-rw-r--r--tools/binman/test/203_fake_blob.dts14
41 files changed, 670 insertions, 887 deletions
diff --git a/Makefile b/Makefile
index ae9bfab..63d286a 100644
--- a/Makefile
+++ b/Makefile
@@ -1315,6 +1315,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
-a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \
-a spl-dtb=$(CONFIG_SPL_OF_REAL) \
-a tpl-dtb=$(CONFIG_TPL_OF_REAL) \
+ $(if $(BINMAN_FAKE_EXT_BLOBS),--fake-ext-blobs) \
$(BINMAN_$(@F))
OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
diff --git a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi
index 1206593..5cbc70f 100644
--- a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi
@@ -3,74 +3,50 @@
* Copyright 2019 NXP
*/
-/ {
- binman: binman {
- multiple-images;
- };
-
- wdt-reboot {
- compatible = "wdt-reboot";
- wdt = <&wdog1>;
- u-boot,dm-spl;
- };
+#include "imx8mm-u-boot.dtsi"
+/ {
firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
-};
-
-&{/soc@0} {
- u-boot,dm-pre-reloc;
- u-boot,dm-spl;
-};
-
-&clk {
- u-boot,dm-spl;
- u-boot,dm-pre-reloc;
- /delete-property/ assigned-clocks;
- /delete-property/ assigned-clock-parents;
- /delete-property/ assigned-clock-rates;
-};
-
-&osc_24m {
- u-boot,dm-spl;
- u-boot,dm-pre-reloc;
-};
-
-&aips1 {
- u-boot,dm-spl;
- u-boot,dm-pre-reloc;
-};
-&aips2 {
- u-boot,dm-spl;
+ wdt-reboot {
+ compatible = "wdt-reboot";
+ u-boot,dm-spl;
+ wdt = <&wdog1>;
+ };
};
-&aips3 {
+&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} {
u-boot,dm-spl;
};
-&iomuxc {
+&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} {
u-boot,dm-spl;
};
-&pinctrl_uart3 {
- u-boot,dm-spl;
-};
+&binman_fip {
+ arch = "arm64";
+ compression = "none";
+ description = "Trusted Firmware FIP";
+ load = <0x40310000>;
+ type = "firmware";
-&pinctrl_usdhc2_gpio {
- u-boot,dm-spl;
+ fip_blob {
+ filename = "fip.bin";
+ type = "blob-ext";
+ };
};
-&pinctrl_usdhc2 {
- u-boot,dm-spl;
+&binman_configuration {
+ loadables = "atf", "fip";
};
-&pinctrl_usdhc3 {
- u-boot,dm-spl;
+&fec1 {
+ phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
};
&gpio1 {
@@ -93,163 +69,54 @@
u-boot,dm-spl;
};
-&uart3 {
+&i2c1 {
u-boot,dm-spl;
};
-&usdhc1 {
+&i2c2 {
u-boot,dm-spl;
};
-&usdhc2 {
+&pinctrl_i2c2 {
u-boot,dm-spl;
};
-&usdhc3 {
+&pinctrl_pmic {
u-boot,dm-spl;
};
-&i2c1 {
+&pinctrl_uart3 {
u-boot,dm-spl;
};
-&i2c2 {
+&pinctrl_usdhc2 {
u-boot,dm-spl;
};
-&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} {
+&pinctrl_usdhc2_gpio {
u-boot,dm-spl;
};
-&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} {
+&pinctrl_usdhc3 {
u-boot,dm-spl;
};
-&pinctrl_i2c2 {
+&uart3 {
u-boot,dm-spl;
};
-&pinctrl_pmic {
+&usdhc1 {
u-boot,dm-spl;
};
-&fec1 {
- phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
+&usdhc2 {
+ u-boot,dm-spl;
};
-&wdog1 {
+&usdhc3 {
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>;
- };
- };
-
- flash {
- 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 = "bl2.bin";
- };
- };
-
- fip {
- description = "Trusted Firmware FIP";
- type = "firmware";
- arch = "arm64";
- compression = "none";
- load = <0x40310000>;
-
- fip_blob: blob-ext{
- filename = "fip.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", "fip";
- fdt = "fdt";
- };
- };
- };
- };
+&wdog1 {
+ u-boot,dm-spl;
};
diff --git a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi
index 00927c1..433b02c 100644
--- a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi
@@ -3,93 +3,84 @@
* Copyright 2019 NXP
*/
-/ {
- binman: binman {
- multiple-images;
- };
-
- wdt-reboot {
- compatible = "wdt-reboot";
- wdt = <&wdog1>;
- u-boot,dm-spl;
- };
+#include "imx8mm-u-boot.dtsi"
+/ {
firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
+
+ wdt-reboot {
+ compatible = "wdt-reboot";
+ u-boot,dm-spl;
+ wdt = <&wdog1>;
+ };
};
-&{/soc@0} {
- u-boot,dm-pre-reloc;
+&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} {
u-boot,dm-spl;
};
-&clk {
+&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} {
u-boot,dm-spl;
- u-boot,dm-pre-reloc;
- /delete-property/ assigned-clocks;
- /delete-property/ assigned-clock-parents;
- /delete-property/ assigned-clock-rates;
};
-&osc_24m {
- u-boot,dm-spl;
- u-boot,dm-pre-reloc;
+&fec1 {
+ phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
};
-&aips1 {
+&gpio1 {
u-boot,dm-spl;
- u-boot,dm-pre-reloc;
};
-&aips2 {
+&gpio2 {
u-boot,dm-spl;
};
-&aips3 {
+&gpio3 {
u-boot,dm-spl;
};
-&iomuxc {
+&gpio4 {
u-boot,dm-spl;
};
-&pinctrl_uart3 {
+&gpio5 {
u-boot,dm-spl;
};
-&pinctrl_usdhc2_gpio {
+&i2c1 {
u-boot,dm-spl;
};
-&pinctrl_usdhc2 {
+&i2c2 {
u-boot,dm-spl;
};
-&pinctrl_usdhc3 {
+&pinctrl_i2c2 {
u-boot,dm-spl;
};
-&gpio1 {
+&pinctrl_pmic {
u-boot,dm-spl;
};
-&gpio2 {
+&pinctrl_uart3 {
u-boot,dm-spl;
};
-&gpio3 {
+&pinctrl_usdhc2 {
u-boot,dm-spl;
};
-&gpio4 {
+&pinctrl_usdhc2_gpio {
u-boot,dm-spl;
};
-&gpio5 {
+&pinctrl_usdhc3 {
u-boot,dm-spl;
};
@@ -109,135 +100,6 @@
u-boot,dm-spl;
};
-&i2c1 {
- u-boot,dm-spl;
-};
-
-&i2c2 {
- u-boot,dm-spl;
-};
-
-&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} {
- u-boot,dm-spl;
-};
-
-&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} {
- u-boot,dm-spl;
-};
-
-&pinctrl_i2c2 {
- u-boot,dm-spl;
-};
-
-&pinctrl_pmic {
- u-boot,dm-spl;
-};
-
-&fec1 {
- phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
-};
-
&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>;
- };
- };
-
- flash {
- 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";
- };
- };
- };
- };
-};
diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
index 3c75415..6b45983 100644
--- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
@@ -6,10 +6,6 @@
#include "imx8mm-u-boot.dtsi"
/ {
- binman: binman {
- multiple-images;
- };
-
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -116,122 +112,3 @@
&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";
- };
- };
-};
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
index 5e368a6..22d18e6 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
@@ -11,10 +11,6 @@
usb1 = &usbotg2;
};
- binman: binman {
- multiple-images;
- };
-
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -130,145 +126,3 @@
&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";
- };
- };
-
- u-boot-update {
- filename = "firmware-update.itb";
-
- fit {
- description = "Configuration for firmware update file";
-
- images {
- flash-bin {
- description = "U-Boot flash image";
- type = "firmware";
- os = "u-boot";
- arch = "arm";
- compress = "none";
- load = <0>; /* unused */
-
- blob {
- filename = "flash.bin";
- };
-
- };
- };
- };
- };
-};
diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi
index f833d9d..7882fe7 100644
--- a/arch/arm/dts/imx8mm-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-u-boot.dtsi
@@ -3,14 +3,20 @@
* Copyright (C) 2020 Jagan Teki <jagan@amarulasolutions.com>
*/
+/ {
+ binman: binman {
+ multiple-images;
+ };
+};
+
&{/soc@0} {
u-boot,dm-pre-reloc;
u-boot,dm-spl;
};
&aips1 {
- u-boot,dm-spl;
u-boot,dm-pre-reloc;
+ u-boot,dm-spl;
};
&aips2 {
@@ -21,9 +27,146 @@
u-boot,dm-spl;
};
+&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";
+ };
+
+ 1d-imem {
+ filename = "lpddr4_pmu_train_1d_imem.bin";
+ size = <0x8000>;
+ type = "blob-ext";
+ };
+
+ 1d_dmem {
+ filename = "lpddr4_pmu_train_1d_dmem.bin";
+ size = <0x4000>;
+ type = "blob-ext";
+ };
+
+ 2d_imem {
+ filename = "lpddr4_pmu_train_2d_imem.bin";
+ size = <0x8000>;
+ type = "blob-ext";
+ };
+
+ 2d_dmem {
+ filename = "lpddr4_pmu_train_2d_dmem.bin";
+ size = <0x4000>;
+ type = "blob-ext";
+ };
+ };
+
+ 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";
+ 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 = <0x920000>;
+ load = <0x920000>;
+ type = "firmware";
+
+ atf_blob {
+ filename = "bl31.bin";
+ type = "blob-ext";
+ };
+ };
+
+ binman_fip: fip {
+ arch = "arm64";
+ compression = "none";
+ description = "Trusted Firmware FIP";
+ load = <0x40310000>;
+ type = "firmware";
+ };
+
+ @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";
+ };
+
+ binman_uboot: uboot {
+ filename = "u-boot.itb";
+ offset = <0x57c00>;
+ type = "blob-ext";
+ };
+ };
+};
+
&clk {
- u-boot,dm-spl;
u-boot,dm-pre-reloc;
+ u-boot,dm-spl;
/delete-property/ assigned-clocks;
/delete-property/ assigned-clock-parents;
/delete-property/ assigned-clock-rates;
@@ -34,6 +177,6 @@
};
&osc_24m {
- u-boot,dm-spl;
u-boot,dm-pre-reloc;
+ u-boot,dm-spl;
};
diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
index 9fb4d8a..976399a 100644
--- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
@@ -6,10 +6,6 @@
#include "imx8mm-u-boot.dtsi"
/ {
- binman: binman {
- multiple-images;
- };
-
firmware {
optee {
compatible = "linaro,optee-tz";
@@ -100,120 +96,6 @@
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";
- };
- };
+&binman_uboot {
+ offset = <0x5fc00>;
};
diff --git a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi
index bbc64a2..69fd69c 100644
--- a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi
+++ b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi
@@ -4,6 +4,10 @@
*/
/ {
+ binman: binman {
+ multiple-images;
+ };
+
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -40,6 +44,9 @@
&clk {
u-boot,dm-spl;
u-boot,dm-pre-reloc;
+ /delete-property/ assigned-clocks;
+ /delete-property/ assigned-clock-parents;
+ /delete-property/ assigned-clock-rates;
};
&gpio1 {
@@ -99,6 +106,10 @@
u-boot,off-on-delay-us = <20000>;
};
+&uart2 {
+ u-boot,dm-spl;
+};
+
&usdhc1 {
u-boot,dm-spl;
sd-uhs-sdr104;
@@ -120,3 +131,122 @@
&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 0x912000";
+
+ 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 = <0x960000>;
+ entry = <0x960000>;
+
+ 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 = <0x58000>;
+ filename = "u-boot.itb";
+ };
+ };
+};
diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
index 2cfc12b..6f9c814 100644
--- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
+++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+#include "imx8mq-u-boot.dtsi"
+
&usdhc1 {
mmc-hs400-1_8v;
};
diff --git a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
index 4712cf6..a65a942 100644
--- a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
+++ b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+#include "imx8mq-u-boot.dtsi"
+
&reg_usdhc2_vmmc {
u-boot,off-on-delay-us = <20000>;
};
diff --git a/arch/arm/dts/imx8mq-pico-pi.dts b/arch/arm/dts/imx8mq-pico-pi.dts
index d2af18a..8ed6e91 100644
--- a/arch/arm/dts/imx8mq-pico-pi.dts
+++ b/arch/arm/dts/imx8mq-pico-pi.dts
@@ -9,6 +9,7 @@
/dts-v1/;
#include "imx8mq.dtsi"
+#include "imx8mq-u-boot.dtsi"
/ {
model = "TechNexion PICO-PI-8M";
diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
new file mode 100644
index 0000000..2c10e9b
--- /dev/null
+++ b/arch/arm/dts/imx8mq-u-boot.dtsi
@@ -0,0 +1,122 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 NXP
+ */
+
+/ {
+ binman: binman {
+ multiple-images;
+ };
+
+};
+
+&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>;
+ };
+ };
+
+ signed_hdmi {
+ filename = "signed_hdmi.bin";
+
+ blob_5: blob-ext@5 {
+ filename = "signed_hdmi_imx8m.bin";
+ };
+ };
+
+ flash {
+ 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 = <0x910000>;
+ entry = <0x910000>;
+
+ 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";
+ };
+ };
+ };
+ };
+};
diff --git a/arch/arm/dts/phycore-imx8mm-u-boot.dtsi b/arch/arm/dts/phycore-imx8mm-u-boot.dtsi
index f842e02..7c2dfb4 100644
--- a/arch/arm/dts/phycore-imx8mm-u-boot.dtsi
+++ b/arch/arm/dts/phycore-imx8mm-u-boot.dtsi
@@ -7,10 +7,6 @@
#include "imx8mm-u-boot.dtsi"
/ {
- binman: binman {
- multiple-images;
- };
-
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -73,121 +69,3 @@
&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 {
- filename = "spl.bin";
- offset = <0x0>;
- };
-
- uboot: blob-ext@2 {
- filename = "u-boot.itb";
- offset = <0x57c00>;
- };
- };
-};
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 276b8bd..d6a8690 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -36,13 +36,15 @@ config TARGET_IMX8MQ_CM
config TARGET_IMX8MQ_EVK
bool "imx8mq_evk"
+ select BINMAN
select IMX8MQ
select IMX8M_LPDDR4
config TARGET_IMX8MQ_PHANBELL
- bool "imx8mq_phanbell"
- select IMX8MQ
- select IMX8M_LPDDR4
+ bool "imx8mq_phanbell"
+ select BINMAN
+ select IMX8MQ
+ select IMX8M_LPDDR4
config TARGET_IMX8MM_EVK
bool "imx8mm LPDDR4 EVK board"
@@ -71,6 +73,7 @@ config TARGET_IMX8MM_ICORE_MX8MM
config TARGET_IMX8MM_VENICE
bool "Support Gateworks Venice iMX8M Mini module"
+ select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
@@ -105,6 +108,7 @@ config TARGET_IMX8MP_EVK
config TARGET_PICO_IMX8MQ
bool "Support Technexion Pico iMX8MQ"
+ select BINMAN
select IMX8MQ
select IMX8M_LPDDR4
@@ -117,12 +121,14 @@ config TARGET_VERDIN_IMX8MM
config TARGET_IMX8MM_BEACON
bool "imx8mm Beacon Embedded devkit"
+ select BINMAN
select IMX8MM
select SUPPORT_SPL
select IMX8M_LPDDR4
config TARGET_IMX8MN_BEACON
bool "imx8mn Beacon Embedded devkit"
+ select BINMAN
select IMX8MN
select SUPPORT_SPL
select IMX8M_LPDDR4
diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg
index 714b242..9c6eaf0 100644
--- a/arch/arm/mach-imx/imx8m/imximage.cfg
+++ b/arch/arm/mach-imx/imx8m/imximage.cfg
@@ -1,17 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * Copyright 2018 NXP
+ * Copyright 2018-2021 NXP
*/
#define __ASSEMBLY__
FIT
BOOT_FROM sd
-SIGNED_HDMI signed_hdmi_imx8m.bin
-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
+SIGNED_HDMI signed_hdmi.bin
+LOADER mkimage.flash.mkimage 0x7e1000
diff --git a/board/beacon/imx8mm/Kconfig b/board/beacon/imx8mm/Kconfig
index 58799c1..63f064e 100644
--- a/board/beacon/imx8mm/Kconfig
+++ b/board/beacon/imx8mm/Kconfig
@@ -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"
diff --git a/board/beacon/imx8mm/README b/board/beacon/imx8mm/README
index dce176f..03d9412 100644
--- a/board/beacon/imx8mm/README
+++ b/board/beacon/imx8mm/README
@@ -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
index 0000000..90573be
--- /dev/null
+++ b/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg
@@ -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
diff --git a/board/beacon/imx8mn/Kconfig b/board/beacon/imx8mn/Kconfig
index 65d2923..fb30139 100644
--- a/board/beacon/imx8mn/Kconfig
+++ b/board/beacon/imx8mn/Kconfig
@@ -16,7 +16,7 @@ config IMX8MN_BEACON_2GB_LPDDR
bool "Enable 2GB LPDDR"
config IMX_CONFIG
- default "arch/arm/mach-imx/imx8m/imximage-8mn-lpddr4.cfg"
+ default "board/beacon/imx8mn/imximage-8mn-lpddr4.cfg"
source "board/freescale/common/Kconfig"
diff --git a/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg b/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg
new file mode 100644
index 0000000..7286b26
--- /dev/null
+++ b/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+#define __ASSEMBLY__
+
+ROM_VERSION v2
+BOOT_FROM sd
+LOADER u-boot-spl-ddr.bin 0x912000
diff --git a/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg b/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg
index b89092a..4071219 100644
--- a/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg
+++ b/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg
@@ -6,4 +6,4 @@
#define __ASSEMBLY__
BOOT_FROM sd
-LOADER mkimage.flash.mkimage 0x7E1000
+LOADER u-boot-spl-ddr.bin 0x7e1000
diff --git a/board/gateworks/venice/Kconfig b/board/gateworks/venice/Kconfig
index 639bf35..687b94f 100644
--- a/board/gateworks/venice/Kconfig
+++ b/board/gateworks/venice/Kconfig
@@ -10,6 +10,5 @@ config SYS_CONFIG_NAME
default "imx8mm_venice"
config IMX_CONFIG
- default "arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg"
-
+ default "board/gateworks/venice/imximage-8mm-lpddr4.cfg"
endif
diff --git a/board/gateworks/venice/README b/board/gateworks/venice/README
index 6a0ab1e..773cc09 100644
--- a/board/gateworks/venice/README
+++ b/board/gateworks/venice/README
@@ -25,7 +25,7 @@ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin .
Build U-Boot
============
$ make imx8mm_venice_defconfig
-$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000
+$ make CROSS_COMPILE=aarch64-linux-gnu-
Update eMMC
===========
diff --git a/board/gateworks/venice/imximage-8mm-lpddr4.cfg b/board/gateworks/venice/imximage-8mm-lpddr4.cfg
new file mode 100644
index 0000000..ccaa765
--- /dev/null
+++ b/board/gateworks/venice/imximage-8mm-lpddr4.cfg
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 Gateworks Corporation
+ */
+
+#define __ASSEMBLY__
+
+BOOT_FROM sd
+LOADER u-boot-spl-ddr.bin 0x7E1000
diff --git a/configs/imx8mm_beacon_defconfig b/configs/imx8mm_beacon_defconfig
index de00543..9aea5bf 100644
--- a/configs/imx8mm_beacon_defconfig
+++ b/configs/imx8mm_beacon_defconfig
@@ -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
diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig
index c4c75d2..6f52288 100644
--- a/configs/imx8mm_venice_defconfig
+++ b/configs/imx8mm_venice_defconfig
@@ -25,7 +25,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_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
# CONFIG_USE_BOOTCOMMAND is not set
@@ -56,7 +56,7 @@ CONFIG_CMD_EXT4_WRITE=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIST="imx8mm-venice-gw71xx-0x imx8mm-venice-gw72xx-0x imx8mm-venice-gw73xx-0x imx8mm-venice-gw7901 imx8mm-venice-gw7902"
+CONFIG_OF_LIST="imx8mm-venice imx8mm-venice-gw71xx-0x imx8mm-venice-gw72xx-0x imx8mm-venice-gw73xx-0x imx8mm-venice-gw7901 imx8mm-venice-gw7902"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/imx8mn_beacon_2g_defconfig b/configs/imx8mn_beacon_2g_defconfig
index 5f116b7..80e0bbb 100644
--- a/configs/imx8mn_beacon_2g_defconfig
+++ b/configs/imx8mn_beacon_2g_defconfig
@@ -26,7 +26,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="imx8mn-beacon-kit.dtb"
CONFIG_ARCH_MISC_INIT=y
diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8mn_beacon_defconfig
index 52c7a7e..1d2a825 100644
--- a/configs/imx8mn_beacon_defconfig
+++ b/configs/imx8mn_beacon_defconfig
@@ -25,7 +25,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="imx8mn-beacon-kit.dtb"
CONFIG_ARCH_MISC_INIT=y
@@ -34,6 +34,7 @@ CONFIG_SPL_BOOTROM_SUPPORT=y
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_SPL_I2C=y
CONFIG_SPL_POWER=y
+CONFIG_SPL_WATCHDOG=y
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="u-boot=> "
# CONFIG_BOOTM_NETBSD is not set
@@ -60,7 +61,6 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent interrupts"
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -103,6 +103,7 @@ CONFIG_PHY_GIGE=y
CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_DM_PMIC=y
# CONFIG_SPL_PMIC_CHILDREN is not set
@@ -119,7 +120,9 @@ CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_NXP_FSPI=y
CONFIG_SYSRESET=y
+CONFIG_SPL_SYSRESET=y
CONFIG_SYSRESET_PSCI=y
+CONFIG_SYSRESET_WATCHDOG=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
# CONFIG_SPL_DM_USB is not set
@@ -131,3 +134,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
CONFIG_CI_UDC=y
CONFIG_SDP_LOADADDR=0x0
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_IMX_WATCHDOG=y
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 92aae70..f82ce63 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -24,7 +24,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_BOARD_EARLY_INIT_F=y
CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_BOARD_INIT=y
diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
index 72ff17f..da6a06c 100644
--- a/configs/imx8mq_phanbell_defconfig
+++ b/configs/imx8mq_phanbell_defconfig
@@ -24,7 +24,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_SD_BOOT=y
CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_SPL_BOARD_INIT=y
diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
index 4195370..e1bed34 100644
--- a/configs/pico-imx8mq_defconfig
+++ b/configs/pico-imx8mq_defconfig
@@ -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_BOARD_EARLY_INIT_F=y
CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_BOARD_INIT=y
diff --git a/doc/board/nxp/imx8mq_evk.rst b/doc/board/nxp/imx8mq_evk.rst
index c269fde..92eeda7 100644
--- a/doc/board/nxp/imx8mq_evk.rst
+++ b/doc/board/nxp/imx8mq_evk.rst
@@ -43,13 +43,14 @@ Build U-Boot
$ export CROSS_COMPILE=aarch64-poky-linux-
$ make imx8mq_evk_defconfig
- $ make flash.bin
+ $ make
Burn the flash.bin to MicroSD card offset 33KB:
.. code-block:: bash
$sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc
+ $sudo dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384 conv=notrunc
Boot
----
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py
index e73ff78..700e5a2 100644
--- a/tools/binman/cmdline.py
+++ b/tools/binman/cmdline.py
@@ -52,6 +52,8 @@ controlled by a description in the board device tree.'''
help='Configuration file (.dtb) to use')
build_parser.add_argument('--fake-dtb', action='store_true',
help='Use fake device tree contents (for testing only)')
+ build_parser.add_argument('--fake-ext-blobs', action='store_true',
+ help='Create fake ext blobs with dummy content (for testing only)')
build_parser.add_argument('-i', '--image', type=str, action='append',
help='Image filename to build (if not specified, build all)')
build_parser.add_argument('-I', '--indir', action='append',
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 304fc70..47aac20 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -479,7 +479,8 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded):
def ProcessImage(image, update_fdt, write_map, get_contents=True,
- allow_resize=True, allow_missing=False):
+ allow_resize=True, allow_missing=False,
+ allow_fake_blobs=False):
"""Perform all steps for this image, including checking and # writing it.
This means that errors found with a later image will be reported after
@@ -495,12 +496,15 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True,
allow_resize: True to allow entries to change size (this does a re-pack
of the entries), False to raise an exception
allow_missing: Allow blob_ext objects to be missing
+ allow_fake_blobs: Allow blob_ext objects to be faked with dummy files
Returns:
- True if one or more external blobs are missing, False if all are present
+ True if one or more external blobs are missing or faked,
+ False if all are present
"""
if get_contents:
image.SetAllowMissing(allow_missing)
+ image.SetAllowFakeBlob(allow_fake_blobs)
image.GetEntryContents()
image.GetEntryOffsets()
@@ -549,7 +553,13 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True,
tout.Warning("Image '%s' is missing external blobs and is non-functional: %s" %
(image.name, ' '.join([e.name for e in missing_list])))
_ShowHelpForMissingBlobs(missing_list)
- return bool(missing_list)
+ faked_list = []
+ image.CheckFakedBlobs(faked_list)
+ if faked_list:
+ tout.Warning("Image '%s:%s' has faked external blobs and is non-functional: %s" %
+ (image.name, image.image_name,
+ ' '.join([e.GetDefaultFilename() for e in faked_list])))
+ return bool(missing_list) or bool(faked_list)
def Binman(args):
@@ -636,13 +646,15 @@ def Binman(args):
images = PrepareImagesAndDtbs(dtb_fname, args.image,
args.update_fdt, use_expanded)
+
if args.test_section_timeout:
# Set the first image to timeout, used in testThreadTimeout()
images[list(images.keys())[0]].test_section_timeout = True
- missing = False
+ invalid = False
for image in images.values():
- missing |= ProcessImage(image, args.update_fdt, args.map,
- allow_missing=args.allow_missing)
+ invalid |= ProcessImage(image, args.update_fdt, args.map,
+ allow_missing=args.allow_missing,
+ allow_fake_blobs=args.fake_ext_blobs)
# Write the updated FDTs to our output files
for dtb_item in state.GetAllFdts():
@@ -652,7 +664,7 @@ def Binman(args):
data = state.GetFdtForEtype('u-boot-dtb').GetContents()
elf.UpdateFile(*elf_params, data)
- if missing:
+ if invalid:
tout.Warning("\nSome images are invalid")
# Use this to debug the time take to pack the image
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 7022271..401476f 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -70,6 +70,8 @@ class Entry(object):
missing: True if this entry is missing its contents
allow_missing: Allow children of this entry to be missing (used by
subclasses such as Entry_section)
+ allow_fake: Allow creating a dummy fake file if the blob file is not
+ available. This is mainly used for testing.
external: True if this entry contains an external binary blob
"""
def __init__(self, section, etype, node, name_prefix=''):
@@ -98,8 +100,10 @@ class Entry(object):
self._expand_size = False
self.compress = 'none'
self.missing = False
+ self.faked = False
self.external = False
self.allow_missing = False
+ self.allow_fake = False
@staticmethod
def Lookup(node_path, etype, expanded):
@@ -898,6 +902,14 @@ features to produce new behaviours.
# This is meaningless for anything other than sections
pass
+ def SetAllowFakeBlob(self, allow_fake):
+ """Set whether a section allows to create a fake blob
+
+ Args:
+ allow_fake: True if allowed, False if not allowed
+ """
+ pass
+
def CheckMissing(self, missing_list):
"""Check if any entries in this section have missing external blobs
@@ -909,6 +921,17 @@ features to produce new behaviours.
if self.missing:
missing_list.append(self)
+ def CheckFakedBlobs(self, faked_blobs_list):
+ """Check if any entries in this section have faked external blobs
+
+ If there are faked blobs, the entries are added to the list
+
+ Args:
+ fake_blobs_list: List of Entry objects to be added to
+ """
+ # This is meaningless for anything other than blobs
+ pass
+
def GetAllowMissing(self):
"""Get whether a section allows missing external blobs
diff --git a/tools/binman/etype/blob.py b/tools/binman/etype/blob.py
index fae86ca..6e63d77 100644
--- a/tools/binman/etype/blob.py
+++ b/tools/binman/etype/blob.py
@@ -5,6 +5,8 @@
# Entry-type module for blobs, which are binary objects read from files
#
+import pathlib
+
from binman.entry import Entry
from binman import state
from dtoc import fdt_util
@@ -36,6 +38,11 @@ class Entry_blob(Entry):
self._filename = fdt_util.GetString(self._node, 'filename', self.etype)
def ObtainContents(self):
+ if self.allow_fake and not pathlib.Path(self._filename).is_file():
+ with open(self._filename, "wb") as out:
+ out.truncate(1024)
+ self.faked = True
+
self._filename = self.GetDefaultFilename()
self._pathname = tools.GetInputFilename(self._filename,
self.external and self.section.GetAllowMissing())
@@ -75,3 +82,14 @@ class Entry_blob(Entry):
def ProcessContents(self):
# The blob may have changed due to WriteSymbols()
return self.ProcessContentsUpdate(self.data)
+
+ def CheckFakedBlobs(self, faked_blobs_list):
+ """Check if any entries in this section have faked external blobs
+
+ If there are faked blobs, the entries are added to the list
+
+ Args:
+ fake_blobs_list: List of Entry objects to be added to
+ """
+ if self.faked:
+ faked_blobs_list.append(self)
diff --git a/tools/binman/etype/blob_ext.py b/tools/binman/etype/blob_ext.py
index d6b0ca1..fba6271 100644
--- a/tools/binman/etype/blob_ext.py
+++ b/tools/binman/etype/blob_ext.py
@@ -26,3 +26,11 @@ class Entry_blob_ext(Entry_blob):
def __init__(self, section, etype, node):
Entry_blob.__init__(self, section, etype, node)
self.external = True
+
+ def SetAllowFakeBlob(self, allow_fake):
+ """Set whether the entry allows to create a fake blob
+
+ Args:
+ allow_fake_blob: True if allowed, False if not allowed
+ """
+ self.allow_fake = allow_fake
diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py
index e499775..80fdce0 100644
--- a/tools/binman/etype/mkimage.py
+++ b/tools/binman/etype/mkimage.py
@@ -61,3 +61,23 @@ class Entry_mkimage(Entry):
entry = Entry.Create(self, node)
entry.ReadNode()
self._mkimage_entries[entry.name] = entry
+
+ def SetAllowFakeBlob(self, allow_fake):
+ """Set whether the sub nodes allows to create a fake blob
+
+ Args:
+ allow_fake: True if allowed, False if not allowed
+ """
+ for entry in self._mkimage_entries.values():
+ entry.SetAllowFakeBlob(allow_fake)
+
+ def CheckFakedBlobs(self, faked_blobs_list):
+ """Check if any entries in this section have faked external blobs
+
+ If there are faked blobs, the entries are added to the list
+
+ Args:
+ faked_blobs_list: List of Entry objects to be added to
+ """
+ for entry in self._mkimage_entries.values():
+ entry.CheckFakedBlobs(faked_blobs_list)
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index e2949fc..4e42385 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -689,6 +689,15 @@ class Entry_section(Entry):
for entry in self._entries.values():
entry.SetAllowMissing(allow_missing)
+ def SetAllowFakeBlob(self, allow_fake):
+ """Set whether a section allows to create a fake blob
+
+ Args:
+ allow_fake_blob: True if allowed, False if not allowed
+ """
+ for entry in self._entries.values():
+ entry.SetAllowFakeBlob(allow_fake)
+
def CheckMissing(self, missing_list):
"""Check if any entries in this section have missing external blobs
@@ -700,6 +709,17 @@ class Entry_section(Entry):
for entry in self._entries.values():
entry.CheckMissing(missing_list)
+ def CheckFakedBlobs(self, faked_blobs_list):
+ """Check if any entries in this section have faked external blobs
+
+ If there are faked blobs, the entries are added to the list
+
+ Args:
+ fake_blobs_list: List of Entry objects to be added to
+ """
+ for entry in self._entries.values():
+ entry.CheckFakedBlobs(faked_blobs_list)
+
def _CollectEntries(self, entries, entries_by_name, add_entry):
"""Collect all the entries in an section
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 6be0037..2a98d81 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -308,7 +308,7 @@ class TestFunctional(unittest.TestCase):
def _DoTestFile(self, fname, debug=False, map=False, update_dtb=False,
entry_args=None, images=None, use_real_dtb=False,
use_expanded=False, verbosity=None, allow_missing=False,
- extra_indirs=None, threads=None,
+ allow_fake_blobs=False, extra_indirs=None, threads=None,
test_section_timeout=False, update_fdt_in_elf=None):
"""Run binman with a given test file
@@ -331,6 +331,7 @@ class TestFunctional(unittest.TestCase):
verbosity: Verbosity level to use (0-3, None=don't set it)
allow_missing: Set the '--allow-missing' flag so that missing
external binaries just produce a warning instead of an error
+ allow_fake_blobs: Set the '--fake-ext-blobs' flag
extra_indirs: Extra input directories to add using -I
threads: Number of threads to use (None for default, 0 for
single-threaded)
@@ -369,6 +370,8 @@ class TestFunctional(unittest.TestCase):
args.append('-a%s=%s' % (arg, value))
if allow_missing:
args.append('-M')
+ if allow_fake_blobs:
+ args.append('--fake-ext-blobs')
if update_fdt_in_elf:
args += ['--update-fdt-in-elf', update_fdt_in_elf]
if images:
@@ -4661,6 +4664,16 @@ class TestFunctional(unittest.TestCase):
str(e.exception),
"Not enough space in '.*u_boot_binman_embed_sm' for data length.*")
+ def testFakeBlob(self):
+ """Test handling of faking an external blob"""
+ with test_util.capture_sys_output() as (stdout, stderr):
+ self._DoTestFile('203_fake_blob.dts', allow_missing=True,
+ allow_fake_blobs=True)
+ err = stderr.getvalue()
+ self.assertRegex(err,
+ "Image '.*' has faked external blobs and is non-functional: .*")
+ os.remove('binman_faking_test_blob')
+
if __name__ == "__main__":
unittest.main()
diff --git a/tools/binman/test/203_fake_blob.dts b/tools/binman/test/203_fake_blob.dts
new file mode 100644
index 0000000..22cf67f
--- /dev/null
+++ b/tools/binman/test/203_fake_blob.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ blob-ext {
+ filename = "binman_faking_test_blob";
+ };
+ };
+};