]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mpc85xx: ws-ap3715i: enable access to u-boot env
authorEdward Chow <equu@openmail.cc>
Tue, 28 Apr 2026 03:29:01 +0000 (11:29 +0800)
committerRobert Marko <robimarko@gmail.com>
Tue, 5 May 2026 12:09:38 +0000 (14:09 +0200)
find_mtd_part() outputs /dev/mtdblockX, to which fw_setenv cannot
write, "/dev/mtd$(find_mtd_index '<vol name>')" could be used instead.

The envsize should also be changed to 0x1000 to make the CRC checksum
valid and the env block recognized by the uboot-envtools, but the
flash sector size remains 0x10000, otherwise the env block will be
readable but not writable.

The "read-only" mark within device tree is also removed.

Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/23121
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/boot/uboot-tools/uboot-envtools/files/mpc85xx
target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3715i.dts

index 757344ecaa9a873229c0621090f120fda451955d..c4edba19aacc8c74c2160aa148d10a709bc7f48e 100644 (file)
@@ -9,8 +9,8 @@ board=$(board_name)
 
 case "$board" in
 enterasys,ws-ap3715i)
-       ubootenv_add_uci_config "$(find_mtd_part 'cfg1')" "0x0" "0x10000" "0x10000"
-       ubootenv_add_uci_config "$(find_mtd_part 'cfg2')" "0x0" "0x10000" "0x10000"
+       ubootenv_add_uci_config "/dev/mtd$(find_mtd_index 'cfg1')" "0x0" "0x1000" "0x10000"
+       ubootenv_add_uci_config "/dev/mtd$(find_mtd_index 'cfg2')" "0x0" "0x1000" "0x10000"
        ;;
 extreme-networks,ws-ap3825i)
        ubootenv_add_uci_config "$(find_mtd_part 'cfg1')" "0x0" "0x10000" "0x20000"
index fc06bbc6205a338b768abacdd972595ca2b8d3d8..ebe210761abbbec862fb2d6b6414c0f844931ad2 100644 (file)
                                partition@120000 {
                                        reg = <0x120000 0x10000>;
                                        label = "cfg1";
-                                       read-only;
                                };
 
                                partition@130000 {
                                        reg = <0x130000 0x10000>;
                                        label = "cfg2";
-                                       read-only;
                                };
 
                                partition@140000 {