ath79: lzma-loader: expose LZMA_TEXT_ADDRESS configuration again
authorLech Perczak <lech.perczak@gmail.com>
Wed, 20 Nov 2024 02:45:21 +0000 (03:45 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 19 Jan 2025 16:24:58 +0000 (17:24 +0100)
initramfs for some devices grew so big, that it can't be loaded within
the previous 32MB RAM limit. Make the LZMA_TEXT_ADDRESS configurable
per-target once again, to fix it for bigger devices, while maintaining
compatibility with previous ones.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17616
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/image/Makefile

index 5647200b4ba04c95c7fb17539a4b8b35652f5d0f..1918a8a4318dfb4f3a1fb8e315d27f70c30df4b8 100644 (file)
@@ -4,7 +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 += LOADER_FLASH_MAX LOADER_KERNEL_MAGIC LZMA_TEXT_START
 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
 DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
 DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
@@ -14,6 +14,7 @@ define Build/loader-common
        $(MAKE) -C lzma-loader \
                PKG_BUILD_DIR="$@.src" \
                TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
+               LZMA_TEXT_START=$(LZMA_TEXT_START) \
                $(1) compile loader.$(LOADER_TYPE)
        mv "$@.$(LOADER_TYPE)" "$@"
        rm -rf $@.src
@@ -74,6 +75,7 @@ define Device/Default
   LOADER_FLASH_MAX :=
   LOADER_FLASH_OFFS :=
   LOADER_TYPE :=
+  LZMA_TEXT_START := 0x81800000
   COMPILE :=
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \