2010-03-28 01:38:40 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
. /lib/ar71xx.sh
|
|
|
|
|
|
|
|
board=$(ar71xx_board_name)
|
|
|
|
|
2013-11-08 06:31:53 +08:00
|
|
|
fixtrx() {
|
2010-03-28 01:38:40 +08:00
|
|
|
mtd -o 32 fixtrx firmware
|
|
|
|
}
|
|
|
|
|
2016-07-19 01:39:57 +08:00
|
|
|
fixwrgg() {
|
|
|
|
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
|
|
|
|
|
|
|
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
|
|
|
|
}
|
|
|
|
|
2013-11-08 06:31:53 +08:00
|
|
|
case "$board" in
|
|
|
|
mynet-rext |\
|
|
|
|
wrt160nl)
|
|
|
|
fixtrx
|
|
|
|
;;
|
2016-07-19 01:39:57 +08:00
|
|
|
dap-2695-a1)
|
|
|
|
fixwrgg
|
|
|
|
;;
|
2013-11-08 06:31:53 +08:00
|
|
|
esac
|