diff options
author | Mathias Kresin <dev@kresin.me> | 2017-05-12 22:36:07 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-07-15 23:13:34 +0200 |
commit | f12a32630ff52b5e13397f64e9fb31708e97fb60 (patch) | |
tree | 46db1bb2606e05b40aaf2e43e7468531fa8df7b6 /target/linux/mpc85xx | |
parent | ced05ca9e092817f2f4d4fe25c5c56700838a3ad (diff) | |
download | upstream-f12a32630ff52b5e13397f64e9fb31708e97fb60.tar.gz upstream-f12a32630ff52b5e13397f64e9fb31708e97fb60.tar.bz2 upstream-f12a32630ff52b5e13397f64e9fb31708e97fb60.zip |
treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/mpc85xx')
4 files changed, 8 insertions, 17 deletions
diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index e0a0861f3b..511b56b1cc 100755 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -2,13 +2,12 @@ # Copyright (C) 2014-2015 OpenWrt.org . /lib/functions/uci-defaults.sh -. /lib/mpc85xx.sh . /lib/functions.sh . /lib/functions/system.sh board_config_update -board=$(mpc85xx_board_name) +board=$(board_name) case "$board" in tl-wdr4900-v1) diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh index 1107763a37..b269427a51 100644 --- a/target/linux/mpc85xx/base-files/etc/diag.sh +++ b/target/linux/mpc85xx/base-files/etc/diag.sh @@ -1,11 +1,11 @@ #!/bin/sh # Copyright (C) 2013 OpenWrt.org +. /lib/functions.sh . /lib/functions/leds.sh -. /lib/mpc85xx.sh get_status_led() { - case $(mpc85xx_board_name) in + case $(board_name) in tl-wdr4900-v1) status_led="tp-link:blue:system" ;; diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 0baec28859..4b5b7a30ba 100644 --- a/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -13,9 +13,6 @@ ath9k_eeprom_extract() { local count=$3 local mtd - . /lib/functions.sh - . /lib/functions/system.sh - mtd=$(find_mtd_chardev $part) [ -n "$mtd" ] || \ ath9k_eeprom_die "no mtd device found for partition $part" @@ -29,9 +26,6 @@ tpl_set_wireless_mac() local offset=$1 local mac - . /lib/functions.sh - . /lib/functions/system.sh - mac=$(mtd_get_mac_binary u-boot 326656) mac=$(macaddr_add $mac $offset) @@ -40,9 +34,10 @@ tpl_set_wireless_mac() [ -e $FW_FILE ] && exit 0 -. /lib/mpc85xx.sh +. /lib/functions.sh +. /lib/functions/system.sh -board=$(mpc85xx_board_name) +board=$(board_name) case "$FIRMWARE" in "pci_wmac0.eeprom") diff --git a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh index d95ec3013f..65b3674769 100755 --- a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh @@ -2,10 +2,7 @@ # Copyright (C) 2011 OpenWrt.org # -. /lib/mpc85xx.sh - PART_NAME=firmware -RAMFS_COPY_DATA=/lib/mpc85xx.sh tplink_get_hwid() { local part @@ -25,7 +22,7 @@ tplink_get_image_boot_size() { } platform_check_image() { - local board=$(mpc85xx_board_name) + local board=$(board_name) local magic="$(get_magic_long "$1")" [ "$#" -gt 1 ] && return 1 @@ -65,7 +62,7 @@ platform_check_image() { } platform_do_upgrade() { - local board=$(mpc85xx_board_name) + local board=$(board_name) case "$board" in *) |