[U-Boot] How to support ATF on u-boot

Kever Yang kever.yang at rock-chips.com
Thu Jul 14 04:07:09 CEST 2016


Hi Andreas,

On 07/13/2016 08:27 PM, Andreas Färber wrote:
> Hi Kever,
>
> Am 20.06.2016 um 04:59 schrieb Kever Yang:
>>      I want to upstream a new SoC named RK3399 from Rockchip which is
>> AARCH64/ARMv8, we need to support Arm Trust Firmware base on U-boot.
>>
>>      Right now we are using a miniloader(just like SPL in U-boot) to load
>> ATF/U-boot,
>> and PC jump from miniloader to ATF and then to U-boot(with CPU change to
>> EL2 mode or nsEL1),
>> then U-boot load kernel/rootfs as usual.
>>
>>      The ATF support for RK3399 has already upstream
>>      Could you give your opinion on how to support ATF on U-boot upstream?
>> When I asked Simon Glass offline, he suggest if we can build ATF as part
>> of the
>> U-boot build process, perhaps with a script in U-boot tree,
>>
>> Perhaps something like:
>>
>> make rk3399_board_defconfig
>> make
>> ./scripts/build-atf-image rk3399_board
>> ^^ new script
>>
>> In any case, a good README would help.
> I've started looking into RK3368 for my GeekBox, which raises a similar
> issue. Are you working on that as well or just RK3399?
I'm working on RK3399 platform now, but the rk3368 should be the same.
>
> Personally I think that the approach the HiKey has taken is the best,
> i.e. decouple U-Boot from ATF and just supply a README for how to make
> it work with U-Boot as ATF payload.
Yes, I'm cleaning a patchset just like HiKey with a readme to support ATF,
but in Rockchip way and Rockchip tools.
>
> Obviously it would help to integrate your loaderimage tool into mkimage.
For the loaderimage integrate into mkimage, I think it depends on if we need
the Rockchip miniloader in the future. If the SPL support the package 
and parse
multi image including ATF, then we can use everyting from U-boot.
>
> Also, what is the difference between your trust_merger tool and ATF's
> fip_create / fiptool?
I didn't look into ATF's fip_create/fiptool so far, the trust_merger 
tool is to package
the  ATF binary/binaries in format for Rockchip miniloader.

Thanks,
- Kever
>
> Regards,
> Andreas
>




More information about the U-Boot mailing list