2012-10-18 07:23:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2012 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
. /lib/functions.sh
|
2012-10-18 07:23:03 +00:00
|
|
|
|
2017-10-28 12:24:21 +00:00
|
|
|
fix_checksum() {
|
2016-06-30 13:50:11 +00:00
|
|
|
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
2012-10-18 07:23:03 +00:00
|
|
|
|
2017-10-28 12:24:21 +00:00
|
|
|
[ "$kernel_size" ] && mtd -c 0x$kernel_size fix$1 firmware
|
2012-10-18 07:23:03 +00:00
|
|
|
}
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2012-10-18 07:23:03 +00:00
|
|
|
|
|
|
|
case "$board" in
|
2014-06-02 12:42:52 +00:00
|
|
|
cy-swr1100 | \
|
2016-05-02 03:57:40 +00:00
|
|
|
dch-m225 | \
|
2015-01-17 21:20:05 +00:00
|
|
|
dir-645 | \
|
|
|
|
dir-860l-b1)
|
2017-10-28 12:24:21 +00:00
|
|
|
fix_checksum seama
|
|
|
|
;;
|
2018-02-17 08:18:09 +00:00
|
|
|
dlink,dap-1522-a1)
|
2017-10-28 12:24:21 +00:00
|
|
|
fix_checksum wrg
|
2012-10-18 07:23:03 +00:00
|
|
|
;;
|
|
|
|
esac
|