apm821xx: WNDAP620 + WNDAP660: reorganize partitions for 5.10
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 2 Oct 2021 22:19:58 +0000 (00:19 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Oct 2021 14:44:15 +0000 (16:44 +0200)
Due to 5.10 increased kernel size, the current 4MiB-ish kernel
partition got too small. Luckily, netgear's uboot environment
is setup to read 0x60000 bytes from the kernel partition location.

... While at it: also do some cleanups in the DTS in there.

The original (re-)installation described in
commit d82d84694e60 ("apm821xx: add support for the Netgear WNDAP620 and WNDAP660")
seemed to be still working for now. What I noticed though
is that the bigger initramfs images needed to use a different
destination address (1000000) to prevent it overwriting
itself during decompression. i.e:
 # tftp 1000000 openwrt-...-wndap620-initramfs-kernel.bin
 # bootm

However, in case of the WNDAP620+660 the factory.img image can be
written directly to the flash through uboot.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
target/linux/apm821xx/image/nand.mk

index fc428bca0f1bdba0628dfede3f5180e4deb6d745..88284d0237a562f73c41f8cccf4a0a48665a13fb 100644 (file)
                                 * offset (0x110000) for an uImage binary.
                                 */
                                label = "kernel";
-                               reg = <0x00110000 0x003f0000>;
+                               reg = <0x00110000 0x005f0000>;
                        };
 
-                       partition@500000 {
+                       partition@700000 {
                                label = "ubi";
-                               reg = <0x00500000 0x016d0000>;
+                               reg = <0x00700000 0x014d0000>;
                        };
 
                        partition@1bd0000 {
 
                        partition@1be0000 {
                                label = "var";
-                               reg = <0x01be0000 0x0400000>;
+                               reg = <0x01be0000 0x00400000>;
                                read-only;
                        };
 
                        partition@1fe0000 {
                                label = "manudata";
-                               reg   = <0x01fe0000 0x20000 >;
+                               reg = <0x01fe0000 0x00020000>;
                                read-only;
                        };
                };
index 26676c8d8b84f72c80c5e61b58d0a83a35e60522..76b1386241f2af6bb24cc3ebedf73140275e9bc8 100644 (file)
@@ -68,11 +68,14 @@ define Device/netgear_wndap6x0
   DTB_SIZE := 32768
   IMAGE_SIZE := 27392k
   IMAGES := sysupgrade.bin factory.img
-  KERNEL_SIZE := 4032k
+  KERNEL_SIZE := 6080k
   KERNEL := dtb | kernel-bin | gzip | MuImage-initramfs gzip
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
   IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
   UBINIZE_OPTS := -E 5
+  DEVICE_COMPAT_VERSION := 2.0
+  DEVICE_COMPAT_MESSAGE := kernel and ubi partitions had to be resized. \
+       Upgrade via sysupgrade mechanism is not possible.
 endef
 
 define Device/netgear_wndap620