From: André Valentin Date: Wed, 23 Oct 2019 09:30:29 +0000 (+0200) Subject: ar71xx: fix bug in NBG6716 kernelpacking, add firmware partition X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=353ecbbf648e9a607bf75853b81127745f32a4fb;p=openwrt%2Fstaging%2Fynezz.git ar71xx: fix bug in NBG6716 kernelpacking, add firmware partition -Fix the kernel image generation (more robust) -Add a firmware partition table allowing easy upgrade to ath79 Signed-off-by: André Valentin --- diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk index 363e0956c7..926ce780b4 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@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@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@0x0(zyxel_rfsd),2048k@0x200000(romd),1024k@0x400000(header),2048k@0x500000(kernel),125952k@0x500000(firmware),-@0x700000(ubi) define Image/BuildKernel cp $(KDIR)/vmlinux.elf $(VMLINUX).elf @@ -771,13 +771,14 @@ 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 '/^.+$$/'