diff options
Diffstat (limited to 'target/linux/bcm53xx/base-files')
3 files changed, 34 insertions, 5 deletions
diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 822320c0a6..c2e5afc5ed 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -22,6 +22,7 @@ bcm53xx_setup_interfaces() luxul,xap-1610-v1) ucidef_set_interface_lan "poe lan" "dhcp" ;; + meraki,mr26 | \ meraki,mr32) ucidef_set_interface_lan "poe" "dhcp" ;; @@ -58,6 +59,11 @@ bcm53xx_setup_macs() etXmacaddr=$(nvram get et0macaddr) offset=5 ;; + meraki,mr26) + label_mac="$(mtd_get_mac_binary_ubi board-config 0x66)" + ucidef_set_interface_macaddr "lan" "$label_mac" + ucidef_set_label_macaddr "$label_mac" + ;; *) etXmacaddr=$(nvram get et0macaddr) offset=1 diff --git a/target/linux/bcm53xx/base-files/etc/hotplug.d/ieee80211/10-fix-mac-address b/target/linux/bcm53xx/base-files/etc/hotplug.d/ieee80211/10-fix-mac-address new file mode 100644 index 0000000000..c1c56a10f3 --- /dev/null +++ b/target/linux/bcm53xx/base-files/etc/hotplug.d/ieee80211/10-fix-mac-address @@ -0,0 +1,18 @@ +#!/bin/ash + +[ "$ACTION" = "add" ] || exit 0 + +PHYNBR=${DEVPATH##*/phy} + +[ -n $PHYNBR ] || exit 0 + +. /lib/functions.sh +. /lib/functions/system.sh + +board=$(board_name) + +case "$board" in +meraki,mr26) + macaddr_add "$(macaddr_setbit_la $(mtd_get_mac_binary_ubi 'board-config' 0x66))" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress + ;; +esac diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 62a36dac49..3ebde77d3f 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -193,12 +193,16 @@ platform_other_check_image() { } platform_check_image() { - case "$(board_name)" in + local board + + board="$(board_name)" + case "$board" in + # Ideally, REQUIRE_IMAGE_METADATA=1 would suffice + # but this would require converting all other + # devices too. + meraki,mr26 | \ meraki,mr32) - # Ideally, REQUIRE_IMAGE_METADATA=1 would suffice - # but this would require converting all other - # devices too. - nand_do_platform_check meraki-mr32 "$1" + nand_do_platform_check "${board//,/_}" "$1" return $? ;; *) @@ -394,6 +398,7 @@ platform_other_do_upgrade() { platform_do_upgrade() { case "$(board_name)" in + meraki,mr26 | \ meraki,mr32) CI_KERNPART="part.safe" nand_do_upgrade "$1" |