pistachio: remove pistachio_board_name, use the generic function
authorFelix Fietkau <nbd@nbd.name>
Fri, 17 Mar 2017 15:56:40 +0000 (16:56 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 22 Mar 2017 10:43:22 +0000 (11:43 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/boot/uboot-envtools/files/pistachio
target/linux/pistachio/base-files/etc/diag.sh
target/linux/pistachio/base-files/lib/pistachio.sh
target/linux/pistachio/base-files/lib/upgrade/platform.sh

index 56bac3580435f116812f6f6f94474a69b2a226c4..ac82d9da8bd8b46e12889db91bdbadcf8d672e8d 100644 (file)
 
 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)
index 7b556498d67388eb93ea68fa678b930070c7d06f..ed69d43385cef7232ba1ab359931987f6cb939d9 100755 (executable)
@@ -7,7 +7,6 @@
 #
 
 . /lib/functions/leds.sh
-. /lib/pistachio.sh
 
 status_led="marduk:red:heartbeat"
 
index f9a16db3ed80504faa2572815cf7d153e3c3e37d..9390a4c0fff4f0a3c679eb9a70f29a5f942226f2 100755 (executable)
@@ -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"
-}
index 5a886fbee63d08a70d5ba0fd3ff739b106581830..2ddac783f37a26a4411429126f9e8c04a38749aa 100755 (executable)
@@ -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)