[PATCH V3 1/5] imx: imx8mq_evk: switch to binman

Peng Fan (OSS) peng.fan at oss.nxp.com
Mon Nov 22 09:59:52 CET 2021



On 2021/11/12 1:24, Heiko Thiery wrote:
> Hi Peng,
> 
> Am Fr., 22. Okt. 2021 um 04:07 Uhr schrieb Peng Fan (OSS)
> <peng.fan at oss.nxp.com>:
>>
>> From: Peng Fan <peng.fan at nxp.com>
>>
>> Switch to use binman to pack images
> 
> After switching to binman you will hit the same issue I have in the
> u-boot CI. The mkimage step will fail because the hdmi firmware blob
> can not be found [1]. There is already a discuusion ongoing how to fix
> that [2].

It should not. I not met failure before, let me try again.

Thanks,
Peng.

> 
> [1] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Fpipermail%2Fu-boot%2F2021-October%2F464338.html&data=04%7C01%7Cpeng.fan%40nxp.com%7C801faca45846458ee4a908d9a5383734%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637722483129948474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KOwwQdaUvADXP5PEoniPUrcJ8tfsqb4wBF1KnfZmYqA%3D&reserved=0
> [2] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Fpipermail%2Fu-boot%2F2021-November%2F466181.html&data=04%7C01%7Cpeng.fan%40nxp.com%7C801faca45846458ee4a908d9a5383734%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637722483129948474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hLEvWAvxTEHffELh1cTIgILUm%2FsDbZFO86L0lP1WWGk%3D&reserved=0
> 
>>
>> Signed-off-by: Peng Fan <peng.fan at nxp.com>
>> ---
>>   arch/arm/dts/imx8mq-evk-u-boot.dtsi     |   2 +
>>   arch/arm/dts/imx8mq-u-boot.dtsi         | 122 ++++++++++++++++++++++++
>>   arch/arm/mach-imx/imx8m/Kconfig         |   1 +
>>   board/freescale/imx8mq_evk/Kconfig      |   2 +-
>>   board/freescale/imx8mq_evk/imximage.cfg |  11 +++
>>   configs/imx8mq_evk_defconfig            |   2 +-
>>   6 files changed, 138 insertions(+), 2 deletions(-)
>>   create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi
>>   create mode 100644 board/freescale/imx8mq_evk/imximage.cfg
>>
>> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
>> index 2cfc12b7e0..6f9c81462e 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-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
>> new file mode 100644
>> index 0000000000..2c10e9b645
>> --- /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 at 1 {
>> +                       filename = "lpddr4_pmu_train_1d_imem.bin";
>> +                       size = <0x8000>;
>> +               };
>> +
>> +               blob_2: blob-ext at 2 {
>> +                       filename = "lpddr4_pmu_train_1d_dmem.bin";
>> +                       size = <0x4000>;
>> +               };
>> +
>> +               blob_3: blob-ext at 3 {
>> +                       filename = "lpddr4_pmu_train_2d_imem.bin";
>> +                       size = <0x8000>;
>> +               };
>> +
>> +               blob_4: blob-ext at 4 {
>> +                       filename = "lpddr4_pmu_train_2d_dmem.bin";
>> +                       size = <0x4000>;
>> +               };
>> +       };
>> +
>> +       signed_hdmi {
>> +               filename = "signed_hdmi.bin";
>> +
>> +               blob_5: blob-ext at 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/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
>> index 276b8bd974..c556e712b7 100644
>> --- a/arch/arm/mach-imx/imx8m/Kconfig
>> +++ b/arch/arm/mach-imx/imx8m/Kconfig
>> @@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM
>>
>>   config TARGET_IMX8MQ_EVK
>>          bool "imx8mq_evk"
>> +       select BINMAN
>>          select IMX8MQ
>>          select IMX8M_LPDDR4
>>
>> diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig
>> index c4d20ad7c7..a7c49744b3 100644
>> --- a/board/freescale/imx8mq_evk/Kconfig
>> +++ b/board/freescale/imx8mq_evk/Kconfig
>> @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME
>>          default "imx8mq_evk"
>>
>>   config IMX_CONFIG
>> -       default "arch/arm/mach-imx/imx8m/imximage.cfg"
>> +       default "board/freescale/imx8mq_evk/imximage.cfg"
>>
>>   endif
>> diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg
>> new file mode 100644
>> index 0000000000..74f12b30d2
>> --- /dev/null
>> +++ b/board/freescale/imx8mq_evk/imximage.cfg
>> @@ -0,0 +1,11 @@
>> +/* SPDX-License-Identifier: GPL-2.0+ */
>> +/*
>> + * Copyright 2021 NXP
>> + */
>> +
>> +#define __ASSEMBLY__
>> +
>> +FIT
>> +BOOT_FROM      sd
>> +SIGNED_HDMI    signed_hdmi.bin
>> +LOADER         mkimage.flash.mkimage   0x7e1000
>> diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
>> index 62fe6f1523..5970d8c164 100644
>> --- a/configs/imx8mq_evk_defconfig
>> +++ b/configs/imx8mq_evk_defconfig
>> @@ -18,7 +18,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
>> --
>> 2.30.0
>>
> 


More information about the U-Boot mailing list