Add target ar71xx-mikrotik
Fixes #121 Based-on-patch-by: Tobias Hachmer <tobias@hachmer.de>
This commit is contained in:
		
							parent
							
								
									a889185d90
								
							
						
					
					
						commit
						bfb0002bb5
					
				@ -18,7 +18,10 @@ local try_files = {
 | 
			
		||||
  '/sys/class/net/eth0/address'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if not util.contains({'x86', 'brcm2708'}, platform.get_target()) then
 | 
			
		||||
if not (
 | 
			
		||||
  util.contains({'x86', 'brcm2708'}, platform.get_target()) or
 | 
			
		||||
  platform.match('ar71xx', 'mikrotik')
 | 
			
		||||
) then
 | 
			
		||||
  table.insert(try_files, 1, '/sys/class/ieee80211/phy0/macaddress')
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -5,13 +5,16 @@ local sysconfig = require 'gluon.sysconfig'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if sysconfig.setup_ifname then
 | 
			
		||||
   os.exit(0)
 | 
			
		||||
  os.exit(0)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) then
 | 
			
		||||
   sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
 | 
			
		||||
if
 | 
			
		||||
  platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) or
 | 
			
		||||
  platform.match('ar71xx', 'mikrotik')
 | 
			
		||||
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
 | 
			
		||||
  sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Remove the old sysconfig setting
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								targets/ar71xx-mikrotik/profiles.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								targets/ar71xx-mikrotik/profiles.mk
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
# List of hardware profiles
 | 
			
		||||
 | 
			
		||||
## Mikrotik
 | 
			
		||||
 | 
			
		||||
# Will contain both ath5k and ath9k
 | 
			
		||||
# ath5k cards are commonly used with Mikrotik hardware
 | 
			
		||||
$(eval $(call GluonProfile,DefaultNoWifi,kmod-ath5k))
 | 
			
		||||
$(eval $(call GluonProfileFactorySuffix,DefaultNoWifi,,-rootfs.tar.gz,-vmlinux-lzma.elf))
 | 
			
		||||
$(eval $(call GluonProfileSysupgradeSuffix,DefaultNoWifi))
 | 
			
		||||
$(eval $(call GluonModel,DefaultNoWifi,DefaultNoWifi,mikrotik))
 | 
			
		||||
@ -7,6 +7,7 @@ $(eval $(call GluonTarget,x86,64))
 | 
			
		||||
$(eval $(call GluonTarget,x86,xen_domu))
 | 
			
		||||
 | 
			
		||||
ifneq ($(BROKEN),)
 | 
			
		||||
$(eval $(call GluonTarget,ar71xx,mikrotik)) # BROKEN: no sysupgrade support
 | 
			
		||||
$(eval $(call GluonTarget,ramips,rt305x)) # BROKEN: No AP+IBSS support
 | 
			
		||||
$(eval $(call GluonTarget,brcm2708,bcm2708)) # BROKEN: Needs more testing
 | 
			
		||||
$(eval $(call GluonTarget,brcm2708,bcm2709)) # BROKEN: Needs more testing
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user