mvebu: bugfixes for rango
backport of ce116bc6f997d8d6e6b976cacce5d4c60d705fc6 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>master
parent
a55319cca0
commit
2aefb514a4
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014-2015 OpenWrt.org
|
# Copyright (C) 2014-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
[ -e /etc/config/ubootenv ] && exit 0
|
[ -e /etc/config/ubootenv ] && exit 0
|
||||||
|
@ -17,6 +17,9 @@ case "$board" in
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
|
||||||
;;
|
;;
|
||||||
|
armada-385-linksys-rango)
|
||||||
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||||
|
;;
|
||||||
armada-xp-linksys-mamba)
|
armada-xp-linksys-mamba)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -10,13 +10,14 @@ preinit_mount_syscfg() {
|
||||||
case $(mvebu_board_name) in
|
case $(mvebu_board_name) in
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
||||||
needs_recovery=0
|
needs_recovery=0
|
||||||
ubiattach -m 8 || needs_recovery=1
|
syscfg_part=$(grep syscfg /proc/mtd |cut -c4)
|
||||||
|
ubiattach -m $syscfg_part || needs_recovery=1
|
||||||
if [ $needs_recovery -eq 1 ]
|
if [ $needs_recovery -eq 1 ]
|
||||||
then
|
then
|
||||||
echo "ubifs syscfg partition is damaged, reformatting"
|
echo "ubifs syscfg partition is damaged, reformatting"
|
||||||
ubidetach -m 8
|
ubidetach -m $syscfg_part
|
||||||
ubiformat -y -O 2048 -q /dev/mtd8
|
ubiformat -y -O 2048 -q /dev/mtd$syscfg_part
|
||||||
ubiattach -m 8
|
ubiattach -m $syscfg_part
|
||||||
ubimkvol /dev/ubi1 -n 0 -N syscfg -t dynamic --maxavsize
|
ubimkvol /dev/ubi1 -n 0 -N syscfg -t dynamic --maxavsize
|
||||||
fi
|
fi
|
||||||
mkdir /tmp/syscfg
|
mkdir /tmp/syscfg
|
||||||
|
|
|
@ -198,13 +198,13 @@
|
||||||
|
|
||||||
partition@7e0000 {
|
partition@7e0000 {
|
||||||
label = "devinfo";
|
label = "devinfo";
|
||||||
reg = <0x7e0000 0x1e0000>; /* 1920KB */
|
reg = <0x7e0000 0x40000>; /* 256KB */
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@820000 {
|
partition@820000 {
|
||||||
label = "sysdiag";
|
label = "sysdiag";
|
||||||
reg = <0x820000 0x40000>; /* 256KB */
|
reg = <0x820000 0x1e0000>; /* 1920KB */
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@
|
||||||
*/
|
*/
|
||||||
partition@aa00000 {
|
partition@aa00000 {
|
||||||
label = "syscfg";
|
label = "syscfg";
|
||||||
reg = <0x5a00000 0x5600000>;
|
reg = <0xaa00000 0x5600000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
*/
|
*/
|
||||||
partition@180000 {
|
partition@180000 {
|
||||||
label = "unused_area";
|
label = "unused_area";
|
||||||
reg = <0x260000 0x580000>; /* 5.6MB */
|
reg = <0x260000 0x5c0000>; /* 5.75MB */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue