aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2016-10-18 11:42:06 +0200
committerImre Kaloz <kaloz@openwrt.org>2016-10-18 11:42:06 +0200
commitce116bc6f997d8d6e6b976cacce5d4c60d705fc6 (patch)
tree078122fe07f9cdbf91389276457a83fae115ff53
parent67d3ba0c7c91c0a2fb0cbd768d3a75db2246de80 (diff)
downloadmaster-187ad058-ce116bc6f997d8d6e6b976cacce5d4c60d705fc6.tar.gz
master-187ad058-ce116bc6f997d8d6e6b976cacce5d4c60d705fc6.tar.bz2
master-187ad058-ce116bc6f997d8d6e6b976cacce5d4c60d705fc6.zip
mvebu: bugfixes for rango
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
-rw-r--r--package/boot/uboot-envtools/files/mvebu5
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg9
-rw-r--r--target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-rango.dts8
3 files changed, 13 insertions, 9 deletions
diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu
index 2362bc3ee3..28eeefda92 100644
--- a/package/boot/uboot-envtools/files/mvebu
+++ b/package/boot/uboot-envtools/files/mvebu
@@ -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"
;;
diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
index bb3621f8db..5358383944 100644
--- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
+++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
@@ -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
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-rango.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-rango.dts
index c4d621224e..0046125529 100644
--- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-rango.dts
+++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-rango.dts
@@ -218,13 +218,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;
};
@@ -255,7 +255,7 @@
*/
partition@aa00000 {
label = "syscfg";
- reg = <0x5a00000 0x5600000>;
+ reg = <0xaa00000 0x5600000>;
};
/*
@@ -266,7 +266,7 @@
*/
partition@180000 {
label = "unused_area";
- reg = <0x260000 0x580000>; /* 5.6MB */
+ reg = <0x260000 0x5c0000>; /* 5.75MB */
};
};
};