cns3xxx 523 B

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