diff options
author | Michael Pratt <mcpratt@pm.me> | 2021-02-24 22:35:37 -0500 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2021-04-08 09:20:59 +0200 |
commit | 1b8bd17c2d07c7397015a86941db9e114e1d349a (patch) | |
tree | 51d83f09d9ab6994db4a45de8733bd4f8b8222b3 /target/linux/ath79/image/lzma-loader/Makefile | |
parent | 11d24ffe961570533a4fc54a7511d30c17290623 (diff) | |
download | upstream-1b8bd17c2d07c7397015a86941db9e114e1d349a.tar.gz upstream-1b8bd17c2d07c7397015a86941db9e114e1d349a.tar.bz2 upstream-1b8bd17c2d07c7397015a86941db9e114e1d349a.zip |
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>
Diffstat (limited to 'target/linux/ath79/image/lzma-loader/Makefile')
-rw-r--r-- | target/linux/ath79/image/lzma-loader/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/ath79/image/lzma-loader/Makefile b/target/linux/ath79/image/lzma-loader/Makefile index 0ff59bc56a..2b1ed82a98 100644 --- a/target/linux/ath79/image/lzma-loader/Makefile +++ b/target/linux/ath79/image/lzma-loader/Makefile @@ -13,6 +13,7 @@ LOADADDR := 0x80060000 LOADER := loader.bin LOADER_NAME := $(basename $(notdir $(LOADER))) LOADER_DATA := +KERNEL_MAGIC := TARGET_DIR := FLASH_OFFS := FLASH_MAX := @@ -41,6 +42,7 @@ loader-compile: $(PKG_BUILD_DIR)/.prepared LZMA_TEXT_START=$(LZMA_TEXT_START) \ LOADADDR=$(LOADADDR) \ LOADER_DATA=$(LOADER_DATA) \ + KERNEL_MAGIC=$(KERNEL_MAGIC) \ FLASH_OFFS=$(FLASH_OFFS) \ FLASH_MAX=$(FLASH_MAX) \ BOARD="$(BOARD)" \ |