aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/Makefile
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2021-02-24 22:35:37 -0500
committerPetr Štetiar <ynezz@true.cz>2021-06-11 07:20:31 +0200
commit1f6ec4b29ebfda19d9df01f1cc289ed6454683cf (patch)
tree095ea7c716c05d26e8c8f01ff7af041b586a780f /target/linux/ath79/image/Makefile
parent08ec7acbc3637ea99e249834578019efb0408f08 (diff)
downloadupstream-1f6ec4b29ebfda19d9df01f1cc289ed6454683cf.tar.gz
upstream-1f6ec4b29ebfda19d9df01f1cc289ed6454683cf.tar.bz2
upstream-1f6ec4b29ebfda19d9df01f1cc289ed6454683cf.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> (cherry picked from commit 1b8bd17c2d07c7397015a86941db9e114e1d349a)
Diffstat (limited to 'target/linux/ath79/image/Makefile')
-rw-r--r--target/linux/ath79/image/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile
index c2d2474336..d8b8800d91 100644
--- a/target/linux/ath79/image/Makefile
+++ b/target/linux/ath79/image/Makefile
@@ -4,6 +4,7 @@ include $(INCLUDE_DIR)/image.mk
KERNEL_LOADADDR = 0x80060000
DEVICE_VARS += LOADER_FLASH_OFFS LOADER_TYPE
+DEVICE_VARS += LOADER_FLASH_MAX LOADER_KERNEL_MAGIC
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
@@ -30,7 +31,10 @@ define Build/loader-kernel
endef
define Build/loader-okli-compile
- $(call Build/loader-common,FLASH_OFFS=$(LOADER_FLASH_OFFS) FLASH_MAX=0)
+ $(call Build/loader-common, \
+ FLASH_OFFS=$(LOADER_FLASH_OFFS) \
+ FLASH_MAX=$(LOADER_FLASH_MAX) \
+ KERNEL_MAGIC=$(LOADER_KERNEL_MAGIC) )
endef
# Arguments: <output name> <kernel offset>