[PATCH] ath79/zyxel_nbg6716: resize kernel partition to 6MiB and reenable again

Hauke Mehrtens hauke at hauke-m.de
Sat May 22 16:34:21 PDT 2021


On 5/22/21 5:00 PM, André Valentin wrote:
> The bootloader happily accepts this.
> But devices need a fresh reinstall because of resulting ubi partition
> changes. Therefore a  sysupgrade will brick your device.
> 
> Please install a fresh factory image via bootloader.
> Alternatively, you can flash sysupgrade-6M-Kernel.bin with
>   zcat sysupgrade-6M-Kernel.bin | mtd -r -e /dev/mtd 3 write - /dev/mtd3
> 
> This may thow an error, because it is a 256M image. There are
> devices out there with this flash size.
> 
> Notice that you will always loose configuration.
> 
> Signed-off-by: André Valentin <avalentin at marcant.net>
> ---
>   .../linux/ath79/dts/qca9558_zyxel_nbg6716.dts |  4 ++--
>   target/linux/ath79/image/nand.mk              | 24 +++++++++++++------
>   2 files changed, 19 insertions(+), 9 deletions(-)
> 
> diff --git a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
> index 9aee8c362c..411b086188 100644
> --- a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
> +++ b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts
> @@ -147,12 +147,12 @@
>   
>   		partition at 500000 {
>   			label = "kernel";
> -			reg = <0x500000 0x400000>;
> +			reg = <0x500000 0x600000>;
>   		};
>   
>   		partition at 900000 {
>   			label = "ubi";
> -			reg = <0x900000 0x7700000>;
> +			reg = <0xb00000 0x7500000>;
>   		};
>   	};
>   };
> diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
> index caaa01c92d..37a5713ff1 100644
> --- a/target/linux/ath79/image/nand.mk
> +++ b/target/linux/ath79/image/nand.mk
> @@ -236,6 +236,15 @@ TARGET_DEVICES += netgear_wndr4500-v3
>   
>   define Device/zyxel_nbg6716
>     SOC := qca9558
> +  DEVICE_COMPAT_VERSION := 2.0
> +  DEVICE_COMPAT_MESSAGE := Kernel partition has been resized to 6M. \
> +	A sysupgrade will brick your device. \
> +	Please install a fresh factory image via bootloader. \
> +	Alternatively, you can flash sysupgrade-6M-Kernel.bin with \
> +	zcat sysupgrade-6M-Kernel.bin | mtd -r -e /dev/mtd3 write - /dev/mtd3 
.\
> +	This may thow an error, because it is a 256M image. There are \
> +	devices out there with this flash size. \
> +	Notice that you will always loose configuration.
>     DEVICE_VENDOR := ZyXEL
>     DEVICE_MODEL := NBG6716
>     DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct \
> @@ -243,19 +252,20 @@ define Device/zyxel_nbg6716
>     RAS_BOARD := NBG6716
>     RAS_ROOTFS_SIZE := 29696k
>     RAS_VERSION := "OpenWrt Linux-$(LINUX_VERSION)"
> -  KERNEL_SIZE := 4096k
> +  KERNEL_SIZE := 6144k
>     BLOCKSIZE := 128k
>     PAGESIZE := 2048
>     KERNEL := kernel-bin | append-dtb | uImage none | zyxel-buildkerneljffs | \
> -	check-size 4096k

This check was triggered by the build bots.
I am not sure, but I think this also adds the rootfs to the kernel image 
and then it gets too big.

Hauke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x93DD20630910B515.asc
Type: application/pgp-keys
Size: 9895 bytes
Desc: OpenPGP public key
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210523/6e80a998/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210523/6e80a998/attachment-0001.sig>


More information about the openwrt-devel mailing list