diy.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --- a/target/linux/qualcommax/image/ipq50xx.mk
  2. +++ b/target/linux/qualcommax/image/ipq50xx.mk
  3. @@ -30,3 +30,28 @@ define Device/linksys_mx5500
  4. ipq-wifi-linksys_mx5500
  5. endef
  6. TARGET_DEVICES += linksys_mx5500
  7. +
  8. +define Device/glinet_gl-b3000
  9. + $(call Device/FitImage)
  10. + $(call Device/UbiFit)
  11. + SOC := ipq5018
  12. + DEVICE_VENDOR := GL.iNET
  13. + DEVICE_MODEL := GL-B3000
  14. + BLOCKSIZE := 128k
  15. + PAGESIZE := 2048
  16. + DEVICE_DTS_CONFIG := [email protected]
  17. + DEVICE_PACKAGES := ath11k-firmware-qcn6122 ipq-wifi-gl-b3000
  18. +endef
  19. +TARGET_DEVICES += glinet_gl-b3000
  20. +
  21. +define Device/jdcloud_re-cs-03
  22. + $(call Device/FitImage)
  23. + $(call Device/EmmcImage)
  24. + SOC := ipq5018
  25. + BLOCKSIZE := 64k
  26. + KERNEL_SIZE := 6144k
  27. + DEVICE_VENDOR := JDCloud
  28. + DEVICE_MODEL := AX3000
  29. + DEVICE_DTS_CONFIG := [email protected]
  30. +endef
  31. +TARGET_DEVICES += jdcloud_re-cs-03
  32. --- a/target/linux/qualcommax/ipq50xx/base-files/etc/board.d/02_network
  33. ++ b/target/linux/qualcommax/ipq50xx/base-files/etc/board.d/02_network
  34. @@ -7,6 +7,10 @@ ipq50xx_setup_interfaces()
  35. {
  36. local board="$1"
  37. case $board in
  38. + glinet,gl-b3000)
  39. + ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
  40. + ;;
  41. + jdcloud,re-cs-03|\
  42. linksys,mx2000|\
  43. linksys,mx5500)
  44. ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
  45. --- a/target/linux/qualcommax/ipq50xx/base-files/lib/upgrade/platform.sh
  46. ++ b/target/linux/qualcommax/ipq50xx/base-files/lib/upgrade/platform.sh
  47. @@ -10,6 +10,14 @@ platform_check_image() {
  48. platform_do_upgrade() {
  49. case "$(board_name)" in
  50. + glinet,gl-b3000)
  51. + nand_do_upgrade "$1"
  52. + ;;
  53. + jdcloud,re-cs-03)
  54. + CI_KERNPART="0:HLOS"
  55. + CI_ROOTPART="rootfs"
  56. + emmc_do_upgrade "$1"
  57. + ;;
  58. linksys,mx2000|\
  59. linksys,mx5500)
  60. platform_do_upgrade_linksys "$1"
  61. @@ -19,3 +27,12 @@ platform_do_upgrade() {
  62. ;;
  63. esac
  64. }
  65. +
  66. +platform_copy_config() {
  67. + case "$(board_name)" in
  68. + jdcloud,re-cs-03)
  69. + emmc_copy_config
  70. + ;;
  71. + esac
  72. + return 0;
  73. +}
  74. --- a/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
  75. ++ b/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
  76. @@ -9,6 +9,15 @@ board=$(board_name)
  77. case "$FIRMWARE" in
  78. "ath11k/IPQ5018/hw1.0/cal-ahb-c000000.wifi.bin")
  79. case "$board" in
  80. + glinet,gl-b3000)
  81. + caldata_extract "0:ART" 0x1000 0x20000
  82. + addr=$(mtd_get_mac_binary "0:ART" 0x6)
  83. + ath11k_patch_mac $(macaddr_add $addr 3) 0
  84. + ath11k_set_macflag
  85. + ;;
  86. + jdcloud,re-cs-03)
  87. + caldata_extract_mmc "0:ART" 0x1000 0x20000
  88. + ;;
  89. linksys,mx2000|\
  90. linksys,mx5500)
  91. caldata_extract "0:ART" 0x1000 0x20000
  92. @@ -21,6 +30,15 @@ case "$FIRMWARE" in
  93. ;;
  94. "ath11k/QCN6122/hw1.0/cal-ahb-b00a040.wifi1.bin")
  95. case "$board" in
  96. + glinet,gl-b3000)
  97. + caldata_extract "0:ART" 0x26800 0x20000
  98. + addr=$(mtd_get_mac_binary "0:ART" 0x6)
  99. + ath11k_patch_mac $(macaddr_add $addr 4) 0
  100. + ath11k_set_macflag
  101. + ;;
  102. + jdcloud,re-cs-03)
  103. + caldata_extract_mmc "0:ART" 0x26800 0x20000
  104. + ;;
  105. linksys,mx2000)
  106. caldata_extract "0:ART" 0x26800 0x20000
  107. label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)