mvebu: bugfixes for rango

backport of ce116bc6f997d8d6e6b976cacce5d4c60d705fc6

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
master
Imre Kaloz 2016-10-18 11:43:26 +02:00
parent a55319cca0
commit 2aefb514a4
3 changed files with 13 additions and 9 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2014-2015 OpenWrt.org
# Copyright (C) 2014-2016 OpenWrt.org
#
[ -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)
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)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
;;

View File

@ -10,13 +10,14 @@ preinit_mount_syscfg() {
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)
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 ]
then
echo "ubifs syscfg partition is damaged, reformatting"
ubidetach -m 8
ubiformat -y -O 2048 -q /dev/mtd8
ubiattach -m 8
ubidetach -m $syscfg_part
ubiformat -y -O 2048 -q /dev/mtd$syscfg_part
ubiattach -m $syscfg_part
ubimkvol /dev/ubi1 -n 0 -N syscfg -t dynamic --maxavsize
fi
mkdir /tmp/syscfg

View File

@ -198,13 +198,13 @@
partition@7e0000 {
label = "devinfo";
reg = <0x7e0000 0x1e0000>; /* 1920KB */
reg = <0x7e0000 0x40000>; /* 256KB */
read-only;
};
partition@820000 {
label = "sysdiag";
reg = <0x820000 0x40000>; /* 256KB */
reg = <0x820000 0x1e0000>; /* 1920KB */
read-only;
};
@ -235,7 +235,7 @@
*/
partition@aa00000 {
label = "syscfg";
reg = <0x5a00000 0x5600000>;
reg = <0xaa00000 0x5600000>;
};
/*
@ -246,7 +246,7 @@
*/
partition@180000 {
label = "unused_area";
reg = <0x260000 0x580000>; /* 5.6MB */
reg = <0x260000 0x5c0000>; /* 5.75MB */
};
};
};