]> git.ipfire.org Git - people/ms/u-boot.git/commit - tools/rkcommon.c
rockchip: mkimage: update rkimage to support pre-padded payloads
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Wed, 15 Mar 2017 11:08:45 +0000 (12:08 +0100)
committerSimon Glass <sjg@chromium.org>
Wed, 5 Apr 2017 02:01:57 +0000 (20:01 -0600)
commit308277569229137e38420dbaa1190ef1f9d4be76
treecebca18e9ea588190109087b148a215e21fd9570
parent3d54eabcafec9c232751dc717eabad4a18c0dd86
rockchip: mkimage: update rkimage to support pre-padded payloads

To simplify the creation of AArch64 SPL images for the RK3399, we
use the ENABLE_ARM_SOC_BOOT0_HOOK option and prepend 4 bytes of
padding at the start of the text section. This makes it easy for
mkimage to rewrite this word with the 'RK33' boot magic.

This change brings logic to calculate the header size and allocate
the header back in sync. For the RK3399 we now limit the header to
before the payload (i.e. the 'header0' and the padding up to the
actual image) and overwrite the first word (inserted by the
boot0-hook for this purpose) with the 'RK33' magic in-place.

X-AffectedPlatforms: RK3399-Q7
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
tools/rkcommon.c
tools/rkcommon.h