]> git.dujemihanovic.xyz Git - u-boot.git/commit
mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT header
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 20 Sep 2023 10:33:52 +0000 (12:33 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 16 Oct 2023 06:46:01 +0000 (08:46 +0200)
commit89f19f45d65019606374289b3444e08c3393e2b1
tree240da493e95b3ece502875a60f7be6fd93997b71
parent3c3976ff2b11488740278e4bc90c0f0853934778
mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT header

When built with CONFIG_IMX_HAB, the full FIT image, including stuff
tacked on beyond the end of the fdt structure, is expected to be (fdt
size rounded up to 0x1000 boundary)+CONFIG_CSF_SIZE.

Now, when the FIT image is loaded from a storage device, it doesn't
really matter that the flash.bin that gets written to target isn't
quite that big - we will just load some garbage bytes that are never
read or used for anything. But when flash.bin is uploaded via uuu,
it's important that we actually serve at least as many bytes as the
target expects, or we will hang in rom_api_download_image().

Extend the logic in the csf.sh script so that the csf blob is padded
to CONFIG_CSF_SIZE minus the size of the IVT header.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
doc/imx/habv4/csf_examples/mx8m/csf.sh