aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2022-11-29 18:13:38 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2022-12-06 23:11:23 +0100
commit3c1512a25d927dbddea96802f55980e6c963302e (patch)
treedf3b37e89b551e39f097c4728bc8f1bd5b1e8828 /target/linux/ath79
parent58088ff457afff5fcfa4b32f00c44593f4b7b2c1 (diff)
downloadupstream-3c1512a25d927dbddea96802f55980e6c963302e.tar.gz
upstream-3c1512a25d927dbddea96802f55980e6c963302e.tar.bz2
upstream-3c1512a25d927dbddea96802f55980e6c963302e.zip
ath79: optimize the firmware recipe for Netgear NAND devices
1. Drop useless character '0xff' before fake filesystem header. 2. Reduce useless padding to shrink the size of the sysupgrade image. 3. Do not check the size of sysupgrade image. It does not make sense to check the size of a compressed package. 4. Do not take the size of netgear header into account because it will not be written to Flash. 5. Use the default lzma compression dictionary parameter '-d24' to get better performance. Tested on Netgear R6100 Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r--target/linux/ath79/image/nand.mk18
1 files changed, 7 insertions, 11 deletions
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index 9da47ad38e..ee14c005cc 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -230,7 +230,7 @@ define Device/linksys_ea4500-v3
endef
TARGET_DEVICES += linksys_ea4500-v3
-# fake rootfs is mandatory, pad-offset 129 equals (2 * uimage_header + 0xff)
+# fake rootfs is mandatory, pad-offset 64 equals (1 * uimage_header)
define Device/netgear_ath79_nand
DEVICE_VENDOR := NETGEAR
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
@@ -238,15 +238,12 @@ define Device/netgear_ath79_nand
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 25600k
- KERNEL := kernel-bin | append-dtb | lzma -d20 | \
- pad-offset $$(KERNEL_SIZE) 129 | uImage lzma | \
- append-string -e '\xff' | \
- append-uImage-fakehdr filesystem $$(UIMAGE_MAGIC)
- KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma
+ KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | \
+ pad-offset $$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem $$(UIMAGE_MAGIC)
IMAGES := sysupgrade.bin factory.img
- IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | \
- check-size
- IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata
+ IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
+ append-ubi | check-size | netgear-dni
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
UBINIZE_OPTS := -E 5
endef
@@ -262,8 +259,7 @@ define Device/netgear_pgzng1
IMAGE_SIZE := 83968k
PAGESIZE := 2048
BLOCKSIZE := 128k
- KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
- IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += netgear_pgzng1