diff options
author | Szabolcs Hubai <szab.hu@gmail.com> | 2020-04-19 20:49:11 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2020-04-27 12:22:02 +0200 |
commit | ce1957100411b0a751d6431d36def9c28048b4dc (patch) | |
tree | a2492957a469ea41d8c3d99e15ae8f493ddeee4a /target/linux/ramips | |
parent | 654eec5a2d5d7c70385020e6a4c6ee12ae24f7ba (diff) | |
download | upstream-ce1957100411b0a751d6431d36def9c28048b4dc.tar.gz upstream-ce1957100411b0a751d6431d36def9c28048b4dc.tar.bz2 upstream-ce1957100411b0a751d6431d36def9c28048b4dc.zip |
ramips: mt7621: use lzma-loader for D-Link DIR-860L B1
This device has trouble extracting big kernel from flash,
and supports LZMA compressed kernels only.
Using OpenWrt kernel loader saves us 64 KB compared to the dictionary
size limiting workaround.
Factory image sizes (commit: 5f126c541a74) with "CONFIG_ALL_KMODS=y":
- original ("-d23", default): 4784188 bytes, LZMA ERROR 1
- with "-d19": 4915260, LZMA ERROR 1
- with "-d18": 4915260, diff to original: +128 KB
- with "-d17": 4980796, diff to original: +192 KB
- with this patch: 4849724, diff to original: +64 KB
To save some CPU cycle, use minimal compression ("-a0") for the LZMA
compressed uImage.
The most robust solution would use a different loader,
which reads the compressed kernel directly from the flash.
See the thread at [0] for more details!
[0] http://lists.infradead.org/pipermail/openwrt-devel/2020-April/022926.html
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
Tested-by: Stijn Segers <foss@volatilesystems.org>
[fixed identation]
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index d5527cd98d..60576eaff5 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -218,7 +218,9 @@ define Device/dlink_dir-860l-b1 $(Device/seama) BLOCKSIZE := 64k SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma + LOADER_TYPE := bin + KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | \ + relocate-kernel | lzma -a0 | uImage lzma IMAGE_SIZE := 16064k DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-860L |