[PATCH v2] arm64: zynqmp: Add support for u-boot.itb generation with ATF

Michal Simek michal.simek at xilinx.com
Mon Dec 9 15:21:02 CET 2019


On 05. 12. 19 15:33, Tom Rini wrote:
> On Thu, Dec 05, 2019 at 09:46:57AM +0100, Michal Simek wrote:
>> Follow i.MX, Sunxi, RISC-V and Rockchip to generate u-boot.itb which
>> includes U-Boot proper, ATF and DTBs in FIT format. ZynqMP supports FIT for
>> quite a long time but with using out of tree solution. The patch is filling
>> this gap.
>>
>> Tested on zcu102, zcu104 and zcu100/Ultra96.
>>
>> zcu100/Ultra96 v2.2 ATF build by:
>> make DEBUG=0 ZYNQMP_CONSOLE=cadence1 RESET_TO_BL31=1 PLAT=zynqmp bl31
>>
>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>> ---
>>
>> Changes in v2:
>> - Exchange u-boot/atf in config section
>> - Use default ATF baseaddr from mainline
>> - Update commit message
>>
>>  Kconfig                                 |  3 +-
>>  arch/arm/mach-zynqmp/mkimage_fit_atf.sh | 99 +++++++++++++++++++++++++
> 
> My only complaint here is adding and N'th version of mkimage_fit_atf.sh
> that varies seemingly only in addresses.  Can we not abstract this
> enough to make it for everyone to use and pass in the needed values?

First of all I will be sending v3 because of other things I found.

Adding more folks to this.

I have went through all versions and here is sort of stat:

board/sunxi/mksunxi_fit_atf.sh - firmware is uboot, atf loadables (not
standard)

board/theobroma-systems/puma_rk3399/fit_spl_atf.sh - license present
atf, uboot, pmufw (only present here)

arch/arm/mach-rockchip/make_fit_atf.py - python (only one) and read
addresses from elfs

arch/arm/mach-rockchip/fit_spl_optee.sh - firmware is tee(no ATF)

arch/riscv/lib/mkimage_fit_opensbi.sh - reads stuff from .config and
also handles non DT case

arch/arm/mach-imx/mkimage_fit_atf.sh - optee, atf, incorrect dt nodes names

And of course this one.

-------------------------------

I think the key point here is to start talk about how this should be done.
Language? One is python others are shell scripts.

Should it stop when ATF/TEE is not found?

What file to read to get information from u-boot? .config or
include/generated/autoconf.h?

Read information about locations from ELFs?

Should we handle non DT case? Yes?

Move just DT generation to common location and keep VARs, file checking
in board/arch scripts?

Thanks,
Michal


More information about the U-Boot mailing list