09_fix-seama-header 351 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2012 OpenWrt.org
  4. #
  5. . /lib/ramips.sh
  6. fix_seama_header() {
  7. local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
  8. [ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
  9. }
  10. board=$(ramips_board_name)
  11. case "$board" in
  12. cy-swr1100 | \
  13. dir-645 | \
  14. dir-860l-b1)
  15. fix_seama_header
  16. ;;
  17. esac