diff options
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib')
-rw-r--r-- | target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh | 14 | ||||
-rw-r--r-- | target/linux/ipq40xx/base-files/lib/upgrade/platform.sh | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh new file mode 100644 index 0000000000..1acd7366c8 --- /dev/null +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +. /lib/functions.sh + +preinit_set_mac_address() { + case $(board_name) in + meraki,mr33) + mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 102) + [ -n "$mac_lan" ] && ip link set dev eth0 address "$mac_lan" + ;; + esac +} + +boot_hook_add preinit_main preinit_set_mac_address diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 261c468813..52aa2321e3 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -40,6 +40,10 @@ platform_do_upgrade() { PART_NAME="inactive" platform_do_upgrade_openmesh "$ARGV" ;; + meraki,mr33) + CI_KERNPART="part.safe" + nand_do_upgrade "$1" + ;; *) default_do_upgrade "$ARGV" ;; @@ -52,6 +56,9 @@ platform_nand_pre_upgrade() { CI_UBIPART="UBI_DEV" CI_KERNPART="linux" ;; + meraki,mr33) + CI_KERNPART="part.safe" + ;; esac } |