mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
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>
This commit is contained in:
committed by
Simon Glass
parent
3d54eabcaf
commit
3082775692
@@ -33,19 +33,6 @@ int rkcommon_check_params(struct image_tool_params *params);
|
||||
*/
|
||||
const char *rkcommon_get_spl_hdr(struct image_tool_params *params);
|
||||
|
||||
/**
|
||||
* rkcommon_get_spl_hdr_padto8() - check if we need to pad to 8 bytes
|
||||
*
|
||||
* Rockchip's bootrom starts execution right after the SPL header (i.e.
|
||||
* at offset 4), but we can not reasonably align the test section of
|
||||
* an AArch64 SPL at 4 bytes (as this would break natural alignment
|
||||
* and any embedded constants might cause an alignment exception, which
|
||||
* is illegal in privileged modes).
|
||||
*
|
||||
* Padding is (for now) assumed to occur with a single AArch64 'nop'.
|
||||
*/
|
||||
const bool rkcommon_get_spl_hdr_padto8(struct image_tool_params *params);
|
||||
|
||||
/**
|
||||
* rkcommon_get_spl_size() - get spl size for a Rockchip boot image
|
||||
*
|
||||
|
Reference in New Issue
Block a user