qualcommax_ipq807x 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [ -e /etc/config/ubootenv ] && exit 0
  2. touch /etc/config/ubootenv
  3. . /lib/uboot-envtools.sh
  4. . /lib/functions.sh
  5. board=$(board_name)
  6. case "$board" in
  7. dynalink,dl-wrx36|\
  8. netgear,rax120v2|\
  9. netgear,wax218|\
  10. netgear,wax620|\
  11. netgear,wax630)
  12. idx="$(find_mtd_index 0:appsblenv)"
  13. [ -n "$idx" ] && \
  14. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
  15. ;;
  16. compex,wpq873|\
  17. edgecore,eap102|\
  18. zyxel,nbg7815)
  19. idx="$(find_mtd_index 0:appsblenv)"
  20. [ -n "$idx" ] && \
  21. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
  22. ;;
  23. edimax,cax1800)
  24. idx="$(find_mtd_index 0:appsblenv)"
  25. [ -n "$idx" ] && \
  26. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
  27. ;;
  28. redmi,ax6|\
  29. xiaomi,ax3600|\
  30. xiaomi,ax9000)
  31. idx="$(find_mtd_index 0:appsblenv)"
  32. [ -n "$idx" ] && \
  33. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
  34. idx2="$(find_mtd_index bdata)"
  35. [ -n "$idx2" ] && \
  36. ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
  37. ;;
  38. prpl,haze)
  39. mmcpart="$(find_mmc_part 0:APPSBLENV)"
  40. [ -n "$mmcpart" ] && \
  41. ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
  42. ;;
  43. qnap,301w)
  44. idx="$(find_mtd_index 0:appsblenv)"
  45. [ -n "$idx" ] && \
  46. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
  47. ;;
  48. esac
  49. config_load ubootenv
  50. config_foreach ubootenv_add_app_config
  51. exit 0