[PATCH 3/3] boards: siemens: iot2050: Unify PG1 and PG2/M.2 configurations again

Jan Kiszka jan.kiszka at siemens.com
Thu Jun 15 13:22:13 CEST 2023


On 12.06.23 23:17, Simon Glass wrote:
> Hi Jan,
> 
> On Mon, 5 Jun 2023 at 15:40, Jan Kiszka <jan.kiszka at siemens.com> wrote:
>>
>> From: Jan Kiszka <jan.kiszka at siemens.com>
>>
>> This avoids having to maintain to defconfigs that are 99% equivalent.
>> The approach is to use binman to generate two flash images,
>> flash-pg1.bin and flash-pg2.bin. With the help of some macros, we can
>> avoid duplicating the common binman image definitions.
>>
>> Suggested-by: Andrew Davis <afd at ti.com>
>> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
>> ---
>>  arch/arm/dts/k3-am65-iot2050-boot-image.dtsi  | 299 ++++++++++--------
>>  board/siemens/iot2050/Kconfig                 |  30 +-
>>  board/siemens/iot2050/board.c                 |  14 +-
>>  board/siemens/iot2050/config.mk               |   6 +-
>>  ...ot2050_pg1_defconfig => iot2050_defconfig} |   3 +-
>>  configs/iot2050_pg2_defconfig                 | 150 ---------
>>  doc/board/siemens/iot2050.rst                 |  29 +-
>>  tools/iot2050-sign-fw.sh                      |   9 +-
>>  8 files changed, 202 insertions(+), 338 deletions(-)
>>  rename configs/{iot2050_pg1_defconfig => iot2050_defconfig} (97%)
>>  delete mode 100644 configs/iot2050_pg2_defconfig
> 
> We need to find another way to do this... the macros are horrible.
> 
> Could you put the common code in another .dtsi file and include it twice?
> 
> Then in the 'main' .dtsi file refer to some anchors to set the properties:
> 
> &u_boot {
>    fit,fdt-list = "...";
> };

I can use some preprocessor defines in that template code which need to
be re-defined before the inclusions. Prototype is working already.

> 
> Or do we need a new binman feature to handle this?
> 
> BTW using #ifdef on a particular target is something we should avoid.
> Isn't there another Kconfig (for the feature itself) that you can use?

What are you referring to?

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux



More information about the U-Boot mailing list