cr660x.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --- a/target/linux/ramips/image/mt7621.mk
  2. +++ b/target/linux/ramips/image/mt7621.mk
  3. @@ -1832,5 +1832,4 @@
  4. KERNEL_SIZE := 4096k
  5. UBINIZE_OPTS := -E 5
  6. - IMAGES += kernel1.bin rootfs0.bin
  7. IMAGE/kernel1.bin := append-kernel
  8. IMAGE/rootfs0.bin := append-ubi | check-size
  9. @@ -1916,28 +1915,12 @@
  10. UBINIZE_OPTS := -E 5
  11. IMAGE_SIZE := 128512k
  12. - IMAGES += firmware.bin
  13. + IMAGES += factory.bin
  14. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  15. - IMAGE/firmware.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
  16. + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
  17. check-size
  18. DEVICE_PACKAGES += kmod-mt7915e uboot-envtools
  19. -endef
  20. -
  21. -define Device/xiaomi_mi-router-cr6606
  22. - $(Device/xiaomi_mi-router-cr660x)
  23. - DEVICE_MODEL := Mi Router CR6606
  24. + DEVICE_MODEL := Mi Router CR6606 / CR6608 / CR6609
  25. endef
  26. -TARGET_DEVICES += xiaomi_mi-router-cr6606
  27. -
  28. -define Device/xiaomi_mi-router-cr6608
  29. - $(Device/xiaomi_mi-router-cr660x)
  30. - DEVICE_MODEL := Mi Router CR6608
  31. -endef
  32. -TARGET_DEVICES += xiaomi_mi-router-cr6608
  33. -
  34. -define Device/xiaomi_mi-router-cr6609
  35. - $(Device/xiaomi_mi-router-cr660x)
  36. - DEVICE_MODEL := Mi Router CR6609
  37. -endef
  38. -TARGET_DEVICES += xiaomi_mi-router-cr6609
  39. +TARGET_DEVICES += xiaomi_mi-router-cr660x
  40. define Device/xiaomi_redmi-router-ac2100
  41. --- /dev/null
  42. +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts
  43. @@ -0,0 +1,8 @@
  44. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  45. +
  46. +#include "mt7621_xiaomi_mi-router-cr660x.dtsi"
  47. +
  48. +/ {
  49. + compatible = "xiaomi,mi-router-cr660x", "mediatek,mt7621-soc";
  50. + model = "Xiaomi Mi Router CR6606 / CR6608 / CR6609";
  51. +};
  52. --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
  53. +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
  54. @@ -131,9 +131,7 @@ tplink,tl-wpa8631p-v3)
  55. xiaomi,mi-router-ac2100)
  56. ucidef_set_led_netdev "wan-blue" "WAN (blue)" "blue:wan" "wan"
  57. ;;
  58. -xiaomi,mi-router-cr6606|\
  59. -xiaomi,mi-router-cr6608|\
  60. -xiaomi,mi-router-cr6609)
  61. +xiaomi,mi-router-cr660x)
  62. ucidef_set_led_netdev "internet" "Internet" "blue:net" "wan"
  63. ;;
  64. xiaomi,redmi-router-ac2100)
  65. --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
  66. +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
  67. @@ -27,9 +27,7 @@ ramips_setup_interfaces()
  68. hiwifi,hc5962|\
  69. xiaomi,mi-router-3-pro|\
  70. xiaomi,mi-router-ac2100|\
  71. - xiaomi,mi-router-cr6606|\
  72. - xiaomi,mi-router-cr6608|\
  73. - xiaomi,mi-router-cr6609|\
  74. + xiaomi,mi-router-cr660x|\
  75. xiaomi,redmi-router-ac2100)
  76. ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
  77. --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
  78. +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
  79. @@ -88,9 +88,7 @@ platform_do_upgrade() {
  80. xiaomi,mi-router-3-pro|\
  81. xiaomi,mi-router-4|\
  82. xiaomi,mi-router-ac2100|\
  83. - xiaomi,mi-router-cr6606|\
  84. - xiaomi,mi-router-cr6608|\
  85. - xiaomi,mi-router-cr6609|\
  86. + xiaomi,mi-router-cr660x|\
  87. xiaomi,redmi-router-ac2100)
  88. nand_do_upgrade "$1"
  89. ;;
  90. --- a/package/boot/uboot-envtools/files/ramips
  91. +++ b/package/boot/uboot-envtools/files/ramips
  92. @@ -73,9 +73,7 @@ zyxel,nr7101)
  93. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
  94. ;;
  95. bolt,arion|\
  96. -xiaomi,mi-router-cr6606|\
  97. -xiaomi,mi-router-cr6608|\
  98. -xiaomi,mi-router-cr6609)
  99. +xiaomi,mi-router-cr660x)
  100. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
  101. ;;
  102. esac