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
|
2019-07-03 21:22:34 +00:00
|
|
|
samsung,cy-swr1100|\
|
2019-07-03 21:22:02 +00:00
|
|
|
dlink,dch-m225|\
|
2019-07-03 21:22:34 +00:00
|
|
|
dlink,dir-645|\
|
2019-07-03 21:22:08 +00:00
|
|
|
dlink,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
|