treewide: use the generic board_name function
Use the generic function instead ot the target specific ones. Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
ced05ca9e0
commit
f12a32630f
94 changed files with 153 additions and 260 deletions
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
a40|\
|
a40|\
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/cns3xxx.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(cns3xxx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
laguna)
|
laguna)
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/imx6.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(imx6_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
*gw5*)
|
*gw5*)
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/ipq806x.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(ipq806x_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
ea8500)
|
ea8500)
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/kirkwood.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(kirkwood_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
dockstar|\
|
dockstar|\
|
||||||
|
|
|
@ -8,11 +8,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/mvebu.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(mvebu_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
armada-385-linksys-caiman|\
|
armada-385-linksys-caiman|\
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/mxs.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(mxs_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
duckbill)
|
duckbill)
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/oxnas.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(oxnas_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
akitio|\
|
akitio|\
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
|
|
||||||
touch /etc/config/ubootenv
|
touch /etc/config/ubootenv
|
||||||
|
|
||||||
. /lib/ramips.sh
|
|
||||||
. /lib/uboot-envtools.sh
|
. /lib/uboot-envtools.sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
all0239-3g|\
|
all0239-3g|\
|
||||||
|
|
|
@ -11,10 +11,9 @@ NAME=om-watchdog
|
||||||
PROG=/sbin/om-watchdog
|
PROG=/sbin/om-watchdog
|
||||||
|
|
||||||
get_gpio() {
|
get_gpio() {
|
||||||
if [ -r /lib/ar71xx.sh ]; then
|
local board=$(board_name)
|
||||||
. /lib/ar71xx.sh
|
|
||||||
local board=$(ar71xx_board_name)
|
|
||||||
|
|
||||||
|
if [ -r /lib/ar71xx.sh ]; then
|
||||||
case "$board" in
|
case "$board" in
|
||||||
"a40"|\
|
"a40"|\
|
||||||
"a60"|\
|
"a60"|\
|
||||||
|
@ -49,9 +48,6 @@ get_gpio() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [ -r /lib/ramips.sh ]; then
|
elif [ -r /lib/ramips.sh ]; then
|
||||||
. /lib/ramips.sh
|
|
||||||
local board=$(ramips_board_name)
|
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
"rut5xx")
|
"rut5xx")
|
||||||
return 11
|
return 11
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/apm821xx.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(apm821xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
mr24)
|
mr24)
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
|
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/apm821xx.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(apm821xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
mbl|\
|
mbl|\
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/apm821xx.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
local board=$(apm821xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case $board in
|
case $board in
|
||||||
mbl|\
|
mbl|\
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||||
|
|
||||||
. /lib/apm821xx.sh
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
|
@ -48,7 +47,7 @@ ath9k_patch_firmware_mac() {
|
||||||
macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
|
macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
|
||||||
}
|
}
|
||||||
|
|
||||||
board=$(apm821xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"pci_wmac0.eeprom")
|
"pci_wmac0.eeprom")
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/apm821xx.sh
|
|
||||||
|
|
||||||
BOARD=$(apm821xx_board_name)
|
BOARD=$(board_name)
|
||||||
|
|
||||||
if [ $BOARD == "wndr4700" ]; then
|
if [ $BOARD == "wndr4700" ]; then
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/apm821xx.sh
|
|
||||||
|
|
||||||
preinit_set_mac_address() {
|
preinit_set_mac_address() {
|
||||||
case $(apm821xx_board_name) in
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
case $(board_name) in
|
||||||
mr24|\
|
mr24|\
|
||||||
mx60)
|
mx60)
|
||||||
mac_lan=$(mtd_get_mac_binary_ubi board-config 102)
|
mac_lan=$(mtd_get_mac_binary_ubi board-config 102)
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/apm821xx.sh
|
|
||||||
|
|
||||||
PART_NAME=firmware
|
PART_NAME=firmware
|
||||||
RAMFS_COPY_DATA=/lib/apm821xx.sh
|
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(apm821xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
[ "$#" -gt 1 ] && return 1
|
[ "$#" -gt 1 ] && return 1
|
||||||
|
|
||||||
|
@ -36,7 +33,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_pre_upgrade() {
|
platform_pre_upgrade() {
|
||||||
local board=$(apm821xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
mr24|\
|
mr24|\
|
||||||
|
@ -54,7 +51,7 @@ platform_pre_upgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(apm821xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
mbl)
|
mbl)
|
||||||
|
@ -68,7 +65,7 @@ platform_do_upgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_copy_config() {
|
platform_copy_config() {
|
||||||
local board=$(apm821xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
mbl)
|
mbl)
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
a40)
|
a40)
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
ar71xx_setup_interfaces()
|
ar71xx_setup_interfaces()
|
||||||
{
|
{
|
||||||
|
@ -545,7 +544,7 @@ ar71xx_setup_macs()
|
||||||
}
|
}
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
ar71xx_setup_interfaces $board
|
ar71xx_setup_interfaces $board
|
||||||
ar71xx_setup_macs $board
|
ar71xx_setup_macs $board
|
||||||
board_config_flush
|
board_config_flush
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
nanostation-m)
|
nanostation-m)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2009-2013 OpenWrt.org
|
# Copyright (C) 2009-2013 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
local board=$(ar71xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case $board in
|
case $board in
|
||||||
a40)
|
a40)
|
||||||
|
@ -175,7 +175,7 @@ get_status_led() {
|
||||||
status_led="$board:blue:status"
|
status_led="$board:blue:status"
|
||||||
;;
|
;;
|
||||||
eap120)
|
eap120)
|
||||||
status_led="$(ar71xx_board_name):green:system"
|
status_led="$board:green:system"
|
||||||
;;
|
;;
|
||||||
eap300v2)
|
eap300v2)
|
||||||
status_led="engenius:blue:power"
|
status_led="engenius:blue:power"
|
||||||
|
@ -516,7 +516,7 @@ set_state() {
|
||||||
;;
|
;;
|
||||||
done)
|
done)
|
||||||
status_led_on
|
status_led_on
|
||||||
case $(ar71xx_board_name) in
|
case $(board_name) in
|
||||||
gl-ar300m)
|
gl-ar300m)
|
||||||
fw_printenv lc >/dev/null 2>&1 && fw_setenv "bootcount" 0
|
fw_printenv lc >/dev/null 2>&1 && fw_setenv "bootcount" 0
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
|
@ -66,7 +65,7 @@ ath9k_patch_firmware_mac() {
|
||||||
macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
|
macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
|
||||||
}
|
}
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"soc_wmac.eeprom")
|
"soc_wmac.eeprom")
|
||||||
|
|
|
@ -38,11 +38,10 @@ ath10kcal_patch_mac() {
|
||||||
|
|
||||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"ath10k/cal-pci-0000:00:00.0.bin")
|
"ath10k/cal-pci-0000:00:00.0.bin")
|
||||||
|
|
|
@ -6,10 +6,10 @@ PHYNBR=${DEVPATH##*/phy}
|
||||||
|
|
||||||
[ -n $PHYNBR ] || exit 0
|
[ -n $PHYNBR ] || exit 0
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
archer-c58-v1)
|
archer-c58-v1)
|
||||||
|
|
|
@ -37,9 +37,9 @@ ar922x_disable_gpio_jtag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
[ $phyname -a $ACTION = "add" ] && {
|
[ $phyname -a $ACTION = "add" ] && {
|
||||||
. /lib/ar71xx.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
case $(ar71xx_board_name) in
|
case $(board_name) in
|
||||||
wzr-hp-ag300h)
|
wzr-hp-ag300h)
|
||||||
ar922x_disable_gpio_jtag $phyname
|
ar922x_disable_gpio_jtag $phyname
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
SWITCH_NAME_CHANGED=
|
SWITCH_NAME_CHANGED=
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
do_change_switch_name() {
|
do_change_switch_name() {
|
||||||
local config="$1"
|
local config="$1"
|
||||||
local option=$2
|
local option=$2
|
||||||
|
@ -25,8 +27,6 @@ migrate_switch_name() {
|
||||||
local oldname=$1
|
local oldname=$1
|
||||||
local newname=$2
|
local newname=$2
|
||||||
|
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
config_load network
|
config_load network
|
||||||
|
|
||||||
logger -t migrate-switchX "Updating switch names in network configuration"
|
logger -t migrate-switchX "Updating switch names in network configuration"
|
||||||
|
@ -40,9 +40,7 @@ migrate_switch_name() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
board=$(board_name)
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
dir-825-c1|\
|
dir-825-c1|\
|
||||||
|
|
|
@ -41,9 +41,7 @@ migrate_leds()
|
||||||
config_foreach do_led_update_sysfs led "$@"
|
config_foreach do_led_update_sysfs led "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
board=$(board_name)
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
dhp-1565-a1|\
|
dhp-1565-a1|\
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
# Copyright (C) 2010 OpenWrt.org
|
# Copyright (C) 2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
fixtrx() {
|
fixtrx() {
|
||||||
mtd -o 32 fixtrx firmware
|
mtd -o 32 fixtrx firmware
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
fix_seama_header() {
|
fix_seama_header() {
|
||||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||||
|
@ -8,7 +8,7 @@ fix_seama_header() {
|
||||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
||||||
}
|
}
|
||||||
|
|
||||||
board=$(ar71xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
dir-869-a1)
|
dir-869-a1)
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
fetch_mac_from_mtd() {
|
fetch_mac_from_mtd() {
|
||||||
local mtd_part=$1
|
local mtd_part=$1
|
||||||
local lan_env=$2
|
local lan_env=$2
|
||||||
|
@ -21,7 +19,9 @@ fetch_mac_from_mtd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
preinit_set_mac_address() {
|
preinit_set_mac_address() {
|
||||||
case $(ar71xx_board_name) in
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
case $(board_name) in
|
||||||
c-55|\
|
c-55|\
|
||||||
c-60)
|
c-60)
|
||||||
mac_lan=$(mtd_get_mac_binary art 0)
|
mac_lan=$(mtd_get_mac_binary art 0)
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
set_preinit_iface() {
|
set_preinit_iface() {
|
||||||
case $(ar71xx_board_name) in
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
case $(board_name) in
|
||||||
alfa-ap96 |\
|
alfa-ap96 |\
|
||||||
alfa-nx |\
|
alfa-nx |\
|
||||||
ap135-020 |\
|
ap135-020 |\
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
. /lib/ar71xx.sh
|
|
||||||
|
|
||||||
|
|
||||||
do_patch_ath10k_firmware() {
|
do_patch_ath10k_firmware() {
|
||||||
local firmware_file="/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin"
|
local firmware_file="/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin"
|
||||||
|
@ -25,7 +24,7 @@ do_patch_ath10k_firmware() {
|
||||||
# some boards have bogus mac in otp (= directly in the PCIe card's EEPROM).
|
# some boards have bogus mac in otp (= directly in the PCIe card's EEPROM).
|
||||||
# we have to patch the default mac in the firmware because we cannot change
|
# we have to patch the default mac in the firmware because we cannot change
|
||||||
# the otp.
|
# the otp.
|
||||||
case $(ar71xx_board_name) in
|
case $(board_name) in
|
||||||
dgl-5500-a1 | tew-823dru)
|
dgl-5500-a1 | tew-823dru)
|
||||||
local mac
|
local mac
|
||||||
mac=$(mtd_get_mac_ascii nvram wlan1_mac)
|
mac=$(mtd_get_mac_ascii nvram wlan1_mac)
|
||||||
|
@ -44,7 +43,7 @@ do_patch_ath10k_firmware() {
|
||||||
}
|
}
|
||||||
|
|
||||||
check_patch_ath10k_firmware() {
|
check_patch_ath10k_firmware() {
|
||||||
case $(ar71xx_board_name) in
|
case $(board_name) in
|
||||||
dgl-5500-a1 | tew-823dru)
|
dgl-5500-a1 | tew-823dru)
|
||||||
do_patch_ath10k_firmware
|
do_patch_ath10k_firmware
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -184,7 +184,7 @@ alfa_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_nand_board_name() {
|
platform_nand_board_name() {
|
||||||
local board=$(ar71xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
rb*) echo "routerboard";;
|
rb*) echo "routerboard";;
|
||||||
|
@ -193,7 +193,7 @@ platform_nand_board_name() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(ar71xx_board_name)
|
local board=$(board_name)
|
||||||
local magic="$(get_magic_word "$1")"
|
local magic="$(get_magic_word "$1")"
|
||||||
local magic_long="$(get_magic_long "$1")"
|
local magic_long="$(get_magic_long "$1")"
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_pre_upgrade() {
|
platform_pre_upgrade() {
|
||||||
local board=$(ar71xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
c-60|\
|
c-60|\
|
||||||
|
@ -727,7 +727,7 @@ platform_pre_upgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_nand_pre_upgrade() {
|
platform_nand_pre_upgrade() {
|
||||||
local board=$(ar71xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
rb*)
|
rb*)
|
||||||
|
@ -742,7 +742,7 @@ platform_nand_pre_upgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(ar71xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
all0258n)
|
all0258n)
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
# Copyright (C) 2015 OpenWrt.org
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/arc.sh
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case "$( arc_board_name )" in
|
case "$(board_name)" in
|
||||||
"arc-sdp"*)
|
"arc-sdp"*)
|
||||||
ucidef_set_interface_lan "eth0" "dhcp"
|
ucidef_set_interface_lan "eth0" "dhcp"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
# Copyright (C) 2016 OpenWrt.org
|
# Copyright (C) 2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/arc.sh
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case "$( arc_board_name )" in
|
case "$(board_name)" in
|
||||||
"arc-sdp"*)
|
"arc-sdp"*)
|
||||||
ucidef_set_interface_lan "eth0" "dhcp"
|
ucidef_set_interface_lan "eth0" "dhcp"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/at91.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case "$(at91_board_name)" in
|
case "$(board_name)" in
|
||||||
|
|
||||||
sama5d3_xplained)
|
sama5d3_xplained)
|
||||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||||
|
|
|
@ -8,10 +8,6 @@ get_magic_long_at() {
|
||||||
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%02x"'
|
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%02x"'
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_machine() {
|
|
||||||
cat /proc/device-tree/compatible | tr '\0' '\t' | cut -f 1
|
|
||||||
}
|
|
||||||
|
|
||||||
platform_flash_type() {
|
platform_flash_type() {
|
||||||
# On NAND devices "rootfs" is UBI volume, so won't be find in /proc/mtd
|
# On NAND devices "rootfs" is UBI volume, so won't be find in /proc/mtd
|
||||||
grep -q "\"rootfs\"" /proc/mtd && {
|
grep -q "\"rootfs\"" /proc/mtd && {
|
||||||
|
@ -23,7 +19,7 @@ platform_flash_type() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_expected_image() {
|
platform_expected_image() {
|
||||||
local machine=$(platform_machine)
|
local machine=$(board_name)
|
||||||
|
|
||||||
case "$machine" in
|
case "$machine" in
|
||||||
"dlink,dir-885l") echo "seama wrgac42_dlink.2015_dir885l"; return;;
|
"dlink,dir-885l") echo "seama wrgac42_dlink.2015_dir885l"; return;;
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
# Copyright (C) 2017 LEDE project
|
# Copyright (C) 2017 LEDE project
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/brcm2708.sh
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(brcm2708_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
rpi-2-b |\
|
rpi-2-b |\
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
# Copyright (C) 2015-2016 OpenWrt.org
|
# Copyright (C) 2015-2016 OpenWrt.org
|
||||||
# Copyright (C) 2017 LEDE project
|
# Copyright (C) 2017 LEDE project
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/brcm2708.sh
|
|
||||||
|
|
||||||
set_state() {
|
set_state() {
|
||||||
case "$(brcm2708_board_name)" in
|
case "$(board_name)" in
|
||||||
rpi-2-b |\
|
rpi-2-b |\
|
||||||
rpi-b-plus)
|
rpi-b-plus)
|
||||||
status_led="led1"
|
status_led="led1"
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
# Copyright (C) 2015-2016 OpenWrt.org
|
# Copyright (C) 2015-2016 OpenWrt.org
|
||||||
# Copyright (C) 2017 LEDE project
|
# Copyright (C) 2017 LEDE project
|
||||||
|
|
||||||
. /lib/brcm2708.sh
|
|
||||||
|
|
||||||
set_preinit_iface() {
|
set_preinit_iface() {
|
||||||
case "$(brcm2708_board_name)" in
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
case "$(board_name)" in
|
||||||
rpi-2-b |\
|
rpi-2-b |\
|
||||||
rpi-3-b |\
|
rpi-3-b |\
|
||||||
rpi-b |\
|
rpi-b |\
|
||||||
|
|
|
@ -6,12 +6,8 @@ get_magic_long_at() {
|
||||||
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
|
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_machine() {
|
|
||||||
grep "machine" /proc/cpuinfo | sed "s/.*:[ \t]*//"
|
|
||||||
}
|
|
||||||
|
|
||||||
platform_expected_image() {
|
platform_expected_image() {
|
||||||
local machine=$(platform_machine)
|
local machine=$(board_name)
|
||||||
|
|
||||||
case "$machine" in
|
case "$machine" in
|
||||||
"Netgear WGR614 V8") echo "chk U12H072T00_NETGEAR"; return;;
|
"Netgear WGR614 V8") echo "chk U12H072T00_NETGEAR"; return;;
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/brcm63xx.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case "$(brcm63xx_board_name)" in
|
case "$(board_name)" in
|
||||||
a4001n1)
|
a4001n1)
|
||||||
ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
|
ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
|
||||||
ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
|
ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/brcm63xx.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case "$(brcm63xx_board_name)" in
|
case "$(board_name)" in
|
||||||
|
|
||||||
cvg834g |\
|
cvg834g |\
|
||||||
evg2000 |\
|
evg2000 |\
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2007-2013 OpenWrt.org
|
# Copyright (C) 2007-2013 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/brcm63xx.sh
|
|
||||||
|
|
||||||
set_state() {
|
set_state() {
|
||||||
case "$(brcm63xx_board_name)" in
|
case "$(board_name)" in
|
||||||
a4001n1)
|
a4001n1)
|
||||||
status_led="A4001N1:green:power"
|
status_led="A4001N1:green:power"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -12,8 +12,6 @@ rt2x00_eeprom_extract() {
|
||||||
local count=$3
|
local count=$3
|
||||||
local mtd
|
local mtd
|
||||||
|
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
mtd=$(find_mtd_part $part)
|
mtd=$(find_mtd_part $part)
|
||||||
[ -n "$mtd" ] || \
|
[ -n "$mtd" ] || \
|
||||||
rt2x00_eeprom_die "no mtd device found for partition $part"
|
rt2x00_eeprom_die "no mtd device found for partition $part"
|
||||||
|
@ -24,9 +22,9 @@ rt2x00_eeprom_extract() {
|
||||||
|
|
||||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||||
|
|
||||||
. /lib/brcm63xx.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(brcm63xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"rt2x00.eeprom" )
|
"rt2x00.eeprom" )
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/brcm63xx.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
do_fixcrc() {
|
do_fixcrc() {
|
||||||
mtd fixtrx linux
|
mtd fixtrx linux
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$(brcm63xx_board_name)" in
|
case "$(board_name)" in
|
||||||
a4001n |\
|
a4001n |\
|
||||||
a4001n1 |\
|
a4001n1 |\
|
||||||
ar-5381u |\
|
ar-5381u |\
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/imx6.sh
|
|
||||||
|
|
||||||
board=$(imx6_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,8 @@
|
||||||
# Copyright (C) 2010-2015 OpenWrt.org
|
# Copyright (C) 2010-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/imx6.sh
|
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(imx6_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
*gw5*)
|
*gw5*)
|
||||||
|
@ -19,7 +17,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_pre_upgrade() {
|
platform_pre_upgrade() {
|
||||||
local board=$(imx6_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
*gw5*)
|
*gw5*)
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ipq806x.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(ipq806x_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
c2600)
|
c2600)
|
||||||
|
|
|
@ -5,12 +5,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ipq806x.sh
|
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(ipq806x_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
ap148 |\
|
ap148 |\
|
||||||
|
|
|
@ -38,11 +38,10 @@ ath10kcal_patch_mac() {
|
||||||
|
|
||||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||||
|
|
||||||
. /lib/ipq806x.sh
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board=$(ipq806x_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
|
|
|
@ -6,10 +6,10 @@ PHYNBR=${DEVPATH##*/phy}
|
||||||
|
|
||||||
[ -n $PHYNBR ] || exit 0
|
[ -n $PHYNBR ] || exit 0
|
||||||
|
|
||||||
. /lib/ipq806x.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board=$(ipq806x_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
c2600)
|
c2600)
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
START=97
|
START=97
|
||||||
boot() {
|
boot() {
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/ipq806x.sh
|
|
||||||
|
|
||||||
case $(ipq806x_board_name) in
|
case $(board_name) in
|
||||||
ea8500)
|
ea8500)
|
||||||
# make sure auto_recovery in uboot is always on
|
# make sure auto_recovery in uboot is always on
|
||||||
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
. /lib/ipq806x.sh
|
|
||||||
|
|
||||||
PART_NAME=firmware
|
PART_NAME=firmware
|
||||||
REQUIRE_IMAGE_METADATA=1
|
REQUIRE_IMAGE_METADATA=1
|
||||||
|
|
||||||
|
@ -11,9 +9,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(ipq806x_board_name)
|
case "$(board_name)" in
|
||||||
|
|
||||||
case "$board" in
|
|
||||||
ap148 |\
|
ap148 |\
|
||||||
ap-dk04.1-c1 |\
|
ap-dk04.1-c1 |\
|
||||||
d7800 |\
|
d7800 |\
|
||||||
|
@ -43,9 +39,7 @@ platform_do_upgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_nand_pre_upgrade() {
|
platform_nand_pre_upgrade() {
|
||||||
local board=$(ipq806x_board_name)
|
case "$(board_name)" in
|
||||||
|
|
||||||
case "$board" in
|
|
||||||
nbg6817)
|
nbg6817)
|
||||||
zyxel_do_upgrade "$1"
|
zyxel_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
. /lib/ixp4xx.sh
|
|
||||||
|
|
||||||
RAMFS_COPY_DATA="/lib/ixp4xx.sh"
|
|
||||||
|
|
||||||
CI_BLKSZ=65536
|
CI_BLKSZ=65536
|
||||||
CI_LDADR=0x00800000
|
CI_LDADR=0x00800000
|
||||||
|
|
||||||
|
@ -86,7 +82,7 @@ platform_do_upgrade_combined() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(ixp4xx_board_name)
|
local board=$(board_name)
|
||||||
local magic="$(get_magic_word "$1")"
|
local magic="$(get_magic_word "$1")"
|
||||||
local partitions=$(platform_find_partitions)
|
local partitions=$(platform_find_partitions)
|
||||||
local kernelpart=$(platform_find_kernelpart "${partitions#*:}")
|
local kernelpart=$(platform_find_kernelpart "${partitions#*:}")
|
||||||
|
@ -127,7 +123,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(ixp4xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
v "board=$board"
|
v "board=$board"
|
||||||
case "$board" in
|
case "$board" in
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/kirkwood.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(kirkwood_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
"dockstar")
|
"dockstar")
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
. /lib/kirkwood.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(kirkwood_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
"dockstar"|\
|
"dockstar"|\
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
# Copyright (C) 2014 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/kirkwood.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
case $(kirkwood_board_name) in
|
case $(board_name) in
|
||||||
dockstar|\
|
dockstar|\
|
||||||
goflexhome|\
|
goflexhome|\
|
||||||
goflexnet)
|
goflexnet)
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
START=97
|
START=97
|
||||||
boot() {
|
boot() {
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/kirkwood.sh
|
|
||||||
|
|
||||||
case $(kirkwood_board_name) in
|
case $(board_name) in
|
||||||
linksys-audi|linksys-viper)
|
linksys-audi|linksys-viper)
|
||||||
# make sure auto_recovery in uboot is always on
|
# make sure auto_recovery in uboot is always on
|
||||||
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
||||||
|
|
|
@ -3,14 +3,13 @@
|
||||||
START=98
|
START=98
|
||||||
boot() {
|
boot() {
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/kirkwood.sh
|
|
||||||
|
|
||||||
#configuring lm85 onboard temp/fan controller to run the fan on its own
|
#configuring lm85 onboard temp/fan controller to run the fan on its own
|
||||||
#for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
|
#for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
|
||||||
|
|
||||||
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
||||||
|
|
||||||
case $(kirkwood_board_name) in
|
case $(board_name) in
|
||||||
nsa310b)
|
nsa310b)
|
||||||
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||||||
echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes
|
echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
. /lib/kirkwood.sh
|
|
||||||
|
|
||||||
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
||||||
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
[ "$#" -gt 1 ] && return 1
|
[ "$#" -gt 1 ] && return 1
|
||||||
local board="$(kirkwood_board_name)"
|
local board="$(board_name)"
|
||||||
local magic="$(get_magic_long "$1")"
|
local magic="$(get_magic_long "$1")"
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
|
@ -28,7 +26,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board="$(kirkwood_board_name)"
|
local board="$(board_name)"
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
"linksys-audi"|\
|
"linksys-audi"|\
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/mcs814x.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(mcs814x_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
dlan-usb-extender)
|
dlan-usb-extender)
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
# Copyright (C) 2014-2015 OpenWrt.org
|
# Copyright (C) 2014-2015 OpenWrt.org
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/mpc85xx.sh
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(mpc85xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
tl-wdr4900-v1)
|
tl-wdr4900-v1)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2013 OpenWrt.org
|
# Copyright (C) 2013 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/mpc85xx.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
case $(mpc85xx_board_name) in
|
case $(board_name) in
|
||||||
tl-wdr4900-v1)
|
tl-wdr4900-v1)
|
||||||
status_led="tp-link:blue:system"
|
status_led="tp-link:blue:system"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -13,9 +13,6 @@ ath9k_eeprom_extract() {
|
||||||
local count=$3
|
local count=$3
|
||||||
local mtd
|
local mtd
|
||||||
|
|
||||||
. /lib/functions.sh
|
|
||||||
. /lib/functions/system.sh
|
|
||||||
|
|
||||||
mtd=$(find_mtd_chardev $part)
|
mtd=$(find_mtd_chardev $part)
|
||||||
[ -n "$mtd" ] || \
|
[ -n "$mtd" ] || \
|
||||||
ath9k_eeprom_die "no mtd device found for partition $part"
|
ath9k_eeprom_die "no mtd device found for partition $part"
|
||||||
|
@ -29,9 +26,6 @@ tpl_set_wireless_mac()
|
||||||
local offset=$1
|
local offset=$1
|
||||||
local mac
|
local mac
|
||||||
|
|
||||||
. /lib/functions.sh
|
|
||||||
. /lib/functions/system.sh
|
|
||||||
|
|
||||||
mac=$(mtd_get_mac_binary u-boot 326656)
|
mac=$(mtd_get_mac_binary u-boot 326656)
|
||||||
mac=$(macaddr_add $mac $offset)
|
mac=$(macaddr_add $mac $offset)
|
||||||
|
|
||||||
|
@ -40,9 +34,10 @@ tpl_set_wireless_mac()
|
||||||
|
|
||||||
[ -e $FW_FILE ] && exit 0
|
[ -e $FW_FILE ] && exit 0
|
||||||
|
|
||||||
. /lib/mpc85xx.sh
|
. /lib/functions.sh
|
||||||
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board=$(mpc85xx_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"pci_wmac0.eeprom")
|
"pci_wmac0.eeprom")
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
# Copyright (C) 2011 OpenWrt.org
|
# Copyright (C) 2011 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/mpc85xx.sh
|
|
||||||
|
|
||||||
PART_NAME=firmware
|
PART_NAME=firmware
|
||||||
RAMFS_COPY_DATA=/lib/mpc85xx.sh
|
|
||||||
|
|
||||||
tplink_get_hwid() {
|
tplink_get_hwid() {
|
||||||
local part
|
local part
|
||||||
|
@ -25,7 +22,7 @@ tplink_get_image_boot_size() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(mpc85xx_board_name)
|
local board=$(board_name)
|
||||||
local magic="$(get_magic_long "$1")"
|
local magic="$(get_magic_long "$1")"
|
||||||
|
|
||||||
[ "$#" -gt 1 ] && return 1
|
[ "$#" -gt 1 ] && return 1
|
||||||
|
@ -65,7 +62,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(mpc85xx_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(mvebu_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
armada-385-linksys-caiman)
|
armada-385-linksys-caiman)
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(mvebu_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
armada-385-linksys-caiman|\
|
armada-385-linksys-caiman|\
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
# Copyright (C) 2014-2016 OpenWrt.org
|
# Copyright (C) 2014-2016 OpenWrt.org
|
||||||
# Copyright (C) 2016 LEDE-Project.org
|
# Copyright (C) 2016 LEDE-Project.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
case $(mvebu_board_name) in
|
case $(board_name) in
|
||||||
armada-385-linksys-caiman)
|
armada-385-linksys-caiman)
|
||||||
status_led="caiman:white:power"
|
status_led="caiman:white:power"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
START=97
|
START=97
|
||||||
boot() {
|
boot() {
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
case $(mvebu_board_name) in
|
case $(board_name) in
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
||||||
# make sure auto_recovery in uboot is always on
|
# make sure auto_recovery in uboot is always on
|
||||||
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
[ ! -e /etc/config/wireless ] && exit 0
|
[ ! -e /etc/config/wireless ] && exit 0
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
board=$(mvebu_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
# Copyright (C) 2017 LEDE-Project.org
|
# Copyright (C) 2017 LEDE-Project.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/mvebu.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
board=$(mvebu_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
armada-xp-linksys-mamba)
|
armada-xp-linksys-mamba)
|
||||||
|
|
|
@ -7,9 +7,8 @@ preinit_set_mac_address() {
|
||||||
local mac
|
local mac
|
||||||
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
case $(mvebu_board_name) in
|
case $(board_name) in
|
||||||
armada-xp-linksys-mamba)
|
armada-xp-linksys-mamba)
|
||||||
mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||||
ifconfig eth0 hw ether $mac 2>/dev/null
|
ifconfig eth0 hw ether $mac 2>/dev/null
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
preinit_mount_syscfg() {
|
preinit_mount_syscfg() {
|
||||||
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
case $(mvebu_board_name) in
|
case $(board_name) in
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
||||||
needs_recovery=0
|
needs_recovery=0
|
||||||
syscfg_part=$(grep syscfg /proc/mtd |cut -c4)
|
syscfg_part=$(grep syscfg /proc/mtd |cut -c4)
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
# Copyright (C) 2016 LEDE-Project.org
|
# Copyright (C) 2016 LEDE-Project.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/mvebu.sh
|
|
||||||
|
|
||||||
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
||||||
RAMFS_COPY_DATA='/lib/mvebu.sh /etc/fw_env.config /var/lock/fw_printenv.lock'
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
||||||
REQUIRE_IMAGE_METADATA=1
|
REQUIRE_IMAGE_METADATA=1
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
|
@ -14,9 +12,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(mvebu_board_name)
|
case "$(board_name)" in
|
||||||
|
|
||||||
case "$board" in
|
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
||||||
platform_do_upgrade_linksys "$ARGV"
|
platform_do_upgrade_linksys "$ARGV"
|
||||||
;;
|
;;
|
||||||
|
@ -32,9 +28,7 @@ platform_do_upgrade() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
platform_copy_config() {
|
platform_copy_config() {
|
||||||
local board=$(mvebu_board_name)
|
case "$(board_name)" in
|
||||||
|
|
||||||
case "$board" in
|
|
||||||
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
||||||
platform_copy_config_linksys
|
platform_copy_config_linksys
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
# Copyright (C) 2013-2015 OpenWrt.org
|
# Copyright (C) 2013-2015 OpenWrt.org
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/mxs.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(mxs_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2013-2014 OpenWrt.org
|
# Copyright (C) 2013-2014 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/mxs.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
case $(mxs_board_name) in
|
case $(board_name) in
|
||||||
duckbill)
|
duckbill)
|
||||||
status_led="duckbill:green:status"
|
status_led="duckbill:green:status"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/oxnas.sh
|
|
||||||
|
|
||||||
board=$(oxnas_board_name)
|
board=$(board_name)
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case $board in
|
case $board in
|
||||||
|
|
|
@ -8,7 +8,7 @@ board_config_update
|
||||||
|
|
||||||
lan_mac=""
|
lan_mac=""
|
||||||
|
|
||||||
case "$(oxnas_board_name)" in
|
case "$(board_name)" in
|
||||||
kd20)
|
kd20)
|
||||||
lan_mac="$(legacy_boot_mac_adr)"
|
lan_mac="$(legacy_boot_mac_adr)"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2009-2013 OpenWrt.org
|
# Copyright (C) 2009-2013 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/oxnas.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
case $(oxnas_board_name) in
|
case $(board_name) in
|
||||||
akitio)
|
akitio)
|
||||||
status_led="akitio:red:status"
|
status_led="akitio:red:status"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
# Copyright (C) 2014 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/oxnas.sh
|
|
||||||
|
|
||||||
RAMFS_COPY_DATA=/lib/oxnas.sh
|
|
||||||
REQUIRE_IMAGE_METADATA=1
|
REQUIRE_IMAGE_METADATA=1
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(oxnas_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
[ "$ARGC" -gt 1 ] && return 1
|
[ "$ARGC" -gt 1 ] && return 1
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
# Copyright (C) 2010 OpenWrt.org
|
# Copyright (C) 2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/ppc40x.sh
|
|
||||||
|
|
||||||
PART_NAME=firmware
|
PART_NAME=firmware
|
||||||
RAMFS_COPY_DATA=/lib/ppc40x.sh
|
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(ppc40x_board_name)
|
local board=$(board_name)
|
||||||
local magic="$(get_magic_word "$1")"
|
local magic="$(get_magic_word "$1")"
|
||||||
|
|
||||||
[ "$#" -gt 1 ] && return 1
|
[ "$#" -gt 1 ] && return 1
|
||||||
|
@ -28,7 +25,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(ppc40x_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ramips.sh
|
|
||||||
|
|
||||||
set_usb_led() {
|
set_usb_led() {
|
||||||
ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
|
ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
|
||||||
|
@ -12,7 +11,7 @@ set_wifi_led() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/ramips.sh
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
|
@ -494,7 +493,7 @@ ramips_setup_macs()
|
||||||
}
|
}
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
ramips_setup_interfaces $board
|
ramips_setup_interfaces $board
|
||||||
ramips_setup_macs $board
|
ramips_setup_macs $board
|
||||||
board_config_flush
|
board_config_flush
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
. /lib/ramips.sh
|
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
ubnt-erx)
|
ubnt-erx)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2010-2013 OpenWrt.org
|
# Copyright (C) 2010-2013 OpenWrt.org
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
. /lib/functions/leds.sh
|
. /lib/functions/leds.sh
|
||||||
. /lib/ramips.sh
|
|
||||||
|
|
||||||
get_status_led() {
|
get_status_led() {
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case $board in
|
case $board in
|
||||||
3g150b|\
|
3g150b|\
|
||||||
|
|
|
@ -11,8 +11,6 @@ rt2x00_eeprom_extract() {
|
||||||
local count=$3
|
local count=$3
|
||||||
local mtd
|
local mtd
|
||||||
|
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
mtd=$(find_mtd_part $part)
|
mtd=$(find_mtd_part $part)
|
||||||
[ -n "$mtd" ] || \
|
[ -n "$mtd" ] || \
|
||||||
rt2x00_eeprom_die "no mtd device found for partition $part"
|
rt2x00_eeprom_die "no mtd device found for partition $part"
|
||||||
|
@ -35,10 +33,10 @@ rt2x00_eeprom_set_macaddr() {
|
||||||
FW="/lib/firmware/$FIRMWARE"
|
FW="/lib/firmware/$FIRMWARE"
|
||||||
[ -e "$FW" ] && exit 0
|
[ -e "$FW" ] && exit 0
|
||||||
|
|
||||||
. /lib/ramips.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$FIRMWARE" in
|
case "$FIRMWARE" in
|
||||||
"soc_wmac.eeprom")
|
"soc_wmac.eeprom")
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
. /lib/ramips.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
local board=$(ramips_board_name)
|
local board=$(board_name)
|
||||||
if [ $board = "sk-wb8" ]; then
|
if [ $board = "sk-wb8" ]; then
|
||||||
fw_setenv bootcount 0
|
fw_setenv bootcount 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (C) 2012 OpenWrt.org
|
# Copyright (C) 2012 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/ramips.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
fix_seama_header() {
|
fix_seama_header() {
|
||||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||||
|
@ -11,7 +11,7 @@ fix_seama_header() {
|
||||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
||||||
}
|
}
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
cy-swr1100 | \
|
cy-swr1100 | \
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
# that happens, so this needs to run very early during boot.
|
# that happens, so this needs to run very early during boot.
|
||||||
|
|
||||||
do_checksumming_disable() {
|
do_checksumming_disable() {
|
||||||
. /lib/ramips.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
local board=$(ramips_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
wnce2001)
|
wnce2001)
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
# Copyright (C) 2010 OpenWrt.org
|
# Copyright (C) 2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/ramips.sh
|
|
||||||
|
|
||||||
PART_NAME=firmware
|
PART_NAME=firmware
|
||||||
RAMFS_COPY_DATA=/lib/ramips.sh
|
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local board=$(ramips_board_name)
|
local board=$(board_name)
|
||||||
local magic="$(get_magic_long "$1")"
|
local magic="$(get_magic_long "$1")"
|
||||||
|
|
||||||
[ "$#" -gt 1 ] && return 1
|
[ "$#" -gt 1 ] && return 1
|
||||||
|
@ -275,7 +272,7 @@ platform_check_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_nand_pre_upgrade() {
|
platform_nand_pre_upgrade() {
|
||||||
local board=$(ramips_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
ubnt-erx|\
|
ubnt-erx|\
|
||||||
|
@ -286,7 +283,7 @@ platform_nand_pre_upgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(ramips_board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
hc5962|\
|
hc5962|\
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/system.sh
|
. /lib/functions/system.sh
|
||||||
. /lib/ramips.sh
|
|
||||||
|
|
||||||
partname=""
|
partname=""
|
||||||
offset=""
|
offset=""
|
||||||
NEW_MAC=
|
NEW_MAC=
|
||||||
YES=
|
YES=
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(board_name)
|
||||||
case $board in
|
case $board in
|
||||||
witi)
|
witi)
|
||||||
partname=factory
|
partname=factory
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
# Copyright (C) 2013-2015 OpenWrt.org
|
# Copyright (C) 2013-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/sunxi.sh
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
|
|
||||||
board_config_update
|
board_config_update
|
||||||
|
|
||||||
case "$( sunxi_board_name )" in
|
case "$(board_name)" in
|
||||||
"olimex,a20-olinuxino-micro")
|
"olimex,a20-olinuxino-micro")
|
||||||
ucidef_set_interface_lan 'wlan0'
|
ucidef_set_interface_lan 'wlan0'
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. /lib/sunxi.sh
|
|
||||||
|
|
||||||
do_b53_hack() {
|
do_b53_hack() {
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
# hack: enable switch on Lamobo R1 and reset counters
|
# hack: enable switch on Lamobo R1 and reset counters
|
||||||
case "$( sunxi_board_name )" in
|
case "$(board_name)" in
|
||||||
"lamobo,lamobo-r1")
|
"lamobo,lamobo-r1")
|
||||||
ifconfig eth0 up
|
ifconfig eth0 up
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Loading…
Reference in a new issue