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/board.d/03_gpio_switches | |
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/board.d/03_gpio_switches')
-rwxr-xr-x | target/linux/ath79/base-files/etc/board.d/03_gpio_switches | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches deleted file mode 100755 index d84d6cfe85..0000000000 --- a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2018 OpenWrt.org -# - -. /lib/functions/uci-defaults.sh - -board_config_update - -board=$(board_name) - -case "$board" in -adtran,bsap1800-v2|\ -adtran,bsap1840) - ucidef_add_gpio_switch "wifi1_ext_a" "5GHz External Antenna A" "489" "1" - ucidef_add_gpio_switch "wifi1_int_a" "5GHz Internal Antenna A" "493" - ucidef_add_gpio_switch "wifi1_ext_b" "5GHz External Antenna B" "494" "1" - ucidef_add_gpio_switch "wifi1_int_b" "5GHz Internal Antenna B" "495" - ucidef_add_gpio_switch "wifi1_ext_c" "5GHz External Antenna C" "496" "1" - ucidef_add_gpio_switch "wifi1_int_c" "5GHz Internal Antenna C" "497" - ucidef_add_gpio_switch "wifi0_ext_a" "2.4GHz External Antenna A" "505" "1" - ucidef_add_gpio_switch "wifi0_int_a" "2.4GHz Internal Antenna A" "506" - ucidef_add_gpio_switch "wifi0_ext_b" "2.4GHz External Antenna B" "507" "1" - ucidef_add_gpio_switch "wifi0_int_b" "2.4GHz Internal Antenna B" "508" - ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "509" "1" - ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "510" - ;; -comfast,cf-e5) - ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1" - ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "11" "1" - ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "1" "1" - ucidef_add_gpio_switch "lte_reset" "LTE Reset" "12" "1" - ;; -dlink,dir-825-c1|\ -dlink,dir-835-a1) - ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "20" "0" - ;; -librerouter,librerouter-v1) - ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "1" "0" - ;; -tplink,archer-c25-v1) - ucidef_add_gpio_switch "led_control" "LED control" "21" "0" - ucidef_add_gpio_switch "led_reset" "LED reset" "19" "1" - ;; -tplink,cpe210-v1|\ -tplink,cpe220-v2|\ -tplink,cpe510-v1) - ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20" - ;; -ubnt,nanostation-ac) - ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3" - ;; -ubnt,acb-isp) - ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11" - ;; -zbtlink,zbt-wd323) - ucidef_add_gpio_switch "io0" "IO#0" "0" - ucidef_add_gpio_switch "io1" "IO#1" "1" - ucidef_add_gpio_switch "io2" "IO#2" "2" - ucidef_add_gpio_switch "io14" "IO#14" "14" - ;; -esac - -board_config_flush - -exit 0 |