cns3xxx 559 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2013 OpenWrt.org
  4. #
  5. [ -e /etc/config/ubootenv ] && exit 0
  6. touch /etc/config/ubootenv
  7. . /lib/cns3xxx.sh
  8. . /lib/uboot-envtools.sh
  9. . /lib/functions.sh
  10. board=$(cns3xxx_board_name)
  11. case "$board" in
  12. laguna)
  13. # Laguna uboot env size/erasesize vary depending on NOR vs SPI FLASH
  14. size=$(grep mtd1 /proc/mtd | awk '{print $2}')
  15. erasesize=$(grep mtd1 /proc/mtd | awk '{print $3}')
  16. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x$size" "0x$erasesize"
  17. ;;
  18. esac
  19. config_load ubootenv
  20. config_foreach ubootenv_add_app_config ubootenv
  21. exit 0