diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 36e822c8efd313afdcad0638cd5b5cd8dce19eea..19e3d2b3cd84cde4c511b012f7f119459007dd79 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -147,6 +147,7 @@ ath79-nand - GL-AR300M - GL-AR750S + - GL-XE300 * Netgear diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/250-cellular b/package/gluon-core/luasrc/lib/gluon/upgrade/250-cellular index f428f67f4b28dbb28ab8ba38c5e190b40beed798..b60d8e6aaf797ccf7016a64bb58c0f76bf811996 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/250-cellular +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/250-cellular @@ -43,6 +43,10 @@ local function setup_ncm_qmi(devpath, control_type, delay) end if platform.match('ath79', 'nand', { + 'glinet,gl-xe300', +}) then + setup_ncm_qmi('/dev/cdc-wdm0', 'qmi', 15) +elseif platform.match('ath79', 'nand', { 'zte,mf281', }) then setup_ncm_qmi('/dev/ttyACM0', 'ncm', 15) diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua index e3dae295be6593ea73c5962c28a823f210357862..6debe8c5dd3e6ea7c4da7f76fe163f8a2cc0400f 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua @@ -74,6 +74,7 @@ end function M.is_cellular_device() if M.match('ath79', 'nand', { 'zte,mf281', + 'glinet,gl-xe300', }) then return true elseif M.match('ipq40xx', 'generic', { diff --git a/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led b/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led index c3ac6681d30fc33898231a76152ba32f079cb1ff..c456278f57ad78bbbff4ecc5df5f32dcf76258ff 100755 --- a/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led +++ b/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led @@ -3,18 +3,26 @@ START=96 start() { + local custom_led + /etc/init.d/led start . /etc/diag.sh get_status_led 2> /dev/null - if [ -z $status_led ]; then + if [ -z "$status_led" ]; then status_led="$running" fi - if [ -z $status_led ]; then + + if [ -z "$status_led" ]; then status_led="$boot" fi + custom_led="$(lua -e 'print(require("gluon.setup-mode").get_status_led() or "")')" + if [ -z "$status_led" ]; then + status_led="$custom_led" + fi + status_led_set_timer 1000 300 } diff --git a/package/gluon-setup-mode/luasrc/usr/lib/lua/gluon/setup-mode.lua b/package/gluon-setup-mode/luasrc/usr/lib/lua/gluon/setup-mode.lua new file mode 100644 index 0000000000000000000000000000000000000000..3b107bf97c6aaf172163b001579d1020ef966fcd --- /dev/null +++ b/package/gluon-setup-mode/luasrc/usr/lib/lua/gluon/setup-mode.lua @@ -0,0 +1,14 @@ +local platform = require 'gluon.platform' + + +local M = {} + +function M.get_status_led() + if platform.match('ath79', 'nand', { + 'glinet,gl-xe300', + }) then + return "green:wlan" + end +end + +return M diff --git a/targets/ath79-nand b/targets/ath79-nand index 757d24a122c0668f454037375a1dd54f5703329d..7dff245368b105a798f2ce1b6760b701f4a245ad 100644 --- a/targets/ath79-nand +++ b/targets/ath79-nand @@ -23,6 +23,9 @@ device('gl.inet-gl-ar750s-nor', 'glinet_gl-ar750s-nor', { packages = ATH10K_PACKAGES_QCA9887, }) +device('gl.inet-gl-xe300', 'glinet_gl-xe300', { + factory = false, +}) -- Netgear