[Buildroot] [PATCH v9 11/22] boot/ti-k3-r5-loader: set binman environment

Romain Naour romain.naour at smile.fr
Wed Apr 3 08:28:34 UTC 2024


Hello Bryan, All,

Le 19/03/2024 à 16:16, Bryan Brattlof a écrit :
> Hi Dario,
> 
> On March  4, 2024 thus sayeth Dario Binacchi:
>> Recent version of U-Boot use binman to provide a mechanism for building
>> images, from simple SPL + U-Boot combinations, to more complex
>> arrangements with many parts.
>>
>> The patch set the BINMAN_INDIRS environment variable to provide the
>> directory to search for binary blobs and select the packages required by
>> binman.
>>
>> The dependency of binman is not really easy to follow. First we have the
>> packages list from binman.rst [1] then we have to install additional python
>> modules [2]. Maybe in the future it will be necessary to add host-lzma and
>> host-lz4 in the dependencies list.
>>
>> [1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/binman/binman.rst?plain=1#L377
>> [2] https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
>> Co-developed-by: Michael Trimarchi <michael at amarulasolutions.com>
>> Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
>> Co-developed-by: Romain Naour <romain.naour at smile.fr>
>> Signed-off-by: Romain Naour <romain.naour at smile.fr>
>> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
>>
>> ---
>>
> 
> ...
> 
>> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk 
>> b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>> index 0ffcb8235f2e..fdb058f3b72a 100644
>> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>> @@ -39,7 +39,12 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
>>  	host-pkgconf \
>>  	$(BR2_MAKE_HOST_DEPENDENCY) \
>>  	host-arm-gnu-toolchain \
>> -	host-openssl
>> +	host-openssl \
>> +	host-python-jsonschema \
>> +	host-python-pyyaml \
>> +	host-python3 \
>> +	host-python-setuptools \
>> +	host-python-pylibfdt
> 
> Just a question on how boot dependencies are resolved. Do we need to add 
> ti-k3-boot-firmware to this list? How does ti-k3-r5-loader know to 
> 'build' the firmware before we build tiboot3.bin?

Indeed, without ti-k3-boot-firmware package installed, binman warn about
"Missing blob"

make ti_am62x_sk_defconfig
make ti-k3-r5-loader

  BINMAN  .binman_stamp
Image 'tiboot3-am62x-hs-evm.bin' is missing optional external blobs but is still
functional: ti-fs-enc.bin sysfw-inner-cert

/binman/tiboot3-am62x-hs-evm.bin/ti-fs-enc.bin
(ti-sysfw/ti-fs-firmware-am62x-hs-enc.bin):
   Missing blob

/binman/tiboot3-am62x-hs-evm.bin/sysfw-inner-cert
(ti-sysfw/ti-fs-firmware-am62x-hs-cert.bin):
   Missing blob

Image 'tiboot3-am62x-hs-fs-evm.bin' is missing optional external blobs but is
still functional: ti-fs-enc.bin sysfw-inner-cert

/binman/tiboot3-am62x-hs-fs-evm.bin/ti-fs-enc.bin
(ti-sysfw/ti-fs-firmware-am62x-hs-fs-enc.bin):
   Missing blob

/binman/tiboot3-am62x-hs-fs-evm.bin/sysfw-inner-cert
(ti-sysfw/ti-fs-firmware-am62x-hs-fs-cert.bin):
   Missing blob

Image 'tiboot3-am62x-gp-evm.bin' is missing optional external blobs but is still
functional: ti-fs-gp.bin

/binman/tiboot3-am62x-gp-evm.bin/ti-fs-gp.bin
(ti-sysfw/ti-fs-firmware-am62x-gp.bin):
   Missing blob

  OFCHK   .config

So, we should add ti-k3-boot-firmware in dependencies to avoid building
ti-k3-r5-loader before ti-k3-boot-firmware.

When building the AM6 defconfig, the build order is ordered alphabetically by
default and ti-k3-boot-firmware is installed before ti-k3-r5-loader.

Best regards,
Romain


> 
> ~Bryan




More information about the buildroot mailing list