summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-03-17 16:56:40 +0100
committerFelix Fietkau <nbd@nbd.name>2017-03-22 11:43:22 +0100
commiteb98bf605ebf193e0e5a634a983443ff554f2236 (patch)
treefe693e0549cabfb9aa8a234f6a0b67de30135222
parent0d271cef8071d0698246b4b50a610b5ff718af01 (diff)
downloadmtk-20170518-eb98bf605ebf193e0e5a634a983443ff554f2236.zip
mtk-20170518-eb98bf605ebf193e0e5a634a983443ff554f2236.tar.gz
mtk-20170518-eb98bf605ebf193e0e5a634a983443ff554f2236.tar.bz2
pistachio: remove pistachio_board_name, use the generic function
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/boot/uboot-envtools/files/pistachio3
-rwxr-xr-xtarget/linux/pistachio/base-files/etc/diag.sh1
-rwxr-xr-xtarget/linux/pistachio/base-files/lib/pistachio.sh8
-rwxr-xr-xtarget/linux/pistachio/base-files/lib/upgrade/platform.sh6
4 files changed, 3 insertions, 15 deletions
diff --git a/package/boot/uboot-envtools/files/pistachio b/package/boot/uboot-envtools/files/pistachio
index 56bac35..ac82d9d 100644
--- a/package/boot/uboot-envtools/files/pistachio
+++ b/package/boot/uboot-envtools/files/pistachio
@@ -10,11 +10,10 @@
touch /etc/config/ubootenv
-. /lib/pistachio.sh
. /lib/uboot-envtools.sh
. /lib/functions.sh
-board=$(pistachio_board_name)
+board=$(board_name)
case "$board" in
marduk)
diff --git a/target/linux/pistachio/base-files/etc/diag.sh b/target/linux/pistachio/base-files/etc/diag.sh
index 7b55649..ed69d43 100755
--- a/target/linux/pistachio/base-files/etc/diag.sh
+++ b/target/linux/pistachio/base-files/etc/diag.sh
@@ -7,7 +7,6 @@
#
. /lib/functions/leds.sh
-. /lib/pistachio.sh
status_led="marduk:red:heartbeat"
diff --git a/target/linux/pistachio/base-files/lib/pistachio.sh b/target/linux/pistachio/base-files/lib/pistachio.sh
index f9a16db..9390a4c 100755
--- a/target/linux/pistachio/base-files/lib/pistachio.sh
+++ b/target/linux/pistachio/base-files/lib/pistachio.sh
@@ -32,11 +32,3 @@ pistachio_board_detect() {
echo "$PISTACHIO_BOARD_NAME" > /tmp/sysinfo/board_name
echo "$PISTACHIO_MODEL" > /tmp/sysinfo/model
}
-
-pistachio_board_name() {
- local name
- [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
- [ -z "$name" ] && name="unknown"
-
- echo "$name"
-}
diff --git a/target/linux/pistachio/base-files/lib/upgrade/platform.sh b/target/linux/pistachio/base-files/lib/upgrade/platform.sh
index 5a886fb..2ddac78 100755
--- a/target/linux/pistachio/base-files/lib/upgrade/platform.sh
+++ b/target/linux/pistachio/base-files/lib/upgrade/platform.sh
@@ -6,15 +6,13 @@
# See /LICENSE for more information.
#
-. /lib/pistachio.sh
-
RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /bin/mkdir /bin/dmesg /bin/sed /bin/grep"
RAMFS_COPY_DATA="/etc/fw_env.config"
REQUIRE_IMAGE_METADATA=0
platform_check_image()
{
- local board=$(pistachio_board_name)
+ local board=$(board_name)
nand_do_platform_check $board $1
return $?
@@ -32,7 +30,7 @@ platform_pre_upgrade() {
}
platform_nand_pre_upgrade() {
- local board=$(pistachio_board_name)
+ local board=$(board_name)
case "$board" in
marduk)