From 6fba88de1913301f11163aa05298e4fb488b3640 Mon Sep 17 00:00:00 2001 From: Mason Clarke Date: Sun, 29 Dec 2019 19:03:00 +0100 Subject: ramips: reduce lzma dictionary size for D-Link DIR-645 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently this device fails to boot with the OpenWrt snapshot images (release images are unaffected). The error message is: "LZMA ERROR 1 - must RESET board to recover". This happens because the kernel image is too big for the bootloader to boot. This commit works around this by decreasing the lzma dictionary size option from the default 23 to 10. Before this change the current OpenWrt snapshot image (uncompressed kernel size 4875139 bytes) failed to boot, while now an even bigger image (kernel 4.19 with snapshot default config; uncompressed kernel size 5162833 bytes) boots just fine. The highest lzma dictionary size option this image booted with was 11. 10 was chosen to have a bit more room for growth. An unavoidable side-effect of this change is that the compressed kernel image will take up more space. Total image size with different dictionary size options: D23 - 3973903 bytes (base) D16 - 4113167 bytes (+3.5% - +139264 bytes) D12 - 4317967 bytes (+8.7% - +344064‬ bytes) D11 - 4383503 bytes (+10.3% - +409600 bytes) D10 - 4461327 bytes (+12.3% - +487424 bytes) Fixes: FS#1484 Signed-off-by: Mason Clarke --- target/linux/ramips/image/rt3883.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/ramips') diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index d80909fd5a..ca6a713c4d 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -36,7 +36,7 @@ define Device/dlink_dir-645 SOC := rt3662 BLOCKSIZE := 4k IMAGE_SIZE := 7872k - KERNEL := $(KERNEL_DTB) + KERNEL := kernel-bin | append-dtb | lzma -d10 SEAMA_SIGNATURE := wrgn39_dlob.hans_dir645 DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-645 -- cgit v1.2.3