0028-ar71xx-add-support-for-dlink-dir-615-e1.patch 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. From: Zhao, Gang <gamerh2o@gmail.com>
  2. Date: Wed, 21 May 2014 23:26:28 +0800
  3. Subject: ar71xx: add support for dlink dir-615-e1
  4. Dlink dir-615-e1 can use dir-600-a1's image, but the image can't be
  5. uploaded through dlink's normal firmware update web page.
  6. Add profile for dir-615-e1 so the generated image can be uploaded
  7. through the firmware update web page.
  8. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
  9. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  10. index 0d01119..c86044b 100755
  11. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  12. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  13. @@ -61,6 +61,7 @@ get_status_led() {
  14. status_led="db120:green:status"
  15. ;;
  16. dir-600-a1 |\
  17. + dir-615-e1 |\
  18. dir-615-e4)
  19. status_led="d-link:green:power"
  20. ;;
  21. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
  22. index f1ac9ec..98568fa 100755
  23. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
  24. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
  25. @@ -52,6 +52,7 @@ rb750)
  26. ;;
  27. dir-600-a1|\
  28. +dir-615-e1|\
  29. dir-615-e4)
  30. ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth1"
  31. ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02"
  32. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
  33. index e38a9b8..a2ac224 100755
  34. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
  35. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
  36. @@ -182,6 +182,7 @@ ap96 |\
  37. airrouter |\
  38. dir-600-a1 |\
  39. dir-615-c1 |\
  40. +dir-615-e1 |\
  41. dir-615-e4 |\
  42. ja76pf |\
  43. rb-750 |\
  44. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  45. index 11aa31b..9273012 100755
  46. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  47. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  48. @@ -201,6 +201,9 @@ ar71xx_board_detect() {
  49. *"DIR-600 rev. A1")
  50. name="dir-600-a1"
  51. ;;
  52. + *"DIR-615 rev. E1")
  53. + name="dir-615-e1"
  54. + ;;
  55. *"DIR-615 rev. E4")
  56. name="dir-615-e4"
  57. ;;
  58. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  59. index b25df6c..5fdd564 100755
  60. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  61. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  62. @@ -104,6 +104,7 @@ platform_check_image() {
  63. ap83 | \
  64. dir-600-a1 | \
  65. dir-615-c1 | \
  66. + dir-615-e1 | \
  67. dir-615-e4 | \
  68. ew-dorin | \
  69. ew-dorin-router | \
  70. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
  71. index c0fa900..321fdce 100644
  72. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
  73. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
  74. @@ -141,6 +141,14 @@ static void __init dir_600_a1_setup(void)
  75. MIPS_MACHINE(ATH79_MACH_DIR_600_A1, "DIR-600-A1", "D-Link DIR-600 rev. A1",
  76. dir_600_a1_setup);
  77. +static void __init dir_615_e1_setup(void)
  78. +{
  79. + dir_600_a1_setup();
  80. +}
  81. +
  82. +MIPS_MACHINE(ATH79_MACH_DIR_615_E1, "DIR-615-E1", "D-Link DIR-615 rev. E1",
  83. + dir_615_e1_setup);
  84. +
  85. static void __init dir_615_e4_setup(void)
  86. {
  87. dir_600_a1_setup();
  88. diff --git a/target/linux/ar71xx/generic/profiles/d-link.mk b/target/linux/ar71xx/generic/profiles/d-link.mk
  89. index 98fe00f..9a8ab1b 100644
  90. --- a/target/linux/ar71xx/generic/profiles/d-link.mk
  91. +++ b/target/linux/ar71xx/generic/profiles/d-link.mk
  92. @@ -38,6 +38,16 @@ endef
  93. $(eval $(call Profile,DIR615C1))
  94. +define Profile/DIR615E1
  95. + NAME:=D-Link DIR-615 rev. E1
  96. + PACKAGES:=
  97. +endef
  98. +
  99. +define Profile/DIR615E1/Description
  100. + Package set optimized for the D-Link DIR-615 rev. E1.
  101. +endef
  102. +
  103. +$(eval $(call Profile,DIR615E1))
  104. define Profile/DIR615E4
  105. NAME:=D-Link DIR-615 rev. E4
  106. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  107. index a055521..11ba068 100644
  108. --- a/target/linux/ar71xx/image/Makefile
  109. +++ b/target/linux/ar71xx/image/Makefile
  110. @@ -804,6 +804,7 @@ $(eval $(call SingleProfile,AthLzma,$(fs_64k),PB92,pb92,PB92,ttyS0,115200,$$(pb9
  111. $(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00"))
  112. $(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02"))
  113. +$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR615E1,dir-615-e1,DIR-615-E1,ttyS0,115200,"AP93-AR7240-RT-081028-00"))
  114. $(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,"AP99-AR7240-RT-091105-05"))
  115. $(eval $(call SingleProfile,Cameo7240,$(fs_64k),FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01"))
  116. diff --git a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  117. index 6d67f5f..c7d0220 100644
  118. --- a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  119. +++ b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  120. @@ -1,6 +1,6 @@
  121. --- a/arch/mips/ath79/machtypes.h
  122. +++ b/arch/mips/ath79/machtypes.h
  123. -@@ -16,18 +16,104 @@
  124. +@@ -16,18 +16,105 @@
  125. enum ath79_mach_type {
  126. ATH79_MACH_GENERIC = 0,
  127. @@ -21,6 +21,7 @@
  128. ATH79_MACH_PB44, /* Atheros PB44 reference board */
  129. + ATH79_MACH_DIR_600_A1, /* D-Link DIR-600 rev. A1 */
  130. + ATH79_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
  131. ++ ATH79_MACH_DIR_615_E1, /* D-Link DIR-615 rev. E1 */
  132. + ATH79_MACH_DIR_615_E4, /* D-Link DIR-615 rev. E4 */
  133. + ATH79_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
  134. + ATH79_MACH_EW_DORIN, /* embedded wireless Dorin Platform */
  135. @@ -306,7 +307,7 @@
  136. + select MYLOADER
  137. +
  138. +config ATH79_MACH_DIR_600_A1
  139. -+ bool "D-Link DIR-600 A1/DIR-615 E4 support"
  140. ++ bool "D-Link DIR-600 A1/DIR-615 E1/DIR-615 E4 support"
  141. + select SOC_AR724X
  142. + select ATH79_DEV_AP9X_PCI if PCI
  143. + select ATH79_DEV_ETH