From 09c9b78e30edf9c83a870ea38dbe6168c27e7670 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 11 Jul 2021 22:23:50 +0200
Subject: [PATCH] ramips-rt305x: drop target

VoCores aren't exactly useful mesh nodes except for experimentation.
They certainly aren't worth maintaining a whole target, in particular
one that has a WLAN driver not used by any other target.
---
 .github/workflows/build-gluon.yml              |  2 +-
 docs/user/supported_devices.rst                | 11 -----------
 .../luasrc/usr/lib/lua/gluon/platform.lua      |  5 -----
 targets/ramips-rt305x                          | 18 ------------------
 targets/targets.mk                             |  1 -
 5 files changed, 1 insertion(+), 36 deletions(-)
 delete mode 100644 targets/ramips-rt305x

diff --git a/.github/workflows/build-gluon.yml b/.github/workflows/build-gluon.yml
index 904612b60..944870aa1 100644
--- a/.github/workflows/build-gluon.yml
+++ b/.github/workflows/build-gluon.yml
@@ -32,7 +32,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        target: [ath79-generic, ath79-nand, bcm27xx-bcm2708, bcm27xx-bcm2709, ipq40xx-generic, ipq806x-generic, lantiq-xrx200, lantiq-xway, mediatek-mt7622, mpc85xx-p1010, mpc85xx-p1020, ramips-mt7620, ramips-mt7621, ramips-mt76x8, ramips-rt305x, rockchip-armv8, sunxi-cortexa7, x86-generic, x86-geode, x86-legacy, x86-64, bcm27xx-bcm2710, mvebu-cortexa9]
+        target: [ath79-generic, ath79-nand, bcm27xx-bcm2708, bcm27xx-bcm2709, ipq40xx-generic, ipq806x-generic, lantiq-xrx200, lantiq-xway, mediatek-mt7622, mpc85xx-p1010, mpc85xx-p1020, ramips-mt7620, ramips-mt7621, ramips-mt76x8, rockchip-armv8, sunxi-cortexa7, x86-generic, x86-geode, x86-legacy, x86-64, bcm27xx-bcm2710, mvebu-cortexa9]
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v1
diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst
index b26fc4e38..0020c5323 100644
--- a/docs/user/supported_devices.rst
+++ b/docs/user/supported_devices.rst
@@ -250,13 +250,6 @@ ramips-mt76x8
   - Xiaomi Mi Router 4A (100M Edition)
   - Xiaomi Mi Router 4C
 
-ramips-rt305x [#deprecated]_  [#device-class-tiny]_
----------------------------------------------------
-
-* VoCore
-
-  - VoCore (8M, 16M)
-
 rockchip-armv8
 --------------
 
@@ -299,10 +292,6 @@ See also: :doc:`x86`
 Footnotes
 ---------
 
-.. [#deprecated]
-  The device or target is reaching its end of life soon. This means that support
-  in the next major release of Gluon is doubtful.
-
 .. [#device-class-tiny]
   These devices only support a subset of Gluons capabilities due to flash or memory
   size constraints. Devices are classified as tiny in they provide less than 7M of usable
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 5bfe534ee..24bb9cd6c 100644
--- a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua
+++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua
@@ -44,11 +44,6 @@ function M.is_outdoor_device()
 end
 
 function M.device_supports_wpa3()
-	-- rt2x00 crashes when enabling WPA3 personal / OWE VAP
-	if M.match('ramips', 'rt305x') then
-		return false
-	end
-
 	return unistd.access('/lib/gluon/features/wpa3')
 end
 
diff --git a/targets/ramips-rt305x b/targets/ramips-rt305x
deleted file mode 100644
index f8be18c77..000000000
--- a/targets/ramips-rt305x
+++ /dev/null
@@ -1,18 +0,0 @@
-config('KERNEL_KALLSYMS', false)
-config('GLUON_SPECIALIZE_KERNEL', true)
-
-no_opkg()
-
-defaults {
-	class = 'tiny',  -- 32M RAM
-}
-
--- VoCore
-
-device('vocore-8M', 'vocore_vocore-8m', {
-	factory = false,
-})
-
-device('vocore-16M', 'vocore_vocore-16m', {
-	factory = false,
-})
diff --git a/targets/targets.mk b/targets/targets.mk
index 67e87fa26..92b58ab88 100644
--- a/targets/targets.mk
+++ b/targets/targets.mk
@@ -12,7 +12,6 @@ $(eval $(call GluonTarget,mpc85xx,p1020))
 $(eval $(call GluonTarget,ramips,mt7620))
 $(eval $(call GluonTarget,ramips,mt7621))
 $(eval $(call GluonTarget,ramips,mt76x8))
-$(eval $(call GluonTarget,ramips,rt305x))
 $(eval $(call GluonTarget,rockchip,armv8))
 $(eval $(call GluonTarget,sunxi,cortexa7))
 $(eval $(call GluonTarget,x86,generic))
-- 
GitLab