[PATCH v2 4/9] verdin-imx8mm: switch to use binman to pack images

Frieder Schrempf frieder.schrempf at kontron.de
Wed Aug 25 10:41:46 CEST 2021


On 24.08.21 18:13, Simon Glass wrote:
> Hi Marcel,
> 
> On Mon, 23 Aug 2021 at 09:09, Marcel Ziswiler <marcel at ziswiler.com> wrote:
>>
>> From: Marcel Ziswiler <marcel.ziswiler at toradex.com>
>>
>> Use binman to pack images.
>>
>> Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
>>
>> ---
>>
>> Changes in v2:
>> - Explicitly pass filename to binman when generating binaries as
>>   suggested by Heiko.
>> - Use proper intermediate binary u-boot-spl-ddr.bin for imximage as
>>   pointed out by Heiko.
>>
>>  arch/arm/dts/imx8mm-verdin-u-boot.dtsi   | 124 ++++++++++++++++++++++-
>>  arch/arm/mach-imx/imx8m/Kconfig          |   1 +
>>  board/toradex/verdin-imx8mm/imximage.cfg |  11 +-
>>  configs/verdin-imx8mm_defconfig          |   2 +-
>>  doc/board/toradex/verdin-imx8mm.rst      |  53 +++++-----
>>  5 files changed, 157 insertions(+), 34 deletions(-)
>>
>> diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
>> index a97626fa0c1..a3ad8f3ad37 100644
>> --- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
>> +++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
>> @@ -1,11 +1,15 @@
>>  // SPDX-License-Identifier: GPL-2.0+ OR MIT
>>  /*
>> - * Copyright 2020 Toradex
>> + * Copyright 2021 Toradex
>>   */
>>
>>  #include "imx8mm-u-boot.dtsi"
>>
>>  / {
>> +       binman: binman {
>> +               multiple-images;
>> +       };
>> +
>>         firmware {
>>                 optee {
>>                         compatible = "linaro,optee-tz";
>> @@ -91,3 +95,121 @@
>>  &wdog1 {
>>         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>;
>> +               };
>> +
>> +               blob_1: blob-ext at 1 {
> 
> This works but the naming is a little odd. You can do:
> 
> 1d-imem {
>    type = "blob-ext";

This is copied from the existing binman config for imx8mm-evk. Before we do such cosmetic changes for each i.MX8M board separately, maybe it would be a good idea to switch to a common binman config first and then do this for all boards at once.

> 
>> +                       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>;
>> +               };
>> +       };
>> +
[...]


More information about the U-Boot mailing list