qualcommax_ipq807x 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. idx="$(find_mtd_index 0:appsblenv)"
  11. [ -n "$idx" ] && \
  12. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
  13. ;;
  14. compex,wpq873|\
  15. edgecore,eap102|\
  16. zyxel,nbg7815)
  17. idx="$(find_mtd_index 0:appsblenv)"
  18. [ -n "$idx" ] && \
  19. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
  20. ;;
  21. edimax,cax1800)
  22. idx="$(find_mtd_index 0:appsblenv)"
  23. [ -n "$idx" ] && \
  24. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
  25. ;;
  26. redmi,ax6|\
  27. xiaomi,ax3600|\
  28. xiaomi,ax9000)
  29. idx="$(find_mtd_index 0:appsblenv)"
  30. [ -n "$idx" ] && \
  31. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
  32. idx2="$(find_mtd_index bdata)"
  33. [ -n "$idx2" ] && \
  34. ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
  35. ;;
  36. prpl,haze)
  37. mmcpart="$(find_mmc_part 0:APPSBLENV)"
  38. [ -n "$mmcpart" ] && \
  39. ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
  40. ;;
  41. qnap,301w)
  42. idx="$(find_mtd_index 0:appsblenv)"
  43. [ -n "$idx" ] && \
  44. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
  45. ;;
  46. esac
  47. config_load ubootenv
  48. config_foreach ubootenv_add_app_config
  49. exit 0