lantiq: remove lantiq_board_name, use the generic function instead
authorFelix Fietkau <nbd@nbd.name>
Fri, 17 Mar 2017 15:21:30 +0000 (16:21 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Dec 2017 13:54:44 +0000 (14:54 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 7e798dab56546d6f8e2fe0f913ff41e8f010af51)

package/boot/uboot-envtools/files/lantiq
target/linux/lantiq/base-files/etc/board.d/01_leds
target/linux/lantiq/base-files/etc/board.d/02_network
target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
target/linux/lantiq/base-files/lib/functions/lantiq.sh
target/linux/lantiq/base-files/lib/upgrade/platform.sh

index 185f2fe77ecc0fb58e155439cc6685b9e5249ff5..d1a6668e84c2f71b4749ef518aec730388a4b7df 100644 (file)
@@ -7,11 +7,10 @@
 
 touch /etc/config/ubootenv
 
-. /lib/functions/lantiq.sh
 . /lib/uboot-envtools.sh
 . /lib/functions.sh
 
-board=$(lantiq_board_name)
+board=$(board_name)
 
 case "$board" in
 BTHOMEHUBV2B)
index 9d28495ecaef12d633de351c72382c31fd95362b..60047af290ae9a8801635dfba691ef8c2b887f9c 100755 (executable)
@@ -32,7 +32,7 @@ led_internet="$(lantiq_get_dt_led internet)"
        ucidef_set_led_netdev "internet" "internet" "$led_internet" "$interface"
 }
 
-board=$(lantiq_board_name)
+board=$(board_name)
 
 case "$board" in
 ARV4525PW)
index de55be8efbd70e121b712c0e658153644fd9d297..8755604254b466947aecf32f947a4c8edfe2930f 100755 (executable)
@@ -18,7 +18,7 @@ lan_mac=""
 wan_mac=""
 interface_wan=""
 
-board=$(lantiq_board_name)
+board=$(board_name)
 
 case "$board" in
 ACMP252|GIGASX76X)
index 2511ed6014c9fb86da54415e4a36865ef8473e16..1c2b8456fc143b7f604f68c9ddf38ce1d0e7daad 100644 (file)
@@ -5,7 +5,6 @@
 
 . /lib/functions.sh
 . /lib/functions/system.sh
-. /lib/functions/lantiq.sh
 . /lib/upgrade/nand.sh
 
 ath10k_caldata_die() {
@@ -37,7 +36,7 @@ ath10k_caldata_set_macaddr() {
 
 case "$FIRMWARE" in
 "ath10k/cal-pci-0000:02:00.0.bin")
-       board=$(lantiq_board_name)
+       board=$(board_name)
        case $board in
                BTHOMEHUBV5A)
                        ath10k_caldata_extract_ubi "caldata" 20480 2116
index 26b5551754d6632dc2d198b2822c4cfbcee31811..7144423d433b2ce0ffdbad73680c88931f3f0d65 100644 (file)
@@ -5,7 +5,6 @@
 
 . /lib/functions.sh
 . /lib/functions/system.sh
-. /lib/functions/lantiq.sh
 . /lib/upgrade/nand.sh
 
 # xor multiple hex values of the same length
@@ -114,7 +113,7 @@ case "$FIRMWARE" in
        "ath9k-eeprom-pci-0000:00:0e.0.bin" | \
        "ath9k-eeprom-pci-0000:01:00.0.bin" | \
        "ath9k-eeprom-pci-0000:02:00.0.bin")
-               board=$(lantiq_board_name)
+               board=$(board_name)
 
                case "$board" in
                        ARV7518PW)
index 89f194b39e08557cdc76f45423c9747af4b9f5b6..5d760d1d30dd31d94b047ca705fcb0a6c2c33bb0 100644 (file)
@@ -9,15 +9,6 @@ lantiq_board_model() {
        echo "$model"
 }
 
-lantiq_board_name() {
-       local name
-
-       [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
-       [ -z "$name" ] && name="unknown"
-
-       echo "$name"
-}
-
 lantiq_get_dt_led() {
        local label
        local ledpath
index d4db8d2bf74f7d125257c11c8c6e95065880535d..9158fa742fdf1fab37e67a045e02b33344aaf3c9 100755 (executable)
@@ -1,5 +1,3 @@
-. /lib/functions/lantiq.sh
-
 PART_NAME=firmware
 REQUIRE_IMAGE_METADATA=1
 
@@ -8,7 +6,7 @@ platform_check_image() {
 }
 
 platform_pre_upgrade() {
-       local board=$(lantiq_board_name)
+       local board=$(board_name)
 
        case "$board" in
        BTHOMEHUBV2B|BTHOMEHUBV3A|BTHOMEHUBV5A|P2812HNUF* )