Skip to content

Commit

Permalink
mvebu: bugfixes for rango
Browse files Browse the repository at this point in the history
backport of ce116bc

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
  • Loading branch information
kaloz committed Oct 18, 2016
1 parent a55319c commit 2aefb51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion package/boot/uboot-envtools/files/mvebu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2014-2015 OpenWrt.org
# Copyright (C) 2014-2016 OpenWrt.org
#

[ -e /etc/config/ubootenv ] && exit 0
Expand All @@ -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"
;;
Expand Down
9 changes: 5 additions & 4 deletions target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -235,7 +235,7 @@
*/
partition@aa00000 {
label = "syscfg";
reg = <0x5a00000 0x5600000>;
reg = <0xaa00000 0x5600000>;
};

/*
Expand All @@ -246,7 +246,7 @@
*/
partition@180000 {
label = "unused_area";
reg = <0x260000 0x580000>; /* 5.6MB */
reg = <0x260000 0x5c0000>; /* 5.75MB */
};
};
};
Expand Down

0 comments on commit 2aefb51

Please sign in to comment.