2010-03-27 17:38:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
. /lib/ar71xx.sh
|
|
|
|
|
|
|
|
board=$(ar71xx_board_name)
|
|
|
|
|
2013-11-07 22:31:53 +00:00
|
|
|
fixtrx() {
|
2010-03-27 17:38:40 +00:00
|
|
|
mtd -o 32 fixtrx firmware
|
|
|
|
}
|
|
|
|
|
2016-07-18 17:39:57 +00: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-07 22:31:53 +00:00
|
|
|
case "$board" in
|
|
|
|
mynet-rext |\
|
|
|
|
wrt160nl)
|
|
|
|
fixtrx
|
|
|
|
;;
|
2016-07-18 17:39:57 +00:00
|
|
|
dap-2695-a1)
|
|
|
|
fixwrgg
|
|
|
|
;;
|
2013-11-07 22:31:53 +00:00
|
|
|
esac
|