aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-07-02 16:10:57 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:25:46 +0200
commita074ed29333dbb71d40da2f0b4ad9a8e6e781bfd (patch)
tree3adb21a3fea5d923abf368163d46bd7d9f052da6
parente98eab1b6b775afaec2c62071ca703ea75c6358a (diff)
downloadupstream-a074ed29333dbb71d40da2f0b4ad9a8e6e781bfd.tar.gz
upstream-a074ed29333dbb71d40da2f0b4ad9a8e6e781bfd.tar.bz2
upstream-a074ed29333dbb71d40da2f0b4ad9a8e6e781bfd.zip
base-files: drop support for NAND upgrade in platform_pre_upgrade()
With bcm53xx switched to the new procedure there is no more need for keeping that backward compatibility code. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit ea4e1dac71dfa015c0da10e68149478fa25878f9)
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/files/lib/upgrade/common.sh4
-rw-r--r--package/base-files/files/lib/upgrade/nand.sh9
-rwxr-xr-xpackage/base-files/files/lib/upgrade/stage25
4 files changed, 3 insertions, 17 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 551ef71be5..44aef87a20 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
-PKG_RELEASE:=202
+PKG_RELEASE:=203
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 0f6fab97f8..a13a6aaf5a 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -228,9 +228,7 @@ default_do_upgrade() {
do_upgrade_stage2() {
v "Performing system upgrade..."
- if [ -n "$do_upgrade" ]; then
- eval "$do_upgrade"
- elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
+ if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
platform_do_upgrade "$IMAGE"
else
default_do_upgrade "$IMAGE"
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index 99916a4e96..9f258a82c5 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -280,15 +280,6 @@ nand_upgrade_tar() {
# Recognize type of passed file and start the upgrade process
nand_do_upgrade() {
- if [ -n "$IS_PRE_UPGRADE" ]; then
- # Previously, nand_do_upgrade was called from the platform_pre_upgrade
- # hook; this piece of code handles scripts that haven't been
- # updated. All scripts should gradually move to call nand_do_upgrade
- # from platform_do_upgrade instead.
- export do_upgrade="nand_do_upgrade '$1'"
- return
- fi
-
local file_type=$(identify $1)
if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index bdc12c7426..05d9214377 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -136,10 +136,7 @@ sleep 1
if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
- IS_PRE_UPGRADE=1 platform_pre_upgrade "$IMAGE"
-
- # Needs to be unset again because of busybox weirdness ...
- IS_PRE_UPGRADE=
+ platform_pre_upgrade "$IMAGE"
fi
if [ -n "$(rootfs_type)" ]; then