lantiq 788 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2012 OpenWrt.org
  4. #
  5. [ -e /etc/config/ubootenv ] && exit 0
  6. touch /etc/config/ubootenv
  7. . /lib/uboot-envtools.sh
  8. . /lib/functions.sh
  9. board=$(board_name)
  10. case "$board" in
  11. bt,homehub-v2b)
  12. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
  13. ;;
  14. bt,homehub-v3a)
  15. ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
  16. ;;
  17. siemens,gigaset-sx76x)
  18. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
  19. ;;
  20. zyxel,p-2812hnu-f1)
  21. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
  22. ;;
  23. buffalo,wbmr-300hpd)
  24. idx="$(find_mtd_index u-boot-env)"
  25. [ -n "$idx" ] && \
  26. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
  27. ;;
  28. esac
  29. config_load ubootenv
  30. config_foreach ubootenv_add_app_config ubootenv
  31. exit 0