08-cmcc_rax3000m.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
  2. +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
  3. @@ -12,7 +12,8 @@ mediatek_setup_interfaces()
  4. ucidef_set_interface_lan "eth0" "dhcp"
  5. ;;
  6. abt,asr3000|\
  7. - cmcc,rax3000m|\
  8. + cmcc,rax3000m*|\
  9. + cmcc,xr30*|\
  10. h3c,magic-nx30-pro|\
  11. nokia,ea0326gmp|\
  12. zbtlink,zbt-z8103ax)
  13. @@ -137,6 +137,12 @@ mediatek_setup_macs()
  14. bananapi,bpi-r4)
  15. wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
  16. ;;
  17. + cmcc,rax3000m-emmc|\
  18. + cmcc,xr30-emmc)
  19. + wan_mac=$(mmc_get_mac_binary factory 0x2a)
  20. + lan_mac=$(mmc_get_mac_binary factory 0x24)
  21. + label_mac=$wan_mac
  22. + ;;
  23. h3c,magic-nx30-pro)
  24. wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
  25. lan_mac=$(macaddr_add "$wan_mac" 1)
  26. --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
  27. +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
  28. @@ -24,6 +24,8 @@ case "$FIRMWARE" in
  29. ;;
  30. "mediatek/mt7981_eeprom_mt7976_dbdc.bin")
  31. case "$board" in
  32. + cmcc,rax3000m-emmc|\
  33. + cmcc,xr30-emmc|\
  34. ubnt,unifi-6-plus)
  35. caldata_extract_mmc "factory" 0x0 0x1000
  36. ;;
  37. --- a/target/linux/mediatek/image/filogic.mk
  38. +++ b/target/linux/mediatek/image/filogic.mk
  39. @@ -280,7 +280,64 @@ define Device/cmcc_rax3000m
  40. ARTIFACT/nand-preloader.bin := mt7981-bl2 spim-nand-ddr4
  41. ARTIFACT/nand-bl31-uboot.fip := mt7981-bl31-uboot cmcc_rax3000m-nand
  42. endef
  43. -TARGET_DEVICES += cmcc_rax3000m
  44. +
  45. +define Device/cmcc_rax3000m-nand
  46. + DEVICE_VENDOR := CMCC
  47. + DEVICE_MODEL := RAX3000M NAND
  48. + DEVICE_DTS := mt7981b-cmcc-rax3000m-nand
  49. + DEVICE_DTS_DIR := ../dts
  50. + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
  51. + e2fsprogs f2fsck mkf2fs
  52. + UBINIZE_OPTS := -E 5
  53. + BLOCKSIZE := 128k
  54. + PAGESIZE := 2048
  55. + IMAGE_SIZE := 116736k
  56. + KERNEL_IN_UBI := 1
  57. + IMAGES += factory.bin
  58. + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
  59. + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  60. +endef
  61. +TARGET_DEVICES += cmcc_rax3000m-nand
  62. +
  63. +define Device/cmcc_rax3000m-emmc
  64. + DEVICE_VENDOR := CMCC
  65. + DEVICE_MODEL := RAX3000M eMMC
  66. + DEVICE_DTS := mt7981b-cmcc-rax3000m-emmc
  67. + DEVICE_DTS_DIR := ../dts
  68. + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
  69. + e2fsprogs f2fsck mkf2fs losetup kmod-fs-f2fs kmod-mmc
  70. + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  71. +endef
  72. +TARGET_DEVICES += cmcc_rax3000m-emmc
  73. +
  74. +define Device/cmcc_xr30
  75. + DEVICE_VENDOR := CMCC
  76. + DEVICE_MODEL := XR30 NAND
  77. + DEVICE_DTS := mt7981b-cmcc-xr30
  78. + DEVICE_DTS_DIR := ../dts
  79. + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
  80. + e2fsprogs f2fsck mkf2fs
  81. + UBINIZE_OPTS := -E 5
  82. + BLOCKSIZE := 128k
  83. + PAGESIZE := 2048
  84. + IMAGE_SIZE := 116736k
  85. + KERNEL_IN_UBI := 1
  86. + IMAGES += factory.bin
  87. + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
  88. + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  89. +endef
  90. +TARGET_DEVICES += cmcc_xr30
  91. +
  92. +define Device/cmcc_xr30-emmc
  93. + DEVICE_VENDOR := CMCC
  94. + DEVICE_MODEL := XR30 eMMC (RAX3000Z增强版)
  95. + DEVICE_DTS := mt7981b-cmcc-xr30-emmc
  96. + DEVICE_DTS_DIR := ../dts
  97. + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
  98. + e2fsprogs f2fsck mkf2fs losetup kmod-fs-f2fs kmod-mmc
  99. + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  100. +endef
  101. +TARGET_DEVICES += cmcc_xr30-emmc
  102. define Device/confiabits_mt7981
  103. DEVICE_VENDOR := Confiabits
  104. --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
  105. +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
  106. @@ -114,6 +114,8 @@ platform_do_upgrade() {
  107. yuncore,ax835)
  108. default_do_upgrade "$1"
  109. ;;
  110. + cmcc,rax3000m-emmc|\
  111. + cmcc,xr30-emmc|\
  112. glinet,gl-mt2500|\
  113. glinet,gl-mt6000|\
  114. glinet,gl-x3000|\
  115. @@ -204,6 +206,8 @@ platform_copy_config() {
  116. ;;
  117. acer,predator-w6|\
  118. arcadyan,mozart|\
  119. + cmcc,rax3000m-emmc|\
  120. + cmcc,xr30-emmc|\
  121. glinet,gl-mt2500|\
  122. glinet,gl-mt6000|\
  123. glinet,gl-x3000|\