Merge branch '2022-01-07-imx8-and-buildman-updates'
- 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.
This commit is contained in:
commit
47de135994
1
Makefile
1
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
|
||||
|
@ -3,74 +3,50 @@
|
||||
* Copyright 2019 NXP
|
||||
*/
|
||||
|
||||
#include "imx8mm-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
binman: binman {
|
||||
multiple-images;
|
||||
};
|
||||
|
||||
wdt-reboot {
|
||||
compatible = "wdt-reboot";
|
||||
wdt = <&wdog1>;
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
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 {
|
||||
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 {
|
||||
&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&aips3 {
|
||||
u-boot,dm-spl;
|
||||
&binman_fip {
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
description = "Trusted Firmware FIP";
|
||||
load = <0x40310000>;
|
||||
type = "firmware";
|
||||
|
||||
fip_blob {
|
||||
filename = "fip.bin";
|
||||
type = "blob-ext";
|
||||
};
|
||||
};
|
||||
|
||||
&iomuxc {
|
||||
u-boot,dm-spl;
|
||||
&binman_configuration {
|
||||
loadables = "atf", "fip";
|
||||
};
|
||||
|
||||
&pinctrl_uart3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2_gpio {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc3 {
|
||||
u-boot,dm-spl;
|
||||
&fec1 {
|
||||
phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
@ -93,6 +69,38 @@
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_i2c2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_pmic {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_uart3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2_gpio {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
@ -109,147 +117,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 = "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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,74 +3,33 @@
|
||||
* Copyright 2019 NXP
|
||||
*/
|
||||
|
||||
#include "imx8mm-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
binman: binman {
|
||||
multiple-images;
|
||||
};
|
||||
|
||||
wdt-reboot {
|
||||
compatible = "wdt-reboot";
|
||||
wdt = <&wdog1>;
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
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 {
|
||||
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 {
|
||||
&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&aips3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&iomuxc {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_uart3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2_gpio {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc3 {
|
||||
u-boot,dm-spl;
|
||||
&fec1 {
|
||||
phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
@ -93,6 +52,38 @@
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_i2c2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_pmic {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_uart3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc2_gpio {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&pinctrl_usdhc3 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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>;
|
||||
};
|
||||
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
#include "imx8mq-u-boot.dtsi"
|
||||
|
||||
&usdhc1 {
|
||||
mmc-hs400-1_8v;
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
#include "imx8mq-u-boot.dtsi"
|
||||
|
||||
®_usdhc2_vmmc {
|
||||
u-boot,off-on-delay-us = <20000>;
|
||||
};
|
||||
|
@ -9,6 +9,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx8mq.dtsi"
|
||||
#include "imx8mq-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TechNexion PICO-PI-8M";
|
||||
|
122
arch/arm/dts/imx8mq-u-boot.dtsi
Normal file
122
arch/arm/dts/imx8mq-u-boot.dtsi
Normal file
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
===========================
|
||||
|
9
board/beacon/imx8mm/imximage-8mm-lpddr4.cfg
Normal file
9
board/beacon/imx8mm/imximage-8mm-lpddr4.cfg
Normal file
@ -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
|
@ -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"
|
||||
|
||||
|
10
board/beacon/imx8mn/imximage-8mn-lpddr4.cfg
Normal file
10
board/beacon/imx8mn/imximage-8mn-lpddr4.cfg
Normal file
@ -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
|
@ -6,4 +6,4 @@
|
||||
#define __ASSEMBLY__
|
||||
|
||||
BOOT_FROM sd
|
||||
LOADER mkimage.flash.mkimage 0x7E1000
|
||||
LOADER u-boot-spl-ddr.bin 0x7e1000
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
===========
|
||||
|
9
board/gateworks/venice/imximage-8mm-lpddr4.cfg
Normal file
9
board/gateworks/venice/imximage-8mm-lpddr4.cfg
Normal file
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
----
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
14
tools/binman/test/203_fake_blob.dts
Normal file
14
tools/binman/test/203_fake_blob.dts
Normal file
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user