Initial commit
This commit is contained in:
31
target/linux/lantiq/ase/base-files/etc/board.d/01_leds
Normal file
31
target/linux/lantiq/ase/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright (C) 2011-2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
led_dsl="$(get_dt_led dsl)"
|
||||
[ -n "$led_dsl" ] && {
|
||||
led_internet="$(get_dt_led internet)"
|
||||
if [ -n "$led_internet" ]; then
|
||||
ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0"
|
||||
ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan"
|
||||
else
|
||||
ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0"
|
||||
fi
|
||||
}
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
allnet,all0333cj)
|
||||
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0.1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
55
target/linux/lantiq/ase/base-files/etc/board.d/02_network
Normal file
55
target/linux/lantiq/ase/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (C) 2011-2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
. /lib/functions/lantiq.sh
|
||||
|
||||
lantiq_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
*)
|
||||
ucidef_set_interface_lan 'eth0'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
lantiq_setup_dsl()
|
||||
{
|
||||
local board="$1"
|
||||
local annex="b"
|
||||
|
||||
case "$board" in
|
||||
esac
|
||||
|
||||
lantiq_setup_dsl_helper "$annex"
|
||||
}
|
||||
|
||||
lantiq_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
local lan_mac=""
|
||||
local wan_mac=""
|
||||
|
||||
case "$board" in
|
||||
allnet,all0333cj)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
|
||||
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
lantiq_setup_interfaces $board
|
||||
lantiq_setup_dsl $board
|
||||
lantiq_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (C) 2020 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/migrations.sh
|
||||
|
||||
remove_devicename_leds
|
||||
|
||||
migrations_apply system
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user