diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-12-17 01:15:35 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-01-14 22:04:29 +0100 |
commit | 355f0444f3622347650776dd8f1e388dc5d000ca (patch) | |
tree | b1d60761c4f170df95c94c3bc7055f300e9bac1a /target/linux/lantiq/base-files/etc/hotplug.d | |
parent | b070101c506ca5541d6f232c2da3e0f7b1383106 (diff) | |
download | upstream-355f0444f3622347650776dd8f1e388dc5d000ca.tar.gz upstream-355f0444f3622347650776dd8f1e388dc5d000ca.tar.bz2 upstream-355f0444f3622347650776dd8f1e388dc5d000ca.zip |
lantiq: split base-files into subtargets
This splits the device-dependent base-files into subtarget directories,
like done recently for ath79 and ramips. While this increases the
overall lines of codes, it will make the code per subtarget smaller
and easier to keep track of features and devices.
While at it, several variables at the top of 02_network are removed,
as they were never changed. The values are put directly into the
function calls where they are used.
Remove unneeded LED setup from 01_leds, and remove 01_leds entirely
for falcon subtarget (as it is not used there).
Applies alphabetic reordering to device cases in base-files.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/lantiq/base-files/etc/hotplug.d')
-rw-r--r-- | target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 21 | ||||
-rw-r--r-- | target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom | 71 |
2 files changed, 0 insertions, 92 deletions
diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata deleted file mode 100644 index 0b48b77d41..0000000000 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Based on ar71xx 11-ath10k-caldata and 10-rt2x00-eeprom - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/functions/caldata.sh - -case "$FIRMWARE" in -"ath10k/cal-pci-0000:02:00.0.bin") - board=$(board_name) - case $board in - bt,homehub-v5a) - caldata_extract_ubi "caldata" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +3) - ;; - *) - caldata_die "board $board is not supported yet" - ;; - esac - ;; -esac diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom deleted file mode 100644 index 5a6e8d360b..0000000000 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/functions/caldata.sh - -caldata_extract_swap() { - local part=$1 - local offset=$2 - local count=$3 - local mtd - - mtd=$(find_mtd_chardev $part) - [ -n "$mtd" ] || caldata_die "no mtd device found for partition $part" - - offset=$(($offset / 2)) - count=$(($count / 2)) - - dd if=$mtd of=/lib/firmware/$FIRMWARE bs=2 skip=$offset count=$count conv=swab 2>/dev/null || \ - caldata_die "failed to extract calibration data from $mtd" -} - -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=$(board_name) - - case "$board" in - arcadyan,arv7518pw) - caldata_extract_swap "boardconfig" 0x400 0x1000 - ;; - arcadyan,arv8539pw22) - caldata_extract_swap "art" 0x400 0x1000 - ;; - bt,homehub-v2b) - caldata_extract_swap "art" 0x0 0x1000 - ath9k_patch_mac_crc "00:00:00:00:00:00" 0x20c - ;; - bt,homehub-v3a) - caldata_extract_swap "art-copy" 0x0 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot_env ethaddr) +2) 0x10c - ;; - bt,homehub-v5a) - caldata_extract_ubi "caldata" 0x1000 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +2) 0x10c - ;; - netgear,dgn3500|netgear,dgn3500b) - caldata_extract "calibration" 0xf000 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot-env ethaddr) +2) 0x20c - ;; - avm,fritz3370-rev2-hynix|\ - avm,fritz3370-rev2-micron|\ - avm,fritz7362sl) - caldata_extract_reverse "urlader" 0x1541 0x440 - ;; - avm,fritz7312|avm,fritz7320|avm,fritz7360sl) - caldata_extract "urlader" 0x985 0x1000 - ;; - avm,fritz7412) - /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 4096 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") - ;; - tplink,tdw8970|tplink,tdw8980) - caldata_extract "boardconfig" 0x21000 0x1000 - ;; - *) - caldata_die "board $board is not supported yet" - ;; - esac - ;; -esac |