[OpenWrt-Devel] [PATCH 1/2] ramips: Use generic board detect for GnuBee devices

Rosen Penev rosenp at gmail.com
Thu May 24 23:43:45 EDT 2018


This is a port of an old commit from mkresin's tree:

09260cdf3e9332978c2a474a58e93a6f2b55f4a8

This has the potential to break sysupgrade but it should be fine as
there is no stable release of LEDE or OpenWrt that support these devices.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 target/linux/ramips/base-files/etc/board.d/01_leds     | 4 ++--
 target/linux/ramips/base-files/etc/board.d/02_network  | 4 ++--
 target/linux/ramips/base-files/etc/diag.sh             | 4 ++--
 target/linux/ramips/base-files/lib/ramips.sh           | 3 ---
 target/linux/ramips/base-files/lib/upgrade/platform.sh | 4 ++--
 target/linux/ramips/dts/GB-PC1.dts                     | 2 +-
 target/linux/ramips/dts/GB-PC2.dts                     | 2 +-
 target/linux/ramips/image/mt7621.mk                    | 8 ++++----
 8 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 88e4c2b7fe..79f2cc2b87 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -196,8 +196,8 @@ fonera20n)
 	set_usb_led "$boardname:orange:usb"
 	set_wifi_led "$boardname:orange:wifi"
 	;;
-gb-pc1|\
-gnubee,gb-pc2)
+gnubee,pc1|\
+gnubee,pc2)
 	ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x01"
 	ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x10"
 	;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 3fc5e55df1..c50b5efc96 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -228,8 +228,8 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6 at eth0"
 		;;
-	gb-pc1|\
-	gnubee,gb-pc2)
+	gnubee,pc1|\
+	gnubee,pc2)
 		ucidef_add_switch "switch0" \
 			"0:lan" "4:lan" "6 at eth0"
 		;;
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 6a51778726..e8fb895529 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -95,8 +95,8 @@ get_status_led() {
 	dir-620-d1|\
 	dwr-512-b|\
 	dlink,dwr-116-a1|\
-	gb-pc1|\
-	gnubee,gb-pc2|\
+	gnubee,pc1|\
+	gnubee,pc2|\
 	hpm|\
 	hw550-3g|\
 	mac1200rv2|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index edccfcd4a8..5741cbd2ee 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -205,9 +205,6 @@ ramips_board_detect() {
 	*"FreeStation5")
 		name="freestation5"
 		;;
-	*"GB-PC1")
-		name="gb-pc1"
-		;;
 	*"GL-MT300A")
 		name="gl-mt300a"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 7aa14770ca..35c6093ca5 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -62,8 +62,8 @@ platform_check_image() {
 	firewrt|\
 	fonera20n|\
 	freestation5|\
-	gb-pc1|\
-	gnubee,gb-pc2|\
+	gnubee,pc1|\
+	gnubee,pc2|\
 	gl-mt300a|\
 	gl-mt300n|\
 	gl-mt750|\
diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts
index 2ea6582e01..77c9fb4ef0 100644
--- a/target/linux/ramips/dts/GB-PC1.dts
+++ b/target/linux/ramips/dts/GB-PC1.dts
@@ -6,7 +6,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc";
+	compatible = "gnubee,pc1", "mediatek,mt7621-soc";
 	model = "GB-PC1";
 
 	memory at 0 {
diff --git a/target/linux/ramips/dts/GB-PC2.dts b/target/linux/ramips/dts/GB-PC2.dts
index ccaf54f3c8..b4648d81ca 100644
--- a/target/linux/ramips/dts/GB-PC2.dts
+++ b/target/linux/ramips/dts/GB-PC2.dts
@@ -6,7 +6,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
+	compatible = "gnubee,pc2", "mediatek,mt7621-soc";
 	model = "GB-PC2";
 
 	memory at 0 {
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index b84b74a5b0..9e1923cd4b 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -83,21 +83,21 @@ define Device/firewrt
 endef
 TARGET_DEVICES += firewrt
 
-define Device/gb-pc1
+define Device/gnubee_pc1
   DTS := GB-PC1
   DEVICE_TITLE := GnuBee Personal Cloud One
   DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
   IMAGE_SIZE := $(ralink_default_fw_size_32M)
 endef
-TARGET_DEVICES += gb-pc1
+TARGET_DEVICES += gnubee_pc1
 
-define Device/gnubee_gb-pc2
+define Device/gnubee_pc2
   DTS := GB-PC2
   DEVICE_TITLE := GnuBee Personal Cloud Two
   DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
   IMAGE_SIZE := $(ralink_default_fw_size_32M)
 endef
-TARGET_DEVICES += gnubee_gb-pc2
+TARGET_DEVICES += gnubee_pc2
 
 define Device/hc5962
   DTS := HC5962
-- 
2.17.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list