2
0

qualcommax_ipq807x 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. linksys,mx4200v1|\
  29. linksys,mx4200v2|\
  30. linksys,mx5300|\
  31. linksys,mx8500)
  32. idx="$(find_mtd_index u_env)"
  33. [ -n "$idx" ] && \
  34. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
  35. ;;
  36. netgear,sxr80|\
  37. netgear,sxs80)
  38. idx="$(find_mtd_index 0:appsblenv)"
  39. [ -n "$idx" ] && \
  40. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
  41. ;;
  42. redmi,ax6|\
  43. xiaomi,ax3600|\
  44. xiaomi,ax9000)
  45. idx="$(find_mtd_index 0:appsblenv)"
  46. [ -n "$idx" ] && \
  47. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
  48. idx2="$(find_mtd_index bdata)"
  49. [ -n "$idx2" ] && \
  50. ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
  51. ;;
  52. prpl,haze)
  53. mmcpart="$(find_mmc_part 0:APPSBLENV)"
  54. [ -n "$mmcpart" ] && \
  55. ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
  56. ;;
  57. qnap,301w)
  58. idx="$(find_mtd_index 0:appsblenv)"
  59. [ -n "$idx" ] && \
  60. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
  61. ;;
  62. spectrum,sax1v1k)
  63. mmcpart="$(find_mmc_part 0:APPSBLENV)"
  64. [ -n "$mmcpart" ] && \
  65. ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x40000" "1"
  66. ;;
  67. esac
  68. config_load ubootenv
  69. config_foreach ubootenv_add_app_config
  70. exit 0