ath79: split base-files into subtargets
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 22 Oct 2019 19:46:57 +0000 (21:46 +0200)
committerJohn Crispin <john@phrozen.org>
Sun, 27 Oct 2019 13:24:22 +0000 (14:24 +0100)
commit0130022baec0a90c6cb039a5cbe9b9c65c01672f
tree93815b43aaf2d13863c0beb78e95cf443c29606a
parentc36ef5970b0342f01f1f3bfc7452b86992c7201b
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>
29 files changed:
target/linux/ath79/base-files/etc/board.d/01_leds [deleted file]
target/linux/ath79/base-files/etc/board.d/02_network [deleted file]
target/linux/ath79/base-files/etc/board.d/03_gpio_switches [deleted file]
target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom [deleted file]
target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata [deleted file]
target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac [deleted file]
target/linux/ath79/base-files/etc/init.d/bootcount [deleted file]
target/linux/ath79/base-files/etc/uci-defaults/04_led_migration [deleted file]
target/linux/ath79/base-files/etc/uci-defaults/09_fix-checksum [deleted file]
target/linux/ath79/base-files/lib/functions/k2t.sh [deleted file]
target/linux/ath79/base-files/lib/upgrade/platform.sh [deleted file]
target/linux/ath79/generic/base-files/etc/board.d/01_leds [new file with mode: 0755]
target/linux/ath79/generic/base-files/etc/board.d/02_network [new file with mode: 0755]
target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches [new file with mode: 0755]
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/init.d/bootcount [new file with mode: 0755]
target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum [new file with mode: 0644]
target/linux/ath79/generic/base-files/lib/functions/k2t.sh [new file with mode: 0755]
target/linux/ath79/generic/base-files/lib/upgrade/platform.sh [new file with mode: 0644]
target/linux/ath79/nand/base-files/etc/board.d/01_leds [new file with mode: 0755]
target/linux/ath79/nand/base-files/etc/board.d/02_network [new file with mode: 0755]
target/linux/ath79/nand/base-files/lib/upgrade/platform.sh [new file with mode: 0644]
target/linux/ath79/tiny/base-files/etc/board.d/01_leds [new file with mode: 0755]
target/linux/ath79/tiny/base-files/etc/board.d/02_network [new file with mode: 0755]
target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom [new file with mode: 0644]
target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh [new file with mode: 0644]