Re: [PATCH v4 3/6] arm: mediatek: build Genio 510 and 700 boot images with binman

"Carlo Caione" <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
On Tue Aug 25, 2026 at 10:38 PM CEST, David Lechner wrote:
> On 8/14/26 9:47 AM, Carlo Caione wrote:

[...]
>> +#include "mtk-genio-binman.dtsi"
>> +#include "mtk-genio-mtk-boot-binman.dtsi"
>> +#include "mtk-genio-bootloaders-binman.dtsi"
>
> Would be nice if the commit message explained why we need 3 separate files
> if we always include them all.

We do not need 3 separate files, I just decided to split them because
each file is actually generating a different binary, so it was better to
separate them.

[...]
>> +
>> +					atf-bl31 {
>> +					};
>> +
>> +					hash {
>> +						algo = "sha256";
>> +					};
>> +				};
>> +
>> +				optee {
>
> Can we use `fit,operation = "split-elf";` here instead of requiring config
> options for the load and entry address?

Uh, I was not ware of that, thanks for suggesting this.

[...]
>> +		mkimage {
>> +			args = "-T", "mtk_image",
>> +			       "-a", __stringify(CONFIG_MTK_GENIO_BROM_LOAD_ADDR),
>> +			       "-e", __stringify(CONFIG_MTK_GENIO_BROM_LOAD_ADDR),
>> +			       "-n", "media=emmc;arm64=1";
>
> Should this be coming from CONFIG_MTK_BROM_HEADER_INFO?
>
> We will probably eventually be adding ufs and nor boot support too.

Yes, indeed. I'll fix this.

[...]
>>  F:	arch/arm/dts/mt8188-u-boot.dtsi
>>  F:	arch/arm/dts/mt8390-genio-common-u-boot.dtsi
>>  F:	arch/arm/dts/mt8370-genio-510-evk-u-boot.dtsi
>> +F:	arch/arm/dts/mtk-genio-*-binman.dtsi
>> +F:	arch/arm/dts/mtk-genio-binman.dtsi
>
> Should these be -u-boot.dtsi? I know the won't actually match anything
> but makes it clear that the are u-boot-specific additions rather than
> something that hasn't been upstreamed yet.

Yes, makes sense.

>>  F:	arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi
>>  F:	configs/mt8188.config
>>  F:	configs/mt8370_genio_510_evk_defconfig
>> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
>> index 0618f42c941..e5d0aade7fc 100644
>> --- a/common/spl/Kconfig
>> +++ b/common/spl/Kconfig
>> @@ -194,6 +194,7 @@ config SPL_SHOW_ERRORS
>>  config SPL_BINMAN_SYMBOLS
>>  	bool "Declare binman symbols in SPL"
>>  	depends on SPL_FRAMEWORK && BINMAN
>> +	default n if TARGET_MT8188
>
> I think it is unusual to add board/chip-specific things in this file as the
> lists could grow very long. Maybe we can make a MTK_GENIO symbol so that we
> don't have to keep adding more TARGETs here?

Agreed.

Thanks!

--
Carlo Caione
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.