ramips: use generic board detection for D-Link DAP-1522 A1
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / uci-defaults / 09_fix-checksum
1 #!/bin/sh
2 #
3 # Copyright (C) 2012 OpenWrt.org
4 #
5
6 . /lib/functions.sh
7
8 fix_checksum() {
9 local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
10
11 [ "$kernel_size" ] && mtd -c 0x$kernel_size fix$1 firmware
12 }
13
14 board=$(board_name)
15
16 case "$board" in
17 cy-swr1100 | \
18 dch-m225 | \
19 dir-645 | \
20 dir-860l-b1)
21 fix_checksum seama
22 ;;
23 dlink,dap-1522-a1)
24 fix_checksum wrg
25 ;;
26 esac