ath79: lzma-loader: allow setting custom kernel magic
authorMichael Pratt <mcpratt@pm.me>
Thu, 25 Feb 2021 03:35:37 +0000 (22:35 -0500)
committerPetr Štetiar <ynezz@true.cz>
Thu, 8 Apr 2021 07:20:59 +0000 (09:20 +0200)
commit1b8bd17c2d07c7397015a86941db9e114e1d349a
tree51d83f09d9ab6994db4a45de8733bd4f8b8222b3
parent11d24ffe961570533a4fc54a7511d30c17290623
ath79: lzma-loader: allow setting custom kernel magic

...and max flash offset

The mtdsplit parser was recently refactored
to allow the kernel to have custom image header magic.

Let's also do this for the lzma-loader

For example:
When implemented together,
this allows the kernel to "appear" to be a rootfs
by OEM software in order to write an image
that is actually kernel + rootfs.

At the same time,
it would boot to openwrt normally
by setting the same magic in DTS.

Both of the variables
have a default value that is unchanged
when not defined in the makefiles

This has no effect on the size of the loader
when lzma compressed.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
target/linux/ath79/image/Makefile
target/linux/ath79/image/lzma-loader/Makefile
target/linux/ath79/image/lzma-loader/src/Makefile
target/linux/ath79/image/lzma-loader/src/loader.c