[openwrt/openwrt] apm821xx: Netgear WNDR4700 limit kernel lzma dictionary
LEDE Commits
lede-commits at lists.infradead.org
Tue Dec 22 13:13:55 EST 2020
ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1941ac06f0d78074e6f3239eac81936f2d09f40f
commit 1941ac06f0d78074e6f3239eac81936f2d09f40f
Author: Wiktor Stasiak <wiktor.stasiak at gmail.com>
AuthorDate: Sun Sep 27 16:27:59 2020 +0200
apm821xx: Netgear WNDR4700 limit kernel lzma dictionary
WNDR4700 uboot has an issue with decompressing kernel with default dictionary size (-d23 which is about 8MB).
Limiting lzma dictionary lowers memory footprint and allows device to boot the kernel.
The highest bootable dictonary size is 18, choosing 16 for an extra safety margin.
Kernel size befor and after:
-d23: 2663665 Bytes
-d16: 2892757 Bytes
Kernel size increased by 230kB (9%)
Fixes: FS#3258
Signed-off-by: Wiktor Stasiak <wiktor.stasiak at gmail.com>
---
target/linux/apm821xx/image/nand.mk | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target/linux/apm821xx/image/nand.mk b/target/linux/apm821xx/image/nand.mk
index 845770b89f..26676c8d8b 100644
--- a/target/linux/apm821xx/image/nand.mk
+++ b/target/linux/apm821xx/image/nand.mk
@@ -106,7 +106,7 @@ define Device/netgear_wndr4700
KERNEL_SIZE := 3584k
# append a fake/empty rootfs to fool netgear's uboot
# CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg()
- KERNEL := kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
+ KERNEL := kernel-bin | lzma -d16 | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
append-uImage-fakehdr filesystem | dtb | create-uImage-dtb | prepend-dtb
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | MuImage-initramfs gzip
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
@@ -117,6 +117,5 @@ define Device/netgear_wndr4700
NETGEAR_HW_ID := 29763875+128+256
UBINIZE_OPTS := -E 5
SUPPORTED_DEVICES += wndr4700
- DEFAULT := n
endef
TARGET_DEVICES += netgear_wndr4700
More information about the lede-commits
mailing list