mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
0130022bae
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>
17 lines
296 B
Bash
Executable File
17 lines
296 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=99
|
|
|
|
boot() {
|
|
case $(board_name) in
|
|
adtran,bsap1800-v2|\
|
|
adtran,bsap1840)
|
|
fconfig -s -w -d $(find_mtd_part "RedBoot config") -n boot_cntb -x 0
|
|
;;
|
|
qihoo,c301)
|
|
local n=$(fw_printenv activeregion | cut -d = -f 2)
|
|
fw_setenv "image${n}trynum" 0
|
|
;;
|
|
esac
|
|
}
|