[OpenWrt-Devel] [PATCH 2/5] ar71xx: fix bug in NBG6716 kernelpackaging, add firmware partition allowing ath79 update

André Valentin avalentin at marcant.net
Mon Oct 21 08:32:11 EDT 2019


-Fix the kernel image generation (more robust)
-Add a firmware partition table allowing easy upgrade to ath79

Signed-off-by: André Valentin <avalentin at marcant.net>
---
 target/linux/ar71xx/image/legacy.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk
index 363e0956c7..1072dfb999 100644
--- a/target/linux/ar71xx/image/legacy.mk
+++ b/target/linux/ar71xx/image/legacy.mk
@@ -273,7 +273,7 @@ tew823dru_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware)
 wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubi),25600k at 0x6c0000(firmware),256k(caldata_backup),-(reserved)
 zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k at 0x50000(firmware)
 mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro
-zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubi)
+zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k at 0x0(zyxel_rfsd),2048k at 0x200000(romd),1024k at 0x400000(header),2048k at 0x500000(kernel),125952k at 0x500000(firmware),- at 0x700000(ubi)
 
 define Image/BuildKernel
 	cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
@@ -771,13 +771,15 @@ define Image/Build/ZyXEL
 	fi; fi
 endef
 
+
+# attention: only zlib compression is allowed for the boot fs
 define	Image/Build/ZyXELNAND/buildkernel
 	$(eval kernelsize=$(call mtdpartsize,kernel,$(5)))
 	$(call MkuImageLzma,$(2),$(3) $(5) $(6))
 	mkdir -p $(KDIR_TMP)/$(2)/image/boot
 	cp $(KDIR_TMP)/vmlinux-$(2).uImage $(KDIR_TMP)/$(2)/image/boot/vmlinux.lzma.uImage
 	$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
-		--pad=$(kernelsize) --big-endian --squash-uids -v -e 128KiB \
+		--pad=$(kernelsize) --big-endian --squash-uids -v -e 128KiB -q -f -n -x lzma -x rtime \
 		-o $(KDIR_TMP)/$(2)-kernel.jffs2 \
 		-d $(KDIR_TMP)/$(2)/image \
 		2>&1 1>/dev/null | awk '/^.+$$/'
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list