projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mvebu: add support for WRT32X (venom)
[openwrt/openwrt.git]
/
target
/
linux
/
mvebu
/
base-files
/
lib
/
preinit
/
81_linksys_syscfg
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 d59cec3ab71eff35be908592c6183350bbbaf762..cf7a22c4f6ea60c76caf12e0b560f2858e28dffc 100644
(file)
--- a/
target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
+++ b/
target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
@@
-1,22
+1,23
@@
#
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
+# Copyright (C) 2016 LEDE-Project.org
#
preinit_mount_syscfg() {
. /lib/functions.sh
#
preinit_mount_syscfg() {
. /lib/functions.sh
- . /lib/mvebu.sh
- case $(
mvebu_
board_name) in
- armada-xp-linksys-mamba)
+ case $(board_name) in
+ armada-
385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|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 ]
then
echo "ubifs syscfg partition is damaged, reformatting"
if [ $needs_recovery -eq 1 ]
then
echo "ubifs syscfg partition is damaged, reformatting"
- ubidetach -m
8
- ubiformat -y -O 2048 -q /dev/mtd
8
- 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
ubimkvol /dev/ubi1 -n 0 -N syscfg -t dynamic --maxavsize
fi
mkdir /tmp/syscfg