Last active
March 12, 2021 20:16
-
-
Save shangjiyu/c25b847c5f0e62c428b3 to your computer and use it in GitHub Desktop.
add_xCloud-RY-1A_support on openwrt trunk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: target/linux/ramips/base-files/etc/board.d/01_leds | |
=================================================================== | |
--- target/linux/ramips/base-files/etc/board.d/01_leds (revision 45021) | |
+++ target/linux/ramips/base-files/etc/board.d/01_leds (working copy) | |
@@ -202,6 +202,12 @@ | |
set_wifi_led "asus:blue:air" | |
set_usb_led "asus:blue:usb" | |
;; | |
+ ry-1a) | |
+ ucidef_set_led_default "power" "power" "dteam:red:power" "0" | |
+ ucidef_set_led_netdev "wan" "wan" "dteam:red:wan" eth0.2 | |
+ set_wifi_led "dteam:red:wifi" | |
+ set_usb_led "dteam:red:usb" | |
+ ;; | |
rp-n53) | |
ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0" | |
set_wifi_led "asus:blue:wifi" | |
Index: target/linux/ramips/base-files/etc/board.d/02_network | |
=================================================================== | |
--- target/linux/ramips/base-files/etc/board.d/02_network (revision 45021) | |
+++ target/linux/ramips/base-files/etc/board.d/02_network (working copy) | |
@@ -154,6 +154,7 @@ | |
f5d8235-v2 | \ | |
hg255d | \ | |
rt-n14u | \ | |
+ ry-1a | \ | |
wrtnode | \ | |
wt3020 | \ | |
ur-326n4g | \ | |
Index: target/linux/ramips/base-files/etc/diag.sh | |
=================================================================== | |
--- target/linux/ramips/base-files/etc/diag.sh (revision 45021) | |
+++ target/linux/ramips/base-files/etc/diag.sh (working copy) | |
@@ -214,6 +214,9 @@ | |
xiaomi-mini) | |
status_led="xiaomi:red:status" | |
;; | |
+ ry-1a) | |
+ status_led="dteam:red:power" | |
+ ;; | |
f7c027) | |
status_led="belkin:orange:status" | |
;; | |
Index: target/linux/ramips/base-files/lib/ramips.sh | |
=================================================================== | |
--- target/linux/ramips/base-files/lib/ramips.sh (revision 45021) | |
+++ target/linux/ramips/base-files/lib/ramips.sh (working copy) | |
@@ -172,6 +172,9 @@ | |
*"Asus RT-N14U") | |
name="rt-n14u" | |
;; | |
+ *"DTeam RY-1A") | |
+ name="ry-1a" | |
+ ;; | |
*"Asus RT-N13U") | |
name="rt-n13u" | |
;; | |
Index: target/linux/ramips/base-files/lib/upgrade/platform.sh | |
=================================================================== | |
--- target/linux/ramips/base-files/lib/upgrade/platform.sh (revision 45021) | |
+++ target/linux/ramips/base-files/lib/upgrade/platform.sh (working copy) | |
@@ -78,6 +78,7 @@ | |
rt-n10-plus | \ | |
rt-n13u | \ | |
rt-n14u | \ | |
+ ry-1a | \ | |
rt-n15 | \ | |
rt-n56u | \ | |
rut5xx | \ | |
Index: target/linux/ramips/dts/DTeam-RY-1A.dts | |
=================================================================== | |
--- target/linux/ramips/dts/DTeam-RY-1A.dts (revision 0) | |
+++ target/linux/ramips/dts/DTeam-RY-1A.dts (working copy) | |
@@ -0,0 +1,143 @@ | |
+/dts-v1/; | |
+ | |
+/include/ "mt7620n.dtsi" | |
+ | |
+/ { | |
+ compatible = "dteam,ry-1a", "ralink,mt7620n-soc"; | |
+ model = "DTeam RY-1A"; | |
+ | |
+ palmbus@10000000 { | |
+ gpio0: gpio@600 { | |
+ status = "okay"; | |
+ }; | |
+ | |
+ gpio1: gpio@638 { | |
+ status = "okay"; | |
+ }; | |
+ | |
+ gpio2: gpio@660 { | |
+ status = "okay"; | |
+ }; | |
+ | |
+ gpio3: gpio@688 { | |
+ status = "okay"; | |
+ }; | |
+ | |
+ spi@b00 { | |
+ status = "okay"; | |
+ | |
+ m25p80@0 { | |
+ #address-cells = <1>; | |
+ #size-cells = <1>; | |
+ #compatible = "mx25l6405d"; | |
+ compatible = "w25q128"; | |
+ reg = <0 0>; | |
+ linux,modalias = "m25p80", "w25q128"; | |
+ spi-max-frequency = <10000000>; | |
+ | |
+ partition@0 { | |
+ label = "u-boot"; | |
+ reg = <0x0 0x30000>; | |
+ read-only; | |
+ }; | |
+ | |
+ partition@30000 { | |
+ label = "u-boot-env"; | |
+ reg = <0x30000 0x10000>; | |
+ read-only; | |
+ }; | |
+ | |
+ factory: partition@40000 { | |
+ label = "factory"; | |
+ reg = <0x40000 0x10000>; | |
+ read-only; | |
+ }; | |
+ | |
+ partition@50000 { | |
+ label = "firmware"; | |
+ reg = <0x50000 0xfb0000>; | |
+ }; | |
+ }; | |
+ }; | |
+ }; | |
+ | |
+ ehci@101c0000 { | |
+ status = "okay"; | |
+ }; | |
+ | |
+ ohci@101c1000 { | |
+ status = "okay"; | |
+ }; | |
+ | |
+ ethernet@10100000 { | |
+ mtd-mac-address = <&factory 0x4>; | |
+ ralink,port-map = "wllll"; | |
+ }; | |
+ | |
+ wmac@10180000 { | |
+ ralink,mtd-eeprom = <&factory 0>; | |
+ }; | |
+ | |
+ pinctrl { | |
+ state_default: pinctrl0 { | |
+ default { | |
+ ralink,group = "ephy", "wled", "i2c", "spi refclk"; | |
+ ralink,function = "gpio"; | |
+ }; | |
+ }; | |
+ }; | |
+ | |
+ gpio-leds { | |
+ compatible = "gpio-leds"; | |
+ wan { | |
+ label = "dteam:red:wan"; | |
+ gpios = <&gpio2 0 1>; | |
+ }; | |
+ lan4 { | |
+ label = "dteam:red:lan4"; | |
+ gpios = <&gpio2 1 1>; | |
+ }; | |
+ lan3 { | |
+ label = "dteam:red:lan3"; | |
+ gpios = <&gpio2 2 1>; | |
+ }; | |
+ lan2 { | |
+ label = "dteam:red:lan2"; | |
+ gpios = <&gpio2 3 1>; | |
+ }; | |
+ lan1 { | |
+ label = "dteam:red:lan1"; | |
+ gpios = <&gpio2 4 1>; | |
+ }; | |
+ wifi { | |
+ label = "dteam:red:wifi"; | |
+ gpios = <&gpio3 0 1>; | |
+ }; | |
+ usb { | |
+ label = "dteam:red:usb"; | |
+ gpios = <&gpio1 15 1>; | |
+ }; | |
+ power { | |
+ label = "dteam:red:power"; | |
+ gpios = <&gpio1 14 1>; | |
+ }; | |
+ | |
+ }; | |
+ | |
+ gpio-keys-polled { | |
+ compatible = "gpio-keys-polled"; | |
+ #address-cells = <1>; | |
+ #size-cells = <0>; | |
+ poll-interval = <20>; | |
+ reset { | |
+ label = "reset"; | |
+ gpios = <&gpio0 1 1>; | |
+ linux,code = <0x198>; | |
+ }; | |
+ wps { | |
+ label = "wps"; | |
+ gpios = <&gpio0 2 1>; | |
+ linux,code = <0x211>; | |
+ }; | |
+ }; | |
+}; | |
Index: target/linux/ramips/image/Makefile | |
=================================================================== | |
--- target/linux/ramips/image/Makefile (revision 45021) | |
+++ target/linux/ramips/image/Makefile (working copy) | |
@@ -858,6 +858,7 @@ | |
Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2) | |
Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300) | |
Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U) | |
+Image/Build/Profile/DTeam-RY-1A=$(call BuildFirmware/Default16M/$(1),$(1),ry-1a,DTeam-RY-1A) | |
Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT) | |
Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE) | |
Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020) | |
@@ -887,12 +888,12 @@ | |
$(call Image/Build/Profile/MLWG2,$(1)) | |
$(call Image/Build/Profile/WMR300,$(1)) | |
$(call Image/Build/Profile/RT-N14U,$(1)) | |
+ $(call Image/Build/Profile/DTeam-RY-1A,$(1)) | |
$(call Image/Build/Profile/WR8305RT,$(1)) | |
$(call Image/Build/Profile/WRTNODE,$(1)) | |
$(call Image/Build/Profile/WT3020,$(1)) | |
$(call Image/Build/Profile/XIAOMI-MIWIFI-MINI,$(1)) | |
$(call Image/Build/Profile/ZBT-WA05,$(1)) | |
- $(call Image/Build/Profile/ArcherC20i,$(1)) | |
endef | |
endif | |
Index: target/linux/ramips/mt7620/profiles/dteam-ry-1a.mk | |
=================================================================== | |
--- target/linux/ramips/mt7620/profiles/dteam-ry-1a.mk (revision 0) | |
+++ target/linux/ramips/mt7620/profiles/dteam-ry-1a.mk (working copy) | |
@@ -0,0 +1,18 @@ | |
+# | |
+# Copyright (C) 2011 OpenWrt.org | |
+# | |
+# This is free software, licensed under the GNU General Public License v2. | |
+# See /LICENSE for more information. | |
+# | |
+ | |
+define Profile/DTeam-RY-1A | |
+ NAME:=DTeam RY-1A | |
+ PACKAGES:=\ | |
+ kmod-usb-core kmod-usb2 kmod-usb-ohci \ | |
+ kmod-ledtrig-usbdev | |
+endef | |
+ | |
+define Profile/Default/Description | |
+ Support for DTeam RY-1A | |
+endef | |
+$(eval $(call Profile,DTeam-RY-1A)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wonderful, but I can't find the
board.d
folder intarget/linux/ramips/base-files/etc
onlyuci-default
found.I'm using the latest code from official website and the v14.07 git repo: git://git.openwrt.org/14.07/openwrt.git