From: Wiktor Stasiak Date: Sun, 27 Sep 2020 14:27:59 +0000 (+0200) Subject: apm821xx: Netgear WNDR4700 limit kernel lzma dictionary X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1941ac06f0d78074e6f3239eac81936f2d09f40f;p=openwrt%2Fstaging%2Fzorun.git 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 --- 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