diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-10-22 21:46:57 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2019-10-27 14:24:22 +0100 |
commit | 0130022baec0a90c6cb039a5cbe9b9c65c01672f (patch) | |
tree | 93815b43aaf2d13863c0beb78e95cf443c29606a /target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | |
parent | c36ef5970b0342f01f1f3bfc7452b86992c7201b (diff) | |
download | upstream-0130022baec0a90c6cb039a5cbe9b9c65c01672f.tar.gz upstream-0130022baec0a90c6cb039a5cbe9b9c65c01672f.tar.bz2 upstream-0130022baec0a90c6cb039a5cbe9b9c65c01672f.zip |
ath79: split base-files into subtargets
While most of the target's contents are split into subtargets, the
base-files are maintained for the target as a whole.
However, OpenWrt already implements a mechanism that will use (and
even prefer) files in the subtargets' directories. This can be
exploited to make several scripts subtarget-specific and thus save
some space (especially helpful for the tiny devices).
The only script remaining in parent base-files is
/etc/hotplug.d/ieee80211/00-wifi-migration, everything else is
moved/split.
Note that this will increase overall code lines, but reduce code
per subtarget.
base-files ipk size reduction:
master (generic) 49135 B
split (generic) 48533 B (- 0.6 kiB)
split (tiny) 43337 B (- 5.7 kiB)
split (nand) 44423 B (- 4.6 kiB)
Tested on TL-WR1043ND v4 (generic) and TL-WR841N v12 (tiny).
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom')
-rw-r--r-- | target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 161 |
1 files changed, 0 insertions, 161 deletions
diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom deleted file mode 100644 index 14cfe64a41..0000000000 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/sh - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/functions/caldata.sh - -board=$(board_name) - -case "$FIRMWARE" in -"ath9k-eeprom-ahb-18100000.wmac.bin") - case $board in - avm,fritz4020) - caldata_extract_reverse "urlader" 0x1541 0x440 - ;; - dlink,dir-825-c1|\ - dlink,dir-835-a1) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4) - ;; - dlink,dir-842-c1|\ - dlink,dir-842-c2|\ - dlink,dir-842-c3|\ - dlink,dir-859-a1|\ - nec,wg1200cr|\ - wd,mynet-n750) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac") - ;; - engenius,ecb1750) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env "athaddr") +1) - ;; - engenius,epg5000|\ - iodata,wn-ac1167dgr|\ - iodata,wn-ac1600dgr|\ - iodata,wn-ac1600dgr2|\ - iodata,wn-ag300dgr|\ - sitecom,wlr-7100) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr) - ;; - nec,wg800hp) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_text board_data 0x680) - ;; - qihoo,c301) - caldata_extract "radiocfg" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac") - ;; - zyxel,nbg6716) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr) - ;; - *) - caldata_die "board $board is not supported yet" - ;; - esac - ;; -"ath9k-eeprom-pci-0000:00:00.0.bin") - case $board in - avm,fritz300e) - caldata_extract_reverse "urloader" 0x1541 0x440 - ;; - buffalo,whr-g301n|\ - buffalo,wzr-hp-g302h-a1a0|\ - tplink,tl-wr841-v5|\ - tplink,tl-wr941-v4) - caldata_extract "art" 0x1000 0xeb8 - ;; - buffalo,wzr-hp-g450h) - caldata_extract "art" 0x1000 0x440 - ;; - dlink,dir-825-c1|\ - dlink,dir-835-a1) - caldata_extract "art" 0x5000 0x440 - ath9k_patch_mac $(macaddr_add $(mtd_get_mac_text "mac" 0x18) 1) - ;; - ocedo,raccoon|\ - tplink,tl-wdr3500-v1|\ - tplink,tl-wdr3600-v1|\ - tplink,tl-wdr4300-v1|\ - tplink,tl-wdr4900-v2|\ - winchannel,wb2000) - caldata_extract "art" 0x5000 0x440 - ;; - netgear,wnr1000-v2|\ - netgear,wnr2000-v3|\ - netgear,wnr612-v2|\ - on,n150r|\ - pcs,cap324|\ - tplink,tl-mr3220-v1|\ - tplink,tl-mr3420-v1|\ - tplink,tl-wr2543-v1|\ - tplink,tl-wr740n-v1|\ - tplink,tl-wr740n-v3|\ - tplink,tl-wr741-v1|\ - tplink,tl-wr743nd-v1|\ - tplink,tl-wr841-v7|\ - tplink,tl-wr842n-v1|\ - ubnt,airrouter|\ - ubnt,bullet-m|\ - ubnt,nano-m|\ - ubnt,rocket-m) - caldata_extract "art" 0x1000 0x1000 - ;; - pqi,air-pen) - caldata_extract "art" 0x1000 0x7d2 - ;; - ubnt,unifi) - caldata_extract "art" 0x1000 0x800 - ;; - wd,mynet-n750) - caldata_extract "art" 0x5000 0x440 - ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac") - ;; - wd,mynet-wifi-rangeextender) - caldata_extract "art" 0x1000 0x1000 - ath9k_patch_mac $(nvram get wl0_hwaddr) - ;; - *) - caldata_die "board $board is not supported yet" - ;; - esac - ;; -"ath9k-eeprom-pci-0000:00:11.0.bin") - case $board in - buffalo,wzr-hp-ag300h|\ - netgear,wndr3700|\ - netgear,wndr3700v2|\ - netgear,wndr3800|\ - netgear,wndr3800ch) - caldata_extract "art" 0x1000 0xeb8 - ;; - dlink,dir-825-b1) - caldata_extract "caldata" 0x1000 0xeb8 - ath9k_patch_mac_crc $(mtd_get_mac_text "caldata" 0xffa0) 0x20c - ;; - *) - caldata_die "board $board is not supported yet" - ;; - esac - ;; -"ath9k-eeprom-pci-0000:00:12.0.bin") - case $board in - buffalo,wzr-hp-ag300h|\ - netgear,wndr3700|\ - netgear,wndr3700v2|\ - netgear,wndr3800|\ - netgear,wndr3800ch) - caldata_extract "art" 0x5000 0xeb8 - ;; - dlink,dir-825-b1) - caldata_extract "caldata" 0x5000 0xeb8 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_text "caldata" 0xffb4) 1) 0x20c - ;; - *) - caldata_die "board $board is not supported yet" - ;; - esac - ;; -esac |