aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/03_gpio_switches3
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh4
-rw-r--r--target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom6
-rwxr-xr-xtarget/linux/ramips/base-files/etc/init.d/bootcount4
-rw-r--r--target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header4
-rw-r--r--target/linux/ramips/base-files/lib/preinit/04_handle_checksumming4
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh9
-rwxr-xr-xtarget/linux/ramips/base-files/sbin/fixup-mac-address3
10 files changed, 17 insertions, 26 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 61fbf0f3f3..83141dedd8 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -1,7 +1,6 @@
#!/bin/sh
. /lib/functions/uci-defaults.sh
-. /lib/ramips.sh
set_usb_led() {
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
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index f6129b527a..78ba10342b 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -1,7 +1,6 @@
#!/bin/sh
. /lib/functions.sh
-. /lib/ramips.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
@@ -494,7 +493,7 @@ ramips_setup_macs()
}
board_config_update
-board=$(ramips_board_name)
+board=$(board_name)
ramips_setup_interfaces $board
ramips_setup_macs $board
board_config_flush
diff --git a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
index 859dfb31f5..a847a64d6b 100755
--- a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
@@ -1,11 +1,10 @@
#!/bin/sh
. /lib/functions/uci-defaults.sh
-. /lib/ramips.sh
board_config_update
-board=$(ramips_board_name)
+board=$(board_name)
case "$board" in
ubnt-erx)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 0f4e646ce1..531c8e055f 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -1,11 +1,11 @@
#!/bin/sh
# Copyright (C) 2010-2013 OpenWrt.org
+. /lib/functions.sh
. /lib/functions/leds.sh
-. /lib/ramips.sh
get_status_led() {
- board=$(ramips_board_name)
+ board=$(board_name)
case $board in
3g150b|\
diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index b44bae90bb..1e25643cb7 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -11,8 +11,6 @@ rt2x00_eeprom_extract() {
local count=$3
local mtd
- . /lib/functions.sh
-
mtd=$(find_mtd_part $part)
[ -n "$mtd" ] || \
rt2x00_eeprom_die "no mtd device found for partition $part"
@@ -35,10 +33,10 @@ rt2x00_eeprom_set_macaddr() {
FW="/lib/firmware/$FIRMWARE"
[ -e "$FW" ] && exit 0
-. /lib/ramips.sh
+. /lib/functions.sh
. /lib/functions/system.sh
-board=$(ramips_board_name)
+board=$(board_name)
case "$FIRMWARE" in
"soc_wmac.eeprom")
diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount
index a9fdd666c3..0f260fa3fc 100755
--- a/target/linux/ramips/base-files/etc/init.d/bootcount
+++ b/target/linux/ramips/base-files/etc/init.d/bootcount
@@ -3,9 +3,9 @@
START=99
start() {
- . /lib/ramips.sh
+ . /lib/functions.sh
- local board=$(ramips_board_name)
+ local board=$(board_name)
if [ $board = "sk-wb8" ]; then
fw_setenv bootcount 0
fi
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header
index f8d408deda..9533aed475 100644
--- a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header
+++ b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-seama-header
@@ -3,7 +3,7 @@
# Copyright (C) 2012 OpenWrt.org
#
-. /lib/ramips.sh
+. /lib/functions.sh
fix_seama_header() {
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
}
-board=$(ramips_board_name)
+board=$(board_name)
case "$board" in
cy-swr1100 | \
diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_checksumming b/target/linux/ramips/base-files/lib/preinit/04_handle_checksumming
index 057fe45444..007abf79f6 100644
--- a/target/linux/ramips/base-files/lib/preinit/04_handle_checksumming
+++ b/target/linux/ramips/base-files/lib/preinit/04_handle_checksumming
@@ -6,9 +6,9 @@
# that happens, so this needs to run very early during boot.
do_checksumming_disable() {
- . /lib/ramips.sh
+ . /lib/functions.sh
- local board=$(ramips_board_name)
+ local board=$(board_name)
case "$board" in
wnce2001)
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 9b5da57146..e0a260216d 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -2,13 +2,10 @@
# Copyright (C) 2010 OpenWrt.org
#
-. /lib/ramips.sh
-
PART_NAME=firmware
-RAMFS_COPY_DATA=/lib/ramips.sh
platform_check_image() {
- local board=$(ramips_board_name)
+ local board=$(board_name)
local magic="$(get_magic_long "$1")"
[ "$#" -gt 1 ] && return 1
@@ -275,7 +272,7 @@ platform_check_image() {
}
platform_nand_pre_upgrade() {
- local board=$(ramips_board_name)
+ local board=$(board_name)
case "$board" in
ubnt-erx|\
@@ -286,7 +283,7 @@ platform_nand_pre_upgrade() {
}
platform_do_upgrade() {
- local board=$(ramips_board_name)
+ local board=$(board_name)
case "$board" in
hc5962|\
diff --git a/target/linux/ramips/base-files/sbin/fixup-mac-address b/target/linux/ramips/base-files/sbin/fixup-mac-address
index 900fb7d086..98264c082e 100755
--- a/target/linux/ramips/base-files/sbin/fixup-mac-address
+++ b/target/linux/ramips/base-files/sbin/fixup-mac-address
@@ -1,14 +1,13 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/system.sh
-. /lib/ramips.sh
partname=""
offset=""
NEW_MAC=
YES=
-board=$(ramips_board_name)
+board=$(board_name)
case $board in
witi)
partname=factory