Skip to content

Commit c42e6c3

Browse files
JakubSzczudloagherzan
authored andcommitted
Fix issues with ethernet in u-boot on rpi 3b+
1 parent 39e5dfd commit c42e6c3

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 407da149c24157fe0119f6ddde55a8a89b2482b3 Mon Sep 17 00:00:00 2001
2+
From: Jakub Szczudlo <jakubszczudlo40@gmail.com>
3+
Date: Tue, 4 Mar 2025 22:53:53 +0100
4+
Subject: [PATCH] Fix problems with ethernet on raspberrypi 3b+
5+
6+
When initializing network devices on raspberry pi 3b+ the lan78xx_eth get seq 1. Because of that this network device doesn't get MAC address from BCM2835_MBOX and fail
7+
to bind device with driver and make using TFTP impossible without debugging. To address this issue and don't make much changes in uboot we can also add MAC address for
8+
device of sequence number=1
9+
---
10+
board/raspberrypi/rpi/rpi.c | 3 +++
11+
1 file changed, 3 insertions(+)
12+
13+
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
14+
index 3fbec3674c1..921f55799c1 100644
15+
--- a/board/raspberrypi/rpi/rpi.c
16+
+++ b/board/raspberrypi/rpi/rpi.c
17+
@@ -363,7 +363,10 @@ static void set_usbethaddr(void)
18+
eth_env_set_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac);
19+
20+
if (!env_get("ethaddr"))
21+
+ {
22+
env_set("ethaddr", env_get("usbethaddr"));
23+
+ env_set("eth1addr", env_get("usbethaddr"));
24+
+ }
25+
26+
return;
27+
}
28+
--
29+
2.43.0
30+

recipes-bsp/u-boot/u-boot_%.bbappend

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ SRC_URI:append:rpi = " \
44
file://fw_env.config \
55
"
66

7-
SRC_URI:append:rpi = " file://0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch"
7+
SRC_URI:append:rpi = " file://0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch \
8+
file://0001-Fix-problems-with-ethernet-on-raspberrypi-3b+.patch "
89

910
DEPENDS:append:rpi = " u-boot-default-script"
1011

0 commit comments

Comments
 (0)