forked from Ivasoft/openwrt
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>
This commit is contained in:
committed by
John Crispin
parent
c36ef5970b
commit
0130022bae
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/migrations.sh
|
||||
|
||||
board=$(board_name)
|
||||
boardonly="${board##*,}"
|
||||
|
||||
case "$board" in
|
||||
engenius,epg5000)
|
||||
migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g"
|
||||
;;
|
||||
tplink,archer-c25-v1|\
|
||||
tplink,archer-c58-v1|\
|
||||
tplink,archer-c59-v1|\
|
||||
tplink,archer-c59-v2|\
|
||||
tplink,archer-c60-v1|\
|
||||
tplink,archer-c60-v2|\
|
||||
tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5)
|
||||
migrate_leds "^$boardonly:=tp-link:"
|
||||
;;
|
||||
tplink,archer-c7-v2)
|
||||
migrate_leds ":blue:=:green:"
|
||||
;;
|
||||
tplink,re355-v1)
|
||||
migrate_leds "re355:=tp-link:"
|
||||
;;
|
||||
tplink,re450-v1)
|
||||
migrate_leds "re450:=tp-link:"
|
||||
;;
|
||||
wd,mynet-n750)
|
||||
migrate_leds "wd:=mynet-n750:"
|
||||
;;
|
||||
esac
|
||||
|
||||
migrations_apply system
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
fix_seama_header() {
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
||||
}
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
qihoo,c301)
|
||||
fix_seama_header
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user