Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
61
target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds
Normal file
61
target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# Copyright (C) 2014-2016 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE-Project.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
boardname="${board##*,}"
|
||||
|
||||
case "$board" in
|
||||
ctera,c200-v2)
|
||||
ucidef_set_led_usbport "usb2" "USB2" "green:usb-2" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "usb3" "USB3" "green:usb-1" "usb1-port2" "usb2-port2"
|
||||
;;
|
||||
kobol,helios4)
|
||||
ucidef_set_led_usbport "USB" "USB" "helios4:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1" "usb5-port1"
|
||||
;;
|
||||
linksys,wrt1200ac)
|
||||
ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "wan"
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:caiman:white:usb3_1" "usb2-port1" "usb3-port1"
|
||||
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:caiman:white:usb3_2" "usb3-port1"
|
||||
;;
|
||||
linksys,wrt1900ac-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "wan"
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
|
||||
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
|
||||
;;
|
||||
linksys,wrt1900ac-v2)
|
||||
ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "wan"
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:cobra:white:usb2" "usb1-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:cobra:white:usb3_1" "usb2-port1" "usb3-port1"
|
||||
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:cobra:white:usb3_2" "usb3-port1"
|
||||
;;
|
||||
linksys,wrt1900acs)
|
||||
ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "wan"
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:shelby:white:usb2" "usb1-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:shelby:white:usb3_1" "usb2-port1" "usb3-port1"
|
||||
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:shelby:white:usb3_2" "usb3-port1"
|
||||
;;
|
||||
linksys,wrt3200acm)
|
||||
ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "wan"
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:rango:white:usb2" "usb1-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:rango:white:usb3_1" "usb2-port1" "usb3-port1"
|
||||
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:rango:white:usb3_2" "usb3-port1"
|
||||
;;
|
||||
linksys,wrt32x)
|
||||
ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "wan"
|
||||
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1"
|
||||
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
110
target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
Normal file
110
target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,110 @@
|
||||
#
|
||||
# Copyright (C) 2014-2016 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE-Project.org
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
mvebu_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
ctera,c200-v2|\
|
||||
synology,ds213j)
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
cznic,turris-omnia)
|
||||
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" "eth2"
|
||||
;;
|
||||
fortinet,fg-30e|\
|
||||
linksys,wrt1200ac|\
|
||||
linksys,wrt1900ac-v1|\
|
||||
linksys,wrt1900ac-v2|\
|
||||
linksys,wrt1900acs|\
|
||||
linksys,wrt3200acm|\
|
||||
linksys,wrt32x)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
fortinet,fg-50e|\
|
||||
fortinet,fg-51e|\
|
||||
fortinet,fg-52e|\
|
||||
fortinet,fwf-50e-2r|\
|
||||
fortinet,fwf-51e)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "eth1 eth2"
|
||||
;;
|
||||
iij,sa-w2)
|
||||
ucidef_set_interfaces_lan_wan "ge1_0 ge1_1 ge1_2 ge1_3" "ge0"
|
||||
;;
|
||||
iptime,nas1dual)
|
||||
ucidef_set_interface_lan "eth0 eth1" "dhcp"
|
||||
;;
|
||||
marvell,a385-db-ap)
|
||||
ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
|
||||
;;
|
||||
marvell,axp-gp)
|
||||
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
|
||||
;;
|
||||
solidrun,clearfog-base-a1)
|
||||
# eth0 is standalone ethernet
|
||||
# eth1 is standalone ethernet
|
||||
# eth2 is SFP
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
|
||||
;;
|
||||
solidrun,clearfog-pro-a1)
|
||||
# eth0 is standalone ethernet
|
||||
# eth1 is switch
|
||||
# eth2 is SFP
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2"
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
mvebu_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
local lan_mac=""
|
||||
local wan_mac=""
|
||||
local label_mac=""
|
||||
|
||||
case "$board" in
|
||||
buffalo,ls220de|\
|
||||
buffalo,ls421de)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr)
|
||||
;;
|
||||
ctera,c200-v2)
|
||||
label_mac=$(mtd_get_mac_ascii dev_params mac)
|
||||
lan_mac=$label_mac
|
||||
;;
|
||||
linksys,wrt1200ac|\
|
||||
linksys,wrt1900ac-v2|\
|
||||
linksys,wrt1900acs|\
|
||||
linksys,wrt3200acm|\
|
||||
linksys,wrt32x)
|
||||
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
wan_mac=$(macaddr_setbit_la $label_mac)
|
||||
;;
|
||||
linksys,wrt1900ac-v1)
|
||||
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
lan_mac=$label_mac
|
||||
wan_mac=$label_mac
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
||||
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
mvebu_setup_interfaces $board
|
||||
mvebu_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (C) 2020 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
linksys,wrt1200ac|\
|
||||
linksys,wrt1900ac-v1|\
|
||||
linksys,wrt1900ac-v2|\
|
||||
linksys,wrt1900acs|\
|
||||
linksys,wrt3200acm|\
|
||||
linksys,wrt32x|\
|
||||
solidrun,clearfog-base-a1|\
|
||||
solidrun,clearfog-pro-a1)
|
||||
ucidef_set_compat_version "1.1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
# The pcie-controller device was renamed to pcie in Linux kernel 4.14
|
||||
# commit 28fbb9c539e2 ("ARM: dts: marvell: fix PCI bus dtc warnings").
|
||||
# This script migrates the path in the UCI configuration from the old
|
||||
# name to the new name and also back, when am upgrade or downgrade is
|
||||
# done. It checks if the name exists before changing the configuration.
|
||||
# This has to be done before the 10-wifi-detect script from mac80211 is
|
||||
# executed because this would add the devices again under the new path
|
||||
# name.
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
PATH_CHANGED=0
|
||||
|
||||
rename_wifi_path() {
|
||||
local path_old=$(uci get wireless.${1}.path)
|
||||
local path_new=$(echo ${path_old} | sed "${2}")
|
||||
|
||||
if [ -e "/sys/devices/platform/${path_new}" ] && [ ${path_old} != ${path_new} ]
|
||||
then
|
||||
uci set wireless.${1}.path=${path_new}
|
||||
PATH_CHANGED=1
|
||||
fi
|
||||
}
|
||||
|
||||
rename_wifi_path_list() {
|
||||
# migration from kernel 4.9 to 4.14
|
||||
rename_wifi_path $1 "s/soc:pcie-controller/soc:pcie/"
|
||||
# migration from kernel 4.14 to 4.9
|
||||
rename_wifi_path $1 "s/soc:pcie/soc:pcie-controller/"
|
||||
}
|
||||
|
||||
[ "${ACTION}" = "add" ] && {
|
||||
[ ! -e /etc/config/wireless ] && return
|
||||
|
||||
config_load wireless
|
||||
config_foreach rename_wifi_path_list wifi-device
|
||||
|
||||
[ "$PATH_CHANGED" = "1" ] && uci commit wireless
|
||||
}
|
||||
16
target/linux/mvebu/cortexa9/base-files/etc/init.d/bootcount
Executable file
16
target/linux/mvebu/cortexa9/base-files/etc/init.d/bootcount
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
boot() {
|
||||
case $(board_name) in
|
||||
linksys,wrt1200ac|\
|
||||
linksys,wrt1900ac-v1|\
|
||||
linksys,wrt1900ac-v2|\
|
||||
linksys,wrt1900acs|\
|
||||
linksys,wrt3200acm|\
|
||||
linksys,wrt32x)
|
||||
mtd resetbc s_env || true
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
||||
[ ! -e /etc/config/wireless ] && exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
linksys,wrt1200ac|\
|
||||
linksys,wrt1900ac-v1|\
|
||||
linksys,wrt1900ac-v2|\
|
||||
linksys,wrt1900acs|\
|
||||
linksys,wrt3200acm|\
|
||||
linksys,wrt32x)
|
||||
SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
|
||||
WIFIMAC2G=$(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 1)
|
||||
WIFIMAC5G=$(macaddr_add $WIFIMAC2G 1)
|
||||
case "$SKU" in
|
||||
AP)
|
||||
REGD=CN
|
||||
;;
|
||||
AU)
|
||||
REGD=AU
|
||||
;;
|
||||
CA)
|
||||
REGD=CA
|
||||
;;
|
||||
EU)
|
||||
REGD=FR
|
||||
;;
|
||||
US)
|
||||
REGD=US
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$board" in
|
||||
linksys,wrt1900ac-v1)
|
||||
WIFIMAC0=$WIFIMAC2G
|
||||
WIFIMAC1=$WIFIMAC5G
|
||||
;;
|
||||
*)
|
||||
WIFIMAC0=$WIFIMAC5G
|
||||
WIFIMAC1=$WIFIMAC2G
|
||||
;;
|
||||
esac
|
||||
|
||||
uci get wireless.radio0.country || uci set wireless.radio0.country=$REGD
|
||||
uci get wireless.@wifi-iface[0].macaddr || uci set wireless.@wifi-iface[0].macaddr=$WIFIMAC0
|
||||
uci get wireless.radio1.country || uci set wireless.radio1.country=$REGD
|
||||
uci get wireless.@wifi-iface[1].macaddr || uci set wireless.@wifi-iface[1].macaddr=$WIFIMAC1
|
||||
;;
|
||||
esac
|
||||
|
||||
uci commit wireless
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Copyright (C) 2017 LEDE-Project.org
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
linksys,wrt1900ac-v1)
|
||||
# Set fan script execution in crontab
|
||||
grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0
|
||||
|
||||
echo "# mamba fan script runs every 5 minutes" >> /etc/crontabs/root
|
||||
echo "*/5 * * * * /sbin/fan_ctrl.sh" >> /etc/crontabs/root
|
||||
|
||||
# Execute one time after initial flash (instead of waiting 5 min for cron)
|
||||
/sbin/fan_ctrl.sh
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,11 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
linksys,wrt1900ac-v1|\
|
||||
linksys,wrt32x)
|
||||
uci set system.@system[0].compat_version="2.0"
|
||||
uci commit system
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user