Initial commit
This commit is contained in:
28
target/linux/ar7/base-files/etc/board.d/02_network
Executable file
28
target/linux/ar7/base-files/etc/board.d/02_network
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175A/1:00" -o \
|
||||
-e "/sys/bus/mdio_bus/drivers/IC+ IP17xx/1:00" ] && \
|
||||
[ -x /sbin/swconfig ];
|
||||
then
|
||||
ucidef_add_switch "eth0" \
|
||||
"0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0"
|
||||
|
||||
elif [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/1:00" -o \
|
||||
-e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/1:10" ];
|
||||
then
|
||||
ucidef_set_interface_lan "eth0.1"
|
||||
|
||||
elif [ -d "/sys/class/net/eth1" ]; then
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
|
||||
else
|
||||
ucidef_set_interface_lan "eth0"
|
||||
fi
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
32
target/linux/ar7/base-files/etc/diag.sh
Normal file
32
target/linux/ar7/base-files/etc/diag.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2007-2013 OpenWrt.org
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
|
||||
get_status_led() {
|
||||
[ -d "/sys/class/leds/status" ] && status_led="status"
|
||||
[ -d "/sys/class/leds/power:green" ] && status_led="power:green"
|
||||
}
|
||||
|
||||
set_state() {
|
||||
get_status_led
|
||||
|
||||
case "$1" in
|
||||
preinit)
|
||||
status_led_blink_preinit
|
||||
;;
|
||||
failsafe)
|
||||
status_led_blink_failsafe
|
||||
;;
|
||||
preinit_regular)
|
||||
status_led_blink_preinit_regular
|
||||
;;
|
||||
done)
|
||||
status_led_on
|
||||
|
||||
[ "$status_led" = "power:green" ] && {
|
||||
led_off "power:red"
|
||||
}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
13
target/linux/ar7/base-files/etc/init.d/adam2
Executable file
13
target/linux/ar7/base-files/etc/init.d/adam2
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# ADAM2 patcher for Netgear DG834 and compatible
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
START=00
|
||||
start() {
|
||||
MD5="$(md5sum /dev/mtdblock0 | awk '{print $1}')"
|
||||
[ "$MD5" = "0530bfdf00ec155f4182afd70da028c1" ] && {
|
||||
mtd unlock adam2
|
||||
/sbin/adam2patcher /dev/mtdblock0
|
||||
}
|
||||
rm -f /etc/rc.d/S${START}adam2 /etc/init.d/adam2 /sbin/adam2patcher >&- 2>&-
|
||||
}
|
||||
Reference in New Issue
Block a user