a8f5051104
783465d783 odhcpd: don't enable server mode on non-static lan port c92c1894a5 odhcpd: backport fixes from master branch (FS#402, FS#524) 4b4a4af814 dnsmasq: bump to v2.78 b8357e87d7 base-files: create /etc/config/ directory 3350137bd3 sunxi: clean up modules definitions a881323cb2 ltq-vdsl-mei: revert disable optimized firmware download f483a35f08 curl: fix security problems e232c6754d mbedtls: update to 2.6.0 CVE-2017-14032 37e1bd27d0 generic: drop 704-phy-no-genphy-soft-reset.patch 720b0e2e2d kernel: update 4.4 to 4.4.89 b428f45c06 ltq-vdsl-mei: disable optimized firmware download 39e5cd9556 ltq-vdsl: fix PM thread suspend and resume handling 86f0e8b091 openvpn: add "extra-certs" option af802bc687 lantiq: fix missing otg_cap on danube platform 12a0da6315 tcpdump: noop commit to refer CVEs fixed in 4.9.2 f66c6e1d8a tcpdump: bump to 4.9.2 a131f7cb69 utils/tcpdump: Rework URLs 7f1359c14e base-files: fix wan6 interface config generation for pppoe 97ebdf93a3 ipq806x: Archer C2600: fix switch ports numbering d33f7905df treewide: fix shellscript syntax errors/typos 4f162ac3ce ramips: fix hg255d LED status support
86 lines
3.3 KiB
Diff
86 lines
3.3 KiB
Diff
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
Date: Thu, 1 Jun 2017 18:39:12 +0200
|
|
Subject: mvebu: fix sysupgrade
|
|
|
|
mvebu was modifying RAMFS_COPY_BIN and RAMFS_COPY_DATA from a
|
|
sysupgrade_pre_upgrade hook. As the ramfs is created from stage2, this
|
|
did not have an effect anymore after the staged sysupgrade changes.
|
|
|
|
As it doesn't really hurt to copy fw_printenv and fw_setenv
|
|
unconditionally, simply add them in /lib/upgrade/platform.sh, so stage2
|
|
will see them.
|
|
|
|
Config copying is moved to a function called by platform_copy_config, where
|
|
it belongs.
|
|
|
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
Fixes: FS#821
|
|
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
|
|
|
|
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
|
|
index cc8047d988e39ca9ba27d2588744aad469d1d978..bdbb8926643287f48a4ae62c5d1d4b4a29130859 100755
|
|
--- a/package/base-files/files/lib/upgrade/stage2
|
|
+++ b/package/base-files/files/lib/upgrade/stage2
|
|
@@ -48,7 +48,7 @@ switch_to_ramfs() {
|
|
/bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc \
|
|
/bin/cut /usr/bin/printf /bin/sync /bin/mkdir /bin/rmdir \
|
|
/bin/rm /usr/bin/basename /bin/kill /bin/chmod /usr/bin/find \
|
|
- /bin/mknod
|
|
+ /bin/mknod /bin/touch
|
|
|
|
install_bin /sbin/mtd
|
|
install_bin /sbin/mount_root
|
|
diff --git a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
|
|
index d06a1b8ed0534364b595618f24b65f9f3a3e275d..63d1cd14a4deed407b217a518ae25a752f62969e 100644
|
|
--- a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
|
|
+++ b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
|
|
@@ -73,21 +73,7 @@ platform_do_upgrade_linksys() {
|
|
}
|
|
}
|
|
|
|
-linksys_preupgrade() {
|
|
- local board=$(mvebu_board_name)
|
|
-
|
|
- case "$board" in
|
|
- armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba|armada-385-linksys-rango)
|
|
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/sbin/fw_printenv /usr/sbin/fw_setenv"
|
|
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /bin/mkdir /bin/touch"
|
|
- export RAMFS_COPY_DATA="${RAMFS_COPY_DATA} /etc/fw_env.config /var/lock/fw_printenv.lock"
|
|
-
|
|
- [ -f /tmp/sysupgrade.tgz ] && {
|
|
- cp /tmp/sysupgrade.tgz /tmp/syscfg/sysupgrade.tgz
|
|
- }
|
|
- ;;
|
|
- esac
|
|
+platform_copy_config_linksys() {
|
|
+ cp -f /tmp/sysupgrade.tgz /tmp/syscfg/sysupgrade.tgz
|
|
+ sync
|
|
}
|
|
-
|
|
-append sysupgrade_pre_upgrade linksys_preupgrade
|
|
-
|
|
diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
|
|
index 77578e28d42fb7ca5e3f057e42ac5818e851736f..55c084483995d548556a560e171462f2d5456172 100755
|
|
--- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh
|
|
+++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
|
|
@@ -5,7 +5,8 @@
|
|
|
|
. /lib/mvebu.sh
|
|
|
|
-RAMFS_COPY_DATA=/lib/mvebu.sh
|
|
+RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
|
|
+RAMFS_COPY_DATA='/lib/mvebu.sh /etc/fw_env.config /var/lock/fw_printenv.lock'
|
|
REQUIRE_IMAGE_METADATA=1
|
|
|
|
platform_check_image() {
|
|
@@ -31,6 +32,9 @@ platform_copy_config() {
|
|
local board=$(mvebu_board_name)
|
|
|
|
case "$board" in
|
|
+ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
|
+ platform_copy_config_linksys
|
|
+ ;;
|
|
armada-388-clearfog)
|
|
platform_copy_config_clearfog "$ARGV"
|
|
;;
|