ath79: split base-files into subtargets
[openwrt/openwrt.git] / target / linux / ath79 / generic / base-files / etc / uci-defaults / 09_fix-checksum
1 #!/bin/sh
2 . /lib/functions.sh
3
4 fix_seama_header() {
5 local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
6 [ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
7 }
8
9 board=$(board_name)
10
11 case "$board" in
12 qihoo,c301)
13 fix_seama_header
14 ;;
15 esac