summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/boot/uboot-envtools/files/apm821xx4
-rw-r--r--target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version3
-rw-r--r--target/linux/apm821xx/dts/netgear-wndr4700.dts26
-rw-r--r--target/linux/apm821xx/image/nand.mk5
4 files changed, 33 insertions, 5 deletions
diff --git a/package/boot/uboot-envtools/files/apm821xx b/package/boot/uboot-envtools/files/apm821xx
index e73aaab7a0..1076f931bb 100644
--- a/package/boot/uboot-envtools/files/apm821xx
+++ b/package/boot/uboot-envtools/files/apm821xx
@@ -19,6 +19,10 @@ netgear,wndap620|\
netgear,wndap660)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000" "4"
;;
+netgear,wndr4700)
+ ubootenv_add_uci_config "/dev/mtd0" "0x40000" "0x20000" "0x20000" "1"
+ ubootenv_add_uci_config "/dev/mtd0" "0x60000" "0x20000" "0x20000" "1"
+ ;;
wd,mybooklive)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000" "1"
ubootenv_add_uci_config "/dev/mtd1" "0x1000" "0x1000" "0x1000" "1"
diff --git a/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version
index 0be0b6112a..d34b4051be 100644
--- a/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version
+++ b/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version
@@ -3,7 +3,8 @@
case "$(board_name)" in
meraki,mx60|\
netgear,wndap620|\
-netgear,wndap660)
+netgear,wndap660|\
+netgear,wndr4700)
uci set system.@system[0].compat_version="2.0"
uci commit system
;;
diff --git a/target/linux/apm821xx/dts/netgear-wndr4700.dts b/target/linux/apm821xx/dts/netgear-wndr4700.dts
index 0788037981..851a3192b3 100644
--- a/target/linux/apm821xx/dts/netgear-wndr4700.dts
+++ b/target/linux/apm821xx/dts/netgear-wndr4700.dts
@@ -183,7 +183,27 @@
partition@0 {
label = "uboot";
reg = <0x00000000 0x00180000>;
+ compatible = "fixed-partitions";
read-only;
+
+ partition@40000 {
+ label = "u-boot-env-main";
+ compatible = "u-boot,env-redundant-count";
+ reg = <0x00040000 0x20000>; /* one block is 128k */
+ read-only;
+ };
+
+/*
+ * Causes u_boot_env: probe of 4e4000000.ndfc:nand:partitions:partition@0:partition@60000
+ * failed with error -17
+ *
+ * partition@60000 {
+ * label = "u-boot-env-redundant";
+ * compatible = "u-boot,env-redundant-count";
+ * reg = <0x00060000 0x20000>;
+ * read-only;
+ * };
+ */
};
partition@180000 {
@@ -196,7 +216,7 @@
partition@0 {
label = "kernel";
- reg = <0x00000000 0x00380000>;
+ reg = <0x00000000 0x00480000>;
compatible = "fixed-partitions";
#address-cells = <1>;
@@ -218,9 +238,9 @@
*/
};
- partition@380000 {
+ partition@480000 {
label = "ubi";
- reg = <0x00380000 0x014e0000>;
+ reg = <0x00480000 0x013e0000>;
};
};
diff --git a/target/linux/apm821xx/image/nand.mk b/target/linux/apm821xx/image/nand.mk
index 469bf58c1d..69eb386126 100644
--- a/target/linux/apm821xx/image/nand.mk
+++ b/target/linux/apm821xx/image/nand.mk
@@ -105,7 +105,7 @@ define Device/netgear_wndr4700
IMAGE_SIZE := 24960k
IMAGES := factory.img sysupgrade.bin
ARTIFACTS := device-tree.dtb
- KERNEL_SIZE := 3584k
+ KERNEL_SIZE := 4608k
# append a fake/empty rootfs to fool netgear's uboot
# CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg()
KERNEL := kernel-bin | lzma -d16 | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
@@ -119,5 +119,8 @@ define Device/netgear_wndr4700
NETGEAR_HW_ID := 29763875+128+256
UBINIZE_OPTS := -E 5
SUPPORTED_DEVICES += wndr4700
+ DEVICE_COMPAT_VERSION := 2.0
+ DEVICE_COMPAT_MESSAGE := kernel and ubi partitions had to be resized. \
+ Upgrade via sysupgrade mechanism is not possible.
endef
TARGET_DEVICES += netgear_wndr4700