diff --git a/package/gluon-core/files/lib/gluon/upgrade/core/initial/001-sysconfig b/package/gluon-core/files/lib/gluon/upgrade/core/initial/001-sysconfig
index 1e6c56d83bafa9a780c74b4505b2376ba9f56b94..ea5ef0e206ee092846c9a529ad21a31a00846903 100755
--- a/package/gluon-core/files/lib/gluon/upgrade/core/initial/001-sysconfig
+++ b/package/gluon-core/files/lib/gluon/upgrade/core/initial/001-sysconfig
@@ -2,18 +2,14 @@
 
 local sysconfig = require 'gluon.sysconfig'
 local gluon_util = require 'gluon.util'
+local platform = require 'gluon.platform'
 
 local fs = require 'luci.fs'
 local uci = require('luci.model.uci').cursor()
 local util = require 'luci.util'
 
-local platform_info = require 'platform_info'
 
-
-local board_name = platform_info.get_board_name()
-
-
-if board_name == 'tl-wdr3600' or board_name == 'tl-wdr4300' then
+if platform.match('ar71xx', 'generic', {'tl-wdr3600', 'tl-wdr4300'}) then
    sysconfig.primary_mac = util.trim(fs.readfile('/sys/class/ieee80211/phy1/macaddress'))
 else
    sysconfig.primary_mac = util.trim(fs.readfile('/sys/class/ieee80211/phy0/macaddress'))
@@ -29,7 +25,7 @@ local lan_ifname = uci:get('network', 'lan', 'ifname')
 local wan_ifname = uci:get('network', 'wan', 'ifname')
 
 
-if board_name == 'nanostation-m' then
+if platform.match('ar71xx', 'generic', {'nanostation-m'}) then
    lan_ifname, wan_ifname = wan_ifname, lan_ifname
 end
 
diff --git a/package/gluon-core/files/lib/gluon/upgrade/core/initial/011-gluon-network b/package/gluon-core/files/lib/gluon/upgrade/core/initial/011-gluon-network
index 1bc3514fd6c493604436069ccd07884924a38133..851a8dc4d0a1f99b25336d199da647ceb4a7fbf7 100755
--- a/package/gluon-core/files/lib/gluon/upgrade/core/initial/011-gluon-network
+++ b/package/gluon-core/files/lib/gluon/upgrade/core/initial/011-gluon-network
@@ -1,12 +1,12 @@
 #!/usr/bin/lua
 
 local sysconfig = require 'gluon.sysconfig'
+local platform = require 'gluon.platform'
 
 local uci = require('luci.model.uci').cursor()
 local util = require 'luci.util'
 
 local nixio = require 'nixio'
-local platform_info = require 'platform_info'
 
 
 uci:delete('network', 'lan')
@@ -21,7 +21,7 @@ uci:section('network', 'interface', 'wan',
 )
 
 
-if util.contains({'tl-wr1043nd', 'tl-wdr3600', 'tl-wdr4300'}, platform_info.get_board_name()) then
+if platform.match('ar71xx', 'generic', {'tl-wr1043nd', 'tl-wdr3600', 'tl-wdr4300'}) then
    -- fix up duplicate mac addresses
    local m1, m2, m3, m4, m5, m6 = string.match(sysconfig.primary_mac, '(%x%x):(%x%x):(%x%x):(%x%x):(%x%x):(%x%x)')
    m1 = nixio.bit.bor(tonumber(m1, 16), 0x02)
diff --git a/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/001-sysconfig b/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/001-sysconfig
index 52e91a3bd557ea276dd0794af285ec90ace57c64..769309fbaa00247a92aee01e4d8d03fdf6fbd15d 100755
--- a/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/001-sysconfig
+++ b/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/001-sysconfig
@@ -2,19 +2,14 @@
 
 local sysconfig = require 'gluon.sysconfig'
 local gluon_util = require 'gluon.util'
-local site = require 'gluon.site_config'
+local platform = require 'gluon.platform'
 
 local fs = require 'luci.fs'
 local uci = require('luci.model.uci').cursor()
 local util = require 'luci.util'
 
-local platform_info = require 'platform_info'
 
-
-local board_name = platform_info.get_board_name()
-
-
-if board_name == 'tl-wdr3600' or board_name == 'tl-wdr4300' then
+if platform.match('ar71xx', 'generic', {'tl-wdr3600', 'tl-wdr4300'}) then
    sysconfig.primary_mac = util.trim(fs.readfile('/sys/class/ieee80211/phy1/macaddress'))
 else
    sysconfig.primary_mac = util.trim(fs.readfile('/sys/class/ieee80211/phy0/macaddress'))
diff --git a/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/011-gluon-network b/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/011-gluon-network
index 79b63996c7c02db8ebe78caf6a451f987953839f..b62943719f540c587d0b0c9093757daf125a0171 100755
--- a/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/011-gluon-network
+++ b/package/gluon-legacy/files/lib/gluon/upgrade/core/legacy/011-gluon-network
@@ -1,15 +1,15 @@
 #!/usr/bin/lua
 
 local sysconfig = require 'gluon.sysconfig'
+local platform = require 'gluon.platform'
 
 local uci = require('luci.model.uci').cursor()
 local util = require 'luci.util'
 
 local nixio = require 'nixio'
-local platform_info = require 'platform_info'
 
 
-if util.contains({'tl-wr1043nd', 'tl-wdr3600', 'tl-wdr4300'}, platform_info.get_board_name()) then
+if platform.match('ar71xx', 'generic', {'tl-wr1043nd', 'tl-wdr3600', 'tl-wdr4300'}) then
    -- fix up duplicate mac addresses
    local m1, m2, m3, m4, m5, m6 = string.match(sysconfig.primary_mac, '(%x%x):(%x%x):(%x%x):(%x%x):(%x%x):(%x%x)')
    m1 = nixio.bit.bor(tonumber(m1, 16), 0x02)
diff --git a/package/gluon-setup-mode/files/lib/gluon/upgrade/setup-mode/invariant/011-setup-ifname b/package/gluon-setup-mode/files/lib/gluon/upgrade/setup-mode/invariant/011-setup-ifname
index 29757cddd67cee514928df47c9a6dbd8a8ac6026..f1fef490f9c0a2114f071a928fd4c38e007f388f 100755
--- a/package/gluon-setup-mode/files/lib/gluon/upgrade/setup-mode/invariant/011-setup-ifname
+++ b/package/gluon-setup-mode/files/lib/gluon/upgrade/setup-mode/invariant/011-setup-ifname
@@ -1,6 +1,6 @@
 #!/usr/bin/lua
 
-local platform_info = require 'platform_info'
+local platform = require 'gluon.platform'
 local sysconfig = require 'gluon.sysconfig'
 
 
@@ -8,7 +8,7 @@ if sysconfig.setup_ifname then
    os.exit(0)
 end
 
-if platform_info.get_board_name() == 'nanostation-m' then
+if platform.match('ar71xx', 'generic', {'nanostation-m'}) then
    sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
 else
    sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname