diff options
Diffstat (limited to 'target/linux/ath79/nand/base-files/lib')
-rw-r--r-- | target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh new file mode 100644 index 0000000000..fdd8381f56 --- /dev/null +++ b/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh @@ -0,0 +1,14 @@ +. /lib/functions.sh +. /lib/functions/system.sh + +preinit_set_mac_address() { + case $(board_name) in + zyxel,nbg6716) + ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr) + ip link set dev eth0 address $(macaddr_add $ethaddr 2) + ip link set dev eth1 address $(macaddr_add $ethaddr 3) + ;; + esac +} + +boot_hook_add preinit_main preinit_set_mac_address |