[PATCH 02/11] boot: bootm: derive the header probe size

Simon Glass sjg at chromium.org
Tue Oct 20 00:56:02 PDT 2026


On 2026-10-14T08:38:38, Daniel Golle <daniel at makrotopia.org> wrote:
> boot: bootm: derive the header probe size
>
> boot_get_kernel() maps a bare 64 bytes to identify the image format.
> genimg_get_format() reads at most a 40-byte FDT header or an 8-byte
> Android magic, but the legacy branch that follows verifies the whole
> 64-byte legacy header, so that is the size the mapping has to cover.
>
> Say so with sizeof(struct legacy_img_hdr).
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
>
>  boot/bootm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>



More information about the openwrt-devel mailing list