aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@openmesh.com>2018-10-01 11:48:04 +0200
committerMathias Kresin <dev@kresin.me>2018-10-07 15:44:19 +0200
commitebd57de1f9894a91991fe19f200dba7b1104390c (patch)
treecc52819033d4926c1d500bea2685bdfccd06e7bf
parentc383e0c979fb95ef6de6782112aa86045fe4a6a5 (diff)
downloadupstream-ebd57de1f9894a91991fe19f200dba7b1104390c.tar.gz
upstream-ebd57de1f9894a91991fe19f200dba7b1104390c.tar.bz2
upstream-ebd57de1f9894a91991fe19f200dba7b1104390c.zip
ipq40xx: Create /var/lock directory in platform_do_upgrade_*
The sysupgrade_pre_upgrade hook was removed with 5e1b4c57ded7 ("base-files: drop fwtool_pre_upgrade") while there were still scripts using it: * target/linux/ar71xx/base-files/lib/upgrade/allnet.sh * target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh * target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh Not running the hooks can either prevent a successful upgrade or brick the device because the fw_setenv program cannot be started correctly. Instead of adding this hook again, the directory /var/lock for fw_setenv can also just be created directly before fw_setenv is called. Fixes: 5e1b4c57ded7 ("base-files: drop fwtool_pre_upgrade") Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh9
1 files changed, 1 insertions, 8 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..081f3305c3 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
@@ -98,16 +98,9 @@ platform_do_upgrade_openmesh() {
printf "rootfs_checksum %s\n" ${rootfs_md5} >> $setenv_script
# store u-boot env changes
+ mkdir -p /var/lock
fw_setenv -s $setenv_script || {
echo "failed to update U-Boot environment"
return 1
}
}
-
-# create /var/lock for the lock "fw_setenv.lock" of fw_setenv
-# the rest is copied using ipq806x's RAMFS_COPY_BIN and RAMFS_COPY_DATA
-platform_add_ramfs_ubootenv()
-{
- mkdir -p $RAM_ROOT/var/lock
-}
-append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv