+++ /dev/null
-#!/bin/sh
-
-. /lib/functions.sh
-. /lib/functions/system.sh
-
-preinit_set_mac_address() {
- case $(board_name) in
- hiveap-330)
- mac_wan=$(mtd_get_mac_binary hw-info 0)
- [ -n "$mac_wan" ] && ifconfig eth0 hw ether "$mac_wan"
- mac_lan=$(macaddr_add $(mtd_get_mac_binary hw-info 0) +1)
- [ -n "$mac_lan" ] && ifconfig eth1 hw ether "$mac_lan"
- ;;
- esac
-}
-
-boot_hook_add preinit_main preinit_set_mac_address
compatible = "aerohive,hiveap-330";
chosen {
- bootargs = "console=ttyS0,9600";
- bootargs-override = "console=ttyS0,9600 noinitrd";
+ bootargs-override = "console=ttyS0,9600";
};
memory {
partition@40000 {
reg = <0x40000 0x40000>;
- label = "initramfs";
+ label = "initrd";
};
partition@80000 {
read-only;
};
- partition@3f00000 {
+ hwinfo: partition@3f00000 {
reg = <0x3f00000 0x20000>;
label = "hw-info";
read-only;
status = "okay";
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
-
+ mtd-mac-address = <&hwinfo 0>;
};
enet1: ethernet@b1000 {
status = "okay";
phy-handle = <&phy1>;
phy-connection-type = "rgmii-id";
+ mtd-mac-address = <&hwinfo 0>;
+ mtd-mac-address-increment = <1>;
};
gpio0: gpio-controller@fc00 {