aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-11-14 19:38:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-11-14 19:38:54 +0000
commit9383e3c3c4d3f8d84a3fb82878cb28c49938dc2b (patch)
tree96595ad4b5306c4fe84034fd0ee19cc80823245d /package/base-files
parent83ffa6f92ff129186fd59d595475dee253481997 (diff)
downloadmaster-187ad058-9383e3c3c4d3f8d84a3fb82878cb28c49938dc2b.tar.gz
master-187ad058-9383e3c3c4d3f8d84a3fb82878cb28c49938dc2b.tar.bz2
master-187ad058-9383e3c3c4d3f8d84a3fb82878cb28c49938dc2b.zip
ar71xx: Unifi AP Pro sysupgrade patch
The current implementation of mtd will not append the backup file created by sysupgrade to the correct partition, as mtd will append the data to first jffs2 partition it finds. As the kernel is also stored on a jffs2 partition (which resides before the overlay partition), the data will be appended to this partition. To fix this problem, a new option -s <number> skip the first n bytes when appending data to the jffs2 partiton, defaults to "0" is added to mtd. Signed-off-by: Peter Wagner <tripolar@gmx.at> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38807 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh2
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade1
2 files changed, 2 insertions, 1 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 9116206965..6122ae7712 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -188,7 +188,7 @@ jffs2_copy_config() {
default_do_upgrade() {
sync
if [ "$SAVE_CONFIG" -eq 1 ]; then
- get_image "$1" | mtd -j "$CONF_TAR" write - "${PART_NAME:-image}"
+ get_image "$1" | mtd $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}"
else
get_image "$1" | mtd write - "${PART_NAME:-image}"
fi
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index eb5ab035c6..14b09eb0b5 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -4,6 +4,7 @@
# initialize defaults
RAMFS_COPY_BIN="" # extra programs for temporary ramfs root
RAMFS_COPY_DATA="" # extra data files
+export MTD_CONFIG_ARGS=""
export INTERACTIVE=0
export VERBOSE=1
export SAVE_CONFIG=1