Hi,
in order to support multiple board variants by the same bootloader, we want to add multiple u-boot device tree blobs to a fitImage included in the u-boot binary (flash.bin).
However, during building, binman fails:
| /home/jenkins/build-arm/workspace/sources/u-boot/tools/binman/binman --toolpath ./tools build -u -d u-boot.dtb -O . -m --allow-missing --fake-ext-blobs -I . -I /home/jenkins/build-arm/workspace/sources/u-boot -I /home/jenkins/build-arm/workspace/sources/u-boot/board/s/s_imx8 -I arch/arm/dts -a of-list="s_imx8-common s_imx8-msc-common" -a atf-bl31-path= -a tee-os-path= -a ti-dm-path= -a opensbi-path= -a default-dt="s_imx8-common" -a scp-path= -a rockchip-tpl-path= -a spl-bss-pad= -a tpl-bss-pad=1 -a vpl-bss-pad=1 -a spl-dtb=y -a tpl-dtb= -a vpl-dtb= -a pre-load-key-path= -a of-spl-remove-props="interrupt-parent interrupts"
| binman: 'NoneType' object has no attribute 'startswith'
| /home/jenkins/build-arm/workspace/sources/u-boot/Makefile:1578: recipe for target 'flash.bin' failed
| make[1]: *** [flash.bin] Error 1In the u-boot configs, we added
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIST="s_imx8-common s_imx8-msc-common"
CONFIG_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT=yIn our custom dst file, we're including arch/arm/dts/imx8mm-u-boot.dtsi which has the binman node definition.
Used u-boot version: v2025.01 (mainline)
Used Python version: 3.8.0
Does anybody have an idea what could be the issue here or what we could check?
Kind regards,
Markus
Solved! Go to Solution.
Hi Salas,
we have found another defconfig setting which builds without errors:
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIST="dt1 dt2 dt3"This allows us to add several device trees in a fit image inside the u-boot binary and make SPL select which device tree to use for u-boot proper.
Our binman config is the standard config from arch/arm/dts/imx8mm-u-boot.dtsi:
&binman {
filename = "flash.bin";
section {
pad-byte = <0x00>;
#ifdef CONFIG_FSPI_CONF_HEADER
fspi_conf_block {
filename = CONFIG_FSPI_CONF_FILE;
type = "blob-ext";
size = <0x1000>;
};
#endif
#ifdef CONFIG_IMX_HAB
nxp-imx8mcst@0 {
filename = "u-boot-spl-mkimage.signed.bin";
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
nxp,unlock;
args; /* Needed by mkimage etype superclass */
#endif
binman_imx_spl: nxp-imx8mimage {
filename = "u-boot-spl-mkimage.bin";
nxp,boot-from = "sd";
nxp,rom-version = <1>;
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
args; /* Needed by mkimage etype superclass */
section {
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";
};
ddr-1d-imem-fw {
filename = "lpddr4_pmu_train_1d_imem.bin";
align-end = <4>;
type = "blob-ext";
};
ddr-1d-dmem-fw {
filename = "lpddr4_pmu_train_1d_dmem.bin";
align-end = <4>;
type = "blob-ext";
};
ddr-2d-imem-fw {
filename = "lpddr4_pmu_train_2d_imem.bin";
align-end = <4>;
type = "blob-ext";
};
ddr-2d-dmem-fw {
filename = "lpddr4_pmu_train_2d_dmem.bin";
align-end = <4>;
type = "blob-ext";
};
};
};
#ifdef CONFIG_IMX_HAB
};
nxp-imx8mcst@1 {
filename = "u-boot-fit.signed.bin";
nxp,loader-address = <CONFIG_SPL_LOAD_FIT_ADDRESS>;
#ifdef CONFIG_FSPI_CONF_HEADER
offset = <0x58C00>;
#else
offset = <0x57c00>;
#endif
args; /* Needed by mkimage etype superclass */
#endif
binman_imx_fit: fit {
description = "Configuration to load ATF before U-Boot";
filename = "u-boot.itb";
#ifndef CONFIG_IMX_HAB
fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
#endif
fit,fdt-list = "of-list";
#address-cells = <1>;
#ifdef CONFIG_FSPI_CONF_HEADER
offset = <0x58C00>;
#else
offset = <0x57c00>;
#endif
images {
uboot {
arch = "arm64";
compression = "none";
description = "U-Boot (64-bit)";
load = <CONFIG_TEXT_BASE>;
type = "standalone";
uboot-blob {
filename = "u-boot-nodtb.bin";
type = "blob-ext";
};
};
#ifndef CONFIG_ARMV8_PSCI
atf {
arch = "arm64";
compression = "none";
description = "ARM Trusted Firmware";
entry = <0x920000>;
load = <0x920000>;
type = "firmware";
atf-blob {
filename = "bl31.bin";
type = "atf-bl31";
};
};
#endif
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";
@config-SEQ {
description = "NAME";
fdt = "fdt-SEQ";
firmware = "uboot";
#ifndef CONFIG_ARMV8_PSCI
loadables = "atf";
#endif
};
};
};
#ifdef CONFIG_IMX_HAB
};
#endif
};
};Kind regards,
Markus
Hello @MB_stek
I hope you are doing very well.
Please, if possible share your device tree with the binman node to test by my side.
If possible share steps of you compilation process.
Best regards,
Salas.
Hi Salas,
we have found another defconfig setting which builds without errors:
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIST="dt1 dt2 dt3"This allows us to add several device trees in a fit image inside the u-boot binary and make SPL select which device tree to use for u-boot proper.
Our binman config is the standard config from arch/arm/dts/imx8mm-u-boot.dtsi:
&binman {
filename = "flash.bin";
section {
pad-byte = <0x00>;
#ifdef CONFIG_FSPI_CONF_HEADER
fspi_conf_block {
filename = CONFIG_FSPI_CONF_FILE;
type = "blob-ext";
size = <0x1000>;
};
#endif
#ifdef CONFIG_IMX_HAB
nxp-imx8mcst@0 {
filename = "u-boot-spl-mkimage.signed.bin";
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
nxp,unlock;
args; /* Needed by mkimage etype superclass */
#endif
binman_imx_spl: nxp-imx8mimage {
filename = "u-boot-spl-mkimage.bin";
nxp,boot-from = "sd";
nxp,rom-version = <1>;
nxp,loader-address = <CONFIG_SPL_TEXT_BASE>;
args; /* Needed by mkimage etype superclass */
section {
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";
};
ddr-1d-imem-fw {
filename = "lpddr4_pmu_train_1d_imem.bin";
align-end = <4>;
type = "blob-ext";
};
ddr-1d-dmem-fw {
filename = "lpddr4_pmu_train_1d_dmem.bin";
align-end = <4>;
type = "blob-ext";
};
ddr-2d-imem-fw {
filename = "lpddr4_pmu_train_2d_imem.bin";
align-end = <4>;
type = "blob-ext";
};
ddr-2d-dmem-fw {
filename = "lpddr4_pmu_train_2d_dmem.bin";
align-end = <4>;
type = "blob-ext";
};
};
};
#ifdef CONFIG_IMX_HAB
};
nxp-imx8mcst@1 {
filename = "u-boot-fit.signed.bin";
nxp,loader-address = <CONFIG_SPL_LOAD_FIT_ADDRESS>;
#ifdef CONFIG_FSPI_CONF_HEADER
offset = <0x58C00>;
#else
offset = <0x57c00>;
#endif
args; /* Needed by mkimage etype superclass */
#endif
binman_imx_fit: fit {
description = "Configuration to load ATF before U-Boot";
filename = "u-boot.itb";
#ifndef CONFIG_IMX_HAB
fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
#endif
fit,fdt-list = "of-list";
#address-cells = <1>;
#ifdef CONFIG_FSPI_CONF_HEADER
offset = <0x58C00>;
#else
offset = <0x57c00>;
#endif
images {
uboot {
arch = "arm64";
compression = "none";
description = "U-Boot (64-bit)";
load = <CONFIG_TEXT_BASE>;
type = "standalone";
uboot-blob {
filename = "u-boot-nodtb.bin";
type = "blob-ext";
};
};
#ifndef CONFIG_ARMV8_PSCI
atf {
arch = "arm64";
compression = "none";
description = "ARM Trusted Firmware";
entry = <0x920000>;
load = <0x920000>;
type = "firmware";
atf-blob {
filename = "bl31.bin";
type = "atf-bl31";
};
};
#endif
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";
@config-SEQ {
description = "NAME";
fdt = "fdt-SEQ";
firmware = "uboot";
#ifndef CONFIG_ARMV8_PSCI
loadables = "atf";
#endif
};
};
};
#ifdef CONFIG_IMX_HAB
};
#endif
};
};Kind regards,
Markus