From 438dcbfe74a6da1a8949d8fb785092d934499b60 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 10 Jul 2017 18:37:25 +0200 Subject: base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN Depending on busybox applet selection, paths of basic utiilties may differ, and may not work as symlinks to busybox. Simply using whatever binary is found in PATH and detecting symlinks automatically is more robust and easier to maintain. The list of binaries is also slightly cleaned up and duplicates are removed. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 2 +- target/linux/bcm53xx/base-files/lib/upgrade/platform.sh | 2 +- target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 2 +- target/linux/kirkwood/base-files/lib/upgrade/platform.sh | 2 +- target/linux/mvebu/base-files/lib/upgrade/platform.sh | 2 +- target/linux/pistachio/base-files/lib/upgrade/platform.sh | 2 +- target/linux/rb532/base-files/lib/upgrade/platform.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'target/linux') diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index cf51fe2d805..ba65a790060 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -7,7 +7,7 @@ PART_NAME=firmware RAMFS_COPY_DATA=/lib/ar71xx.sh -[ -x /usr/sbin/nandwrite ] && RAMFS_COPY_BIN=/usr/sbin/nandwrite +RAMFS_COPY_BIN='nandwrite' CI_BLKSZ=65536 CI_LDADR=0x80060000 diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 6a9e4950450..1f778c72b68 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -1,4 +1,4 @@ -RAMFS_COPY_BIN='/usr/bin/osafeloader /usr/bin/oseama' +RAMFS_COPY_BIN='osafeloader oseama' PART_NAME=firmware diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 141058f7bae..246361bbf60 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -3,7 +3,7 @@ PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 -RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv' +RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' platform_check_image() { diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh index c8c66c1b9d6..f75acb0d61e 100644 --- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh +++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh @@ -1,6 +1,6 @@ . /lib/kirkwood.sh -RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv' +RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' platform_check_image() { diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh index 8085634dca6..dd21c0958e3 100755 --- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh @@ -5,7 +5,7 @@ . /lib/mvebu.sh -RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv' +RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/lib/mvebu.sh /etc/fw_env.config /var/lock/fw_printenv.lock' REQUIRE_IMAGE_METADATA=1 diff --git a/target/linux/pistachio/base-files/lib/upgrade/platform.sh b/target/linux/pistachio/base-files/lib/upgrade/platform.sh index ee5d5066c34..4edc06bf9f8 100755 --- a/target/linux/pistachio/base-files/lib/upgrade/platform.sh +++ b/target/linux/pistachio/base-files/lib/upgrade/platform.sh @@ -6,7 +6,7 @@ # See /LICENSE for more information. # -RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /bin/mkdir /bin/dmesg /bin/sed /bin/grep" +RAMFS_COPY_BIN='fw_printenv fw_setenv dmesg' RAMFS_COPY_DATA="/etc/fw_env.config" REQUIRE_IMAGE_METADATA=0 diff --git a/target/linux/rb532/base-files/lib/upgrade/platform.sh b/target/linux/rb532/base-files/lib/upgrade/platform.sh index 29fe18de304..bfa73a7a246 100644 --- a/target/linux/rb532/base-files/lib/upgrade/platform.sh +++ b/target/linux/rb532/base-files/lib/upgrade/platform.sh @@ -1,5 +1,5 @@ REQUIRE_IMAGE_METADATA=1 -RAMFS_COPY_BIN=/usr/sbin/nandwrite +RAMFS_COPY_BIN='nandwrite' CI_KERNPART=none platform_check_image() { -- cgit v1.2.3