aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorMarek Lindner <mareklindner@neomailbox.ch>2018-12-02 22:02:04 +0800
committerMathias Kresin <dev@kresin.me>2018-12-05 09:09:38 +0100
commitfbadfecbb5471ce9f8b814f5facdea5d48e246dc (patch)
tree0b7247d525dbe1336acc6553d460dd97ca898bb4 /target
parent06a20afb34994608044e8a6974371111086e31bb (diff)
downloadupstream-fbadfecbb5471ce9f8b814f5facdea5d48e246dc.tar.gz
upstream-fbadfecbb5471ce9f8b814f5facdea5d48e246dc.tar.bz2
upstream-fbadfecbb5471ce9f8b814f5facdea5d48e246dc.zip
ipq40xx: fix openmesh sysupgrade with tar content out of order
The tar extraction depends on the order in which the files are added to the tar file. Since the order is not guaranteed and depends on the host system, the combined mtd write fails with sysupgrade images built on some systems. Fix by changing to tar file order independent mtd write. Fixes: 86e18f6706e1 ("ipq806x: add support for OpenMesh A42") Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
index f7aed7c9b6..7cc60c00e9 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
@@ -76,9 +76,9 @@ platform_do_upgrade_openmesh() {
# take care of restoring a saved config
[ "$SAVE_CONFIG" -eq 1 ] && restore_backup="${MTD_CONFIG_ARGS} -j ${CONF_TAR}"
- # write concatinated kernel + rootfs to flash
- tar xf $tar_file ${board_dir}/kernel ${board_dir}/root -O | \
- mtd $restore_backup write - $PART_NAME
+ mtd -q erase inactive
+ tar xf $tar_file ${board_dir}/root -O | mtd -n -p $kernel_length $restore_backup write - $PART_NAME
+ tar xf $tar_file ${board_dir}/kernel -O | mtd -n write - $PART_NAME
# prepare new u-boot env
if [ "$next_boot_part" = "1" ]; then