Message ID | CAOWVioVFbLc+izCrq18+kTgFkmLj0B9Y-DDdnZKeraGRZnG_zQ@mail.gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Petr Štetiar |
Headers | show |
Series | P2812HNUF3 | expand |
Hi Ivar, On Thu, Dec 09, 2021 at 10:14:22PM +0100, Ivar Orskaug wrote: > Hi, > P2812HNUF3 is currently broken in main because of the kernel 5.10 > increase in size. This patch increases the kernel flash partition to > 3072k, aligning with P2812HNUF1. Would it be possible to apply it to > main? The patch looks good and all missing is a Signed-off-by: line. As sysupgrade also won't be possible when having an older version with 2MiB kernel limit running we should bump set DEVICE_COMPAT_VERSION see below. > Regards Ivar > > diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > index 376cdaeb61..86520247d0 100644 > --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > @@ -55,11 +55,11 @@ > > partition@0 { > label = "kernel"; > - reg = <0x0 0x200000>; > + reg = <0x0 0x300000>; > }; > - partition@200000 { > + partition@300000 { > label = "ubi"; > - reg = <0x200000 0x7e00000>; > + reg = <0x300000 0x7d00000>; > }; > }; > }; > diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk > index 909479587c..9e9818bdbf 100644 > --- a/target/linux/lantiq/image/vr9.mk > +++ b/target/linux/lantiq/image/vr9.mk > @@ -282,7 +282,7 @@ define Device/zyxel_p-2812hnu-f3 > DEVICE_VARIANT := F3 > BOARD_NAME := P2812HNUF3 > DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2 > - KERNEL_SIZE := 2048k > + KERNEL_SIZE := 3072k > SUPPORTED_DEVICES += P2812HNUF3 DEVICE_COMPAT_VERSION := 1.1 DEVICE_COMPAT_MESSAGE := Flash layout changed > DEFAULT := n > endef > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Hi Ivar, Hi Daniel, On 12/9/21 23:12, Daniel Golle wrote: > Hi Ivar, > > On Thu, Dec 09, 2021 at 10:14:22PM +0100, Ivar Orskaug wrote: >> Hi, >> P2812HNUF3 is currently broken in main because of the kernel 5.10 >> increase in size. This patch increases the kernel flash partition to >> 3072k, aligning with P2812HNUF1. Would it be possible to apply it to >> main? > > The patch looks good and all missing is a Signed-off-by: line. > As sysupgrade also won't be possible when having an older version > with 2MiB kernel limit running we should bump set DEVICE_COMPAT_VERSION > see below. I'd suggest to increase the kernel partition to 4 or 5 MiB to avoid increasing the kernel partition size a second time. Best David > >> Regards Ivar >> >> diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts >> b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts >> index 376cdaeb61..86520247d0 100644 >> --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts >> +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts >> @@ -55,11 +55,11 @@ >> >> partition@0 { >> label = "kernel"; >> - reg = <0x0 0x200000>; >> + reg = <0x0 0x300000>; >> }; >> - partition@200000 { >> + partition@300000 { >> label = "ubi"; >> - reg = <0x200000 0x7e00000>; >> + reg = <0x300000 0x7d00000>; >> }; >> }; >> }; >> diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk >> index 909479587c..9e9818bdbf 100644 >> --- a/target/linux/lantiq/image/vr9.mk >> +++ b/target/linux/lantiq/image/vr9.mk >> @@ -282,7 +282,7 @@ define Device/zyxel_p-2812hnu-f3 >> DEVICE_VARIANT := F3 >> BOARD_NAME := P2812HNUF3 >> DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2 >> - KERNEL_SIZE := 2048k >> + KERNEL_SIZE := 3072k >> SUPPORTED_DEVICES += P2812HNUF3 > DEVICE_COMPAT_VERSION := 1.1 > DEVICE_COMPAT_MESSAGE := Flash layout changed > >> DEFAULT := n >> endef >> >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel@lists.openwrt.org >> https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
12/9/21 10:14 PM, Ivar Orskaug: > Hi, > P2812HNUF3 is currently broken in main because of the kernel 5.10 > increase in size. This patch increases the kernel flash partition to > 3072k, aligning with P2812HNUF1. Would it be possible to apply it to > main? > Regards Ivar > > diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > index 376cdaeb61..86520247d0 100644 > --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > @@ -55,11 +55,11 @@ > > partition@0 { > label = "kernel"; > - reg = <0x0 0x200000>; > + reg = <0x0 0x300000>; > }; > - partition@200000 { > + partition@300000 { > label = "ubi"; > - reg = <0x200000 0x7e00000>; > + reg = <0x300000 0x7d00000>; > }; > }; > }; > diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk > index 909479587c..9e9818bdbf 100644 > --- a/target/linux/lantiq/image/vr9.mk > +++ b/target/linux/lantiq/image/vr9.mk > @@ -282,7 +282,7 @@ define Device/zyxel_p-2812hnu-f3 > DEVICE_VARIANT := F3 > BOARD_NAME := P2812HNUF3 > DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2 > - KERNEL_SIZE := 2048k > + KERNEL_SIZE := 3072k > SUPPORTED_DEVICES += P2812HNUF3 > DEFAULT := n > endef I'm quite sure it's only half of the fix. Isn't is necessary to change u-boots bootcmd as well to increase the number of to be read bytes to 3072k? Please provide some kind of migration guide in the commit message. I'm in doubt that only sysupgrading to the changed image is all that's required. Finally, if you have a migration path, you can enable the default build of the P2812HNUF3 image by dropping the "DEFAULT := n". Mathias
Thanks for all the good feedback. As pointed out, it's not possible to migrate from version 19 to 21 after applying this patch. A backup/restore of config is required. Some additional info for upgrading is also in the commit message (updating uboot parameters). The same information should be updated in the wiki page for the device also. Ivar diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts index 376cdaeb61..a24dfcd5f9 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts @@ -55,11 +55,11 @@ partition@0 { label = "kernel"; - reg = <0x0 0x200000>; + reg = <0x0 0x500000>; }; - partition@200000 { + partition@500000 { label = "ubi"; - reg = <0x200000 0x7e00000>; + reg = <0x500000 0x7b00000>; }; }; }; diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 909479587c..1686141438 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -282,8 +282,9 @@ define Device/zyxel_p-2812hnu-f3 DEVICE_VARIANT := F3 BOARD_NAME := P2812HNUF3 DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2 - KERNEL_SIZE := 2048k + KERNEL_SIZE := 5120k SUPPORTED_DEVICES += P2812HNUF3 - DEFAULT := n + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := Flash layout changed endef TARGET_DEVICES += zyxel_p-2812hnu-f3 Repartition flash to accommodate for a bigger kernel image. The new kernel image (.bin) must be booted from tftp before running sysupgrade. Running configuration must be backed up and restored. After upgrading, update uboot parameters to load the entire kernel partition: setenv nboot ' nand read 0x80800000 0x0 0x500000; bootm 0x80800000' setenv bootcmd 'run nboot' saveenv tor. 9. des. 2021 kl. 22:14 skrev Ivar Orskaug <ivarorskaug@gmail.com>: > > Hi, > P2812HNUF3 is currently broken in main because of the kernel 5.10 > increase in size. This patch increases the kernel flash partition to > 3072k, aligning with P2812HNUF1. Would it be possible to apply it to > main? > Regards Ivar > > diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > index 376cdaeb61..86520247d0 100644 > --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts > @@ -55,11 +55,11 @@ > > partition@0 { > label = "kernel"; > - reg = <0x0 0x200000>; > + reg = <0x0 0x300000>; > }; > - partition@200000 { > + partition@300000 { > label = "ubi"; > - reg = <0x200000 0x7e00000>; > + reg = <0x300000 0x7d00000>; > }; > }; > }; > diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk > index 909479587c..9e9818bdbf 100644 > --- a/target/linux/lantiq/image/vr9.mk > +++ b/target/linux/lantiq/image/vr9.mk > @@ -282,7 +282,7 @@ define Device/zyxel_p-2812hnu-f3 > DEVICE_VARIANT := F3 > BOARD_NAME := P2812HNUF3 > DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2 > - KERNEL_SIZE := 2048k > + KERNEL_SIZE := 3072k > SUPPORTED_DEVICES += P2812HNUF3 > DEFAULT := n > endef
Ivar Orskaug <ivarorskaug@gmail.com> [2021-12-12 13:32:34]:
Hi,
> Thanks for all the good feedback.
can you please read https://openwrt.org/submitting-patches and adjust your
patch accordingly? Thanks.
-- ynezz
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts index 376cdaeb61..86520247d0 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts @@ -55,11 +55,11 @@ partition@0 { label = "kernel"; - reg = <0x0 0x200000>; + reg = <0x0 0x300000>; }; - partition@200000 { + partition@300000 { label = "ubi"; - reg = <0x200000 0x7e00000>; + reg = <0x300000 0x7d00000>; }; }; }; diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 909479587c..9e9818bdbf 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -282,7 +282,7 @@ define Device/zyxel_p-2812hnu-f3 DEVICE_VARIANT := F3 BOARD_NAME := P2812HNUF3 DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-wolfssl kmod-usb-dwc2 - KERNEL_SIZE := 2048k + KERNEL_SIZE := 3072k SUPPORTED_DEVICES += P2812HNUF3 DEFAULT := n endef