09_fix-checksum 382 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2010 OpenWrt.org
  4. #
  5. . /lib/ar71xx.sh
  6. board=$(ar71xx_board_name)
  7. fixtrx() {
  8. mtd -o 32 fixtrx firmware
  9. }
  10. fixwrgg() {
  11. local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
  12. [ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
  13. }
  14. case "$board" in
  15. mynet-rext |\
  16. wrt160nl)
  17. fixtrx
  18. ;;
  19. dap-2695-a1)
  20. fixwrgg
  21. ;;
  22. esac