[OpenWrt-Devel] [PATCH] ath79: Add GL.iNet AR-300M-Lite: Setup with eth0 as LAN

Jeff Klesky lede at allycomm.com
Thu Jan 17 00:48:11 EST 2019


 From f6c780752d5812b24a923286700a58f174d792ae Mon Sep 17 00:00:00 2001
From: Jeff Kletsky <git-commits at allycomm.com>
Date: Wed, 16 Jan 2019 12:32:15 -0800
Subject: [PATCH] ath79: Add GL.iNet AR-300M-Lite: Setup with eth0 as LAN

AR300M-Lite is single-Ethernet variant of the AR300M series
Its eth0 would otherwise be assigned to the WAN interface
making it unreachable firstboot or failsafe.

Removes the assignment of GPIO 2 as an "LED" as the feature
to switch the power to the USB port is not present this version

Installation instructions from OEM (OpenWrt variant):
* Upload the sysupgrade image to the device
* Flash with "sysupgrade -n -F <path to uploaded image>"

Tested on GL.iNet AR300M-Lite

Signed-off-by: Jeff Kletsky <git-commits at allycomm.com>
---
  target/linux/ath79/base-files/etc/board.d/02_network     |  1 +
  target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts | 11 +++++++++++
  target/linux/ath79/image/generic.mk                      |  9 +++++++++
  3 files changed, 21 insertions(+)
  create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
index 3eb0e413f3..fa947203f8 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
  	devolo,dvl1200i|\
  	devolo,dvl1750c|\
  	devolo,dvl1750i|\
+	glinet,ar300m-lite|\
  	ocedo,koala|\
  	ocedo,raccoon|\
  	pcs,cap324|\
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
new file mode 100644
index 0000000000..c38fcf735d
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
@@ -0,0 +1,11 @@
+/dts-v1/;
+
+#include "qca9531_glinet_gl-ar300m-nor.dts"
+
+/ {
+	compatible = "glinet,gl-ar300m-lite", "qca,qca9531";
+	model = "GL.iNet GL-AR300M-Lite";
+};
+
+/delete-node/ &{/leds/usb};
+
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 22ba5305b1..38cdd5d109 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -296,6 +296,15 @@ define Device/glinet_gl-ar150
  endef
  TARGET_DEVICES += glinet_gl-ar150
  
+define Device/glinet_gl-ar300m-lite
+  ATH_SOC := qca9531
+  DEVICE_TITLE := GL.iNet GL-AR300M-Lite
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
+  IMAGE_SIZE := 16000k
+  SUPPORTED_DEVICES += gl-ar300m-lite
+endef
+TARGET_DEVICES += glinet_gl-ar300m-lite
+
  define Device/glinet_gl-ar300m-nor
    ATH_SOC := qca9531
    DEVICE_TITLE := GL.iNet GL-AR300M
-- 
2.11.0



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



More information about the openwrt-devel mailing list