Skip to content

Fix issues with ethernet in u-boot on rpi 3b+ #1430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: kirkstone
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 407da149c24157fe0119f6ddde55a8a89b2482b3 Mon Sep 17 00:00:00 2001
From: Jakub Szczudlo <jakubszczudlo40@gmail.com>
Date: Tue, 4 Mar 2025 22:53:53 +0100
Subject: [PATCH] Fix problems with ethernet on raspberrypi 3b+

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
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
device of sequence number=1
---
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 3fbec3674c1..921f55799c1 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -363,7 +363,10 @@ static void set_usbethaddr(void)
eth_env_set_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac);

if (!env_get("ethaddr"))
+ {
env_set("ethaddr", env_get("usbethaddr"));
+ env_set("eth1addr", env_get("usbethaddr"));
+ }

return;
}
--
2.43.0

3 changes: 2 additions & 1 deletion recipes-bsp/u-boot/u-boot_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ SRC_URI:append:rpi = " \
file://fw_env.config \
"

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

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

Expand Down