ramips: use the new macaddr_* helpers instead of maccalc
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35615
This commit is contained in:
parent
5a8c63b47e
commit
7fd8525853
3 changed files with 14 additions and 19 deletions
|
@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/target.mk
|
||||||
DEFAULT_PACKAGES+=\
|
DEFAULT_PACKAGES+=\
|
||||||
kmod-leds-gpio kmod-input-core kmod-input-polldev \
|
kmod-leds-gpio kmod-input-core kmod-input-polldev \
|
||||||
kmod-input-gpio-keys-polled kmod-button-hotplug \
|
kmod-input-gpio-keys-polled kmod-button-hotplug \
|
||||||
kmod-rt2800-pci wpad-mini maccalc swconfig
|
kmod-rt2800-pci wpad-mini swconfig
|
||||||
|
|
||||||
define Target/Description
|
define Target/Description
|
||||||
Build firmware images for Ralink RT288x/RT3xxx based boards.
|
Build firmware images for Ralink RT288x/RT3xxx based boards.
|
||||||
|
|
|
@ -4,11 +4,6 @@
|
||||||
. /lib/ramips.sh
|
. /lib/ramips.sh
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
|
|
||||||
if [ ! -x /usr/sbin/maccalc ]; then
|
|
||||||
echo "$0: maccalc not found!"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
ramips_setup_rt3x5x_vlans()
|
ramips_setup_rt3x5x_vlans()
|
||||||
{
|
{
|
||||||
if [ ! -x /sbin/swconfig ]; then
|
if [ ! -x /sbin/swconfig ]; then
|
||||||
|
@ -165,31 +160,31 @@ ramips_setup_macs()
|
||||||
sl-r7205 | \
|
sl-r7205 | \
|
||||||
wl-351)
|
wl-351)
|
||||||
lan_mac=$(mtd_get_mac_binary factory 4)
|
lan_mac=$(mtd_get_mac_binary factory 4)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
w306r-v20)
|
w306r-v20)
|
||||||
lan_mac=$(mtd_get_mac_binary factory 4)
|
lan_mac=$(mtd_get_mac_binary factory 4)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 5)
|
wan_mac=$(macaddr_add "$lan_mac" 5)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
rt-n13u | \
|
rt-n13u | \
|
||||||
fonera20n)
|
fonera20n)
|
||||||
lan_mac=$(mtd_get_mac_binary factory 40)
|
lan_mac=$(mtd_get_mac_binary factory 40)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dir-300-b1 |\
|
dir-300-b1 |\
|
||||||
dir-300-b2 |\
|
dir-300-b2 |\
|
||||||
dir-600-b1)
|
dir-600-b1)
|
||||||
lan_mac=$(mtd_get_mac_binary devdata 16388)
|
lan_mac=$(mtd_get_mac_binary devdata 16388)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dir-620-a1)
|
dir-620-a1)
|
||||||
lan_mac=$(mtd_get_mac_binary factory 4)
|
lan_mac=$(mtd_get_mac_binary factory 4)
|
||||||
lan_mac=$(maccalc or "$lan_mac" "02:00:00:00:00:00")
|
lan_mac=$(macaddr_setbit_la "$lan_mac")
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dir-645)
|
dir-645)
|
||||||
|
@ -200,7 +195,7 @@ ramips_setup_macs()
|
||||||
esr-9753 | \
|
esr-9753 | \
|
||||||
ur-336un)
|
ur-336un)
|
||||||
lan_mac=$(mtd_get_mac_binary devdata 16388)
|
lan_mac=$(mtd_get_mac_binary devdata 16388)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
nbg-419n | \
|
nbg-419n | \
|
||||||
|
@ -215,7 +210,7 @@ ramips_setup_macs()
|
||||||
|
|
||||||
f5d8235-v2)
|
f5d8235-v2)
|
||||||
lan_mac=$(mtd_get_mac_binary "u-boot" 262148)
|
lan_mac=$(mtd_get_mac_binary "u-boot" 262148)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
rt-n56u)
|
rt-n56u)
|
||||||
|
@ -225,12 +220,12 @@ ramips_setup_macs()
|
||||||
|
|
||||||
tew-691gr)
|
tew-691gr)
|
||||||
lan_mac=$(mtd_get_mac_binary factory 40)
|
lan_mac=$(mtd_get_mac_binary factory 40)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 3)
|
wan_mac=$(macaddr_add "$lan_mac" 3)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
tew-692gr)
|
tew-692gr)
|
||||||
lan_mac=$(mtd_get_mac_binary factory 40)
|
lan_mac=$(mtd_get_mac_binary factory 40)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 4)
|
wan_mac=$(macaddr_add "$lan_mac" 4)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
all0239-3g | \
|
all0239-3g | \
|
||||||
|
@ -242,7 +237,7 @@ ramips_setup_macs()
|
||||||
|
|
||||||
wl341v3)
|
wl341v3)
|
||||||
lan_mac=$(mtd_get_mac_binary board-nvram 65440)
|
lan_mac=$(mtd_get_mac_binary board-nvram 65440)
|
||||||
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
wli-tx4-ag300n)
|
wli-tx4-ag300n)
|
||||||
|
|
|
@ -27,7 +27,7 @@ preinit_set_mac_address() {
|
||||||
rt-n56u |\
|
rt-n56u |\
|
||||||
sl-r7205)
|
sl-r7205)
|
||||||
mac=$(mtd_get_mac_binary factory 4)
|
mac=$(mtd_get_mac_binary factory 4)
|
||||||
mac=$(maccalc or "$mac" "02:00:00:00:00:00")
|
mac=$(macaddr_setbit_la "$mac")
|
||||||
ifconfig eth0 hw ether $mac 2>/dev/null
|
ifconfig eth0 hw ether $mac 2>/dev/null
|
||||||
;;
|
;;
|
||||||
dir-300-b1 |\
|
dir-300-b1 |\
|
||||||
|
@ -38,7 +38,7 @@ preinit_set_mac_address() {
|
||||||
;;
|
;;
|
||||||
dir-645)
|
dir-645)
|
||||||
mac=$(mtd_get_mac_ascii nvram lanmac)
|
mac=$(mtd_get_mac_ascii nvram lanmac)
|
||||||
mac=$(maccalc or "$mac" "02:00:00:00:00:00")
|
mac=$(macaddr_setbit_la "$mac")
|
||||||
ifconfig eth0 hw ether $mac 2>/dev/null
|
ifconfig eth0 hw ether $mac 2>/dev/null
|
||||||
;;
|
;;
|
||||||
dap-1350)
|
dap-1350)
|
||||||
|
|
Loading…
Reference in a new issue