apm821xx: MR24: add to uboot-envtools
authorChristian Lamparter <chunkeey@gmail.com>
Wed, 17 Oct 2018 20:37:33 +0000 (22:37 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 26 Nov 2018 11:05:46 +0000 (12:05 +0100)
This patch adds the complicated u-boot
environment access settings for to the
MR24 target.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
package/boot/uboot-envtools/files/apm821xx
target/linux/apm821xx/dts/meraki-mr24.dts

index 3cedd8bc2d5ce0f47ce952f4b2c6340ff5319ce2..94c0d8944a32c4f7e0173db1f22d401f64d505bb 100644 (file)
@@ -10,6 +10,10 @@ touch /etc/config/ubootenv
 board=$(board_name)
 
 case "$board" in
+meraki,mr24)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000" "4"
+       ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "4"
+       ;;
 esac
 
 config_load ubootenv
index fc879fe8c1cdb4e85135c285ad8f0d34d2212a7f..3b05d9c24e9047a3baf3add9ef7f66d93df1c020 100644 (file)
 
                        partition@0 {
                                label = "u-boot";
-                               reg = <0x00000000 0x00170000>;
+                               reg = <0x00000000 0x00150000>;
+                               read-only;
+                       };
+
+                       partition@150000 {
+                               /*
+                                * The u-boot environment size is one NAND
+                                * block (16KiB). u-boot allocates four NAND
+                                * blocks (64KiB) in order to have spares
+                                * around for bad block management
+                                */
+                               label = "u-boot-env";
+                               reg = <0x00150000 0x00010000>;
+                               read-only;
+                       };
+
+                       partition@160000 {
+                               /*
+                                * redundant u-boot environment.
+                                * has to be kept it in sync with the
+                                * data in "u-boot-env".
+                                */
+                               label = "u-boot-env-redundant";
+                               reg = <0x00160000 0x00010000>;
                                read-only;
                        };