diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-10-20 15:59:05 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-10-20 15:59:05 +0000 |
commit | 3d01e720ff7d33999e7c81481b860fae531c88f1 (patch) | |
tree | 0e1f61025a25bbc0e4fb0731d81f5b65e8d0a704 /target | |
parent | 5e0fa86ef1576ff2fef8c58c87327a81c6600455 (diff) | |
download | upstream-3d01e720ff7d33999e7c81481b860fae531c88f1.tar.gz upstream-3d01e720ff7d33999e7c81481b860fae531c88f1.tar.bz2 upstream-3d01e720ff7d33999e7c81481b860fae531c88f1.zip |
ar71xx: Fix sysupgrades for Allnet and OpenMesh devices
Both Allnet and OpenMesh sysupgrade uses fw_setenv from uboot-envtools to
change different settings in the uboot environment. uboot-envtools version
2013.01 introduced a filesystem lock "/var/lock/fw_printenv.lock" to guarantee
mutually exclusive access to the uboot environment. But the path /var doesn't
exist on the sysupgrade ramfs.
An upgrade on these devices fails since r36033 ("[package] uboot-envtools:
upgrade to version 2013.01.01") with following messages:
Error opening lock file /var/lock/fw_printenv.lock
failed to update U-Boot environment
Creating the "/var/lock" path before running fw_setenv is therefore a
requirement unless the locking functionality in fw_setenv is removed or
replaced with optional locking.
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38483 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ar71xx/base-files/lib/upgrade/allnet.sh | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh b/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh index 9a375ff19d..98b368d150 100644 --- a/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/allnet.sh @@ -4,9 +4,11 @@ # a minimal web-interface for flashing a new firmware. # make sure we got uboot-envtools and fw_env.config copied over to the ramfs +# create /var/lock for the lock "fw_setenv.lock" of fw_setenv platform_add_ramfs_ubootenv() { [ -e /usr/sbin/fw_printenv ] && install_bin /usr/sbin/fw_printenv /usr/sbin/fw_setenv [ -e /etc/fw_env.config ] && install_file /etc/fw_env.config + mkdir -p $RAM_ROOT/var/lock } append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh index 5179875fe0..fb8ef191f7 100644 --- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh @@ -27,10 +27,12 @@ cfg_value_get() } # make sure we got uboot-envtools and fw_env.config copied over to the ramfs +# create /var/lock for the lock "fw_setenv.lock" of fw_setenv platform_add_ramfs_ubootenv() { [ -e /usr/sbin/fw_printenv ] && install_bin /usr/sbin/fw_printenv /usr/sbin/fw_setenv [ -e /etc/fw_env.config ] && install_file /etc/fw_env.config + mkdir -p $RAM_ROOT/var/lock } append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv |