[U-Boot] [PATCH] rpi: set ethaddr as well

Lubomir Rintel lkundrak at v3.sk
Wed Feb 3 16:08:09 CET 2016


Let's set "ethaddr" when we get the ethernet address too, so that
fdt_fixup_ethernet() sets the address in the device tree and the Linux
driver can pick it up.

Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
---
The related Linux kernel change submitted here:
http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003207.html

 board/raspberrypi/rpi/rpi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index b344362..d7ad79d 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -254,6 +254,9 @@ static void set_usbethaddr(void)
 
 	eth_setenv_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac);
 
+	if (!getenv("ethaddr"))
+		setenv("ethaddr", getenv("usbethaddr"));
+
 	return;
 }
 
-- 
2.5.0



More information about the U-Boot mailing list