Bug 278816 - FreeBSD RPI does not boot on Raspberry Pi Zero 2
Summary: FreeBSD RPI does not boot on Raspberry Pi Zero 2
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 14.1-STABLE
Hardware: arm Any
: --- Affects Only Me
Assignee: Alexander Ziaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-06 17:58 UTC by Jürgen Weber
Modified: 2025-11-06 16:58 UTC (History)
5 users (show)

See Also:


Attachments
Patch for release/arm64/RPI.conf (840 bytes, patch)
2025-10-06 08:00 UTC, MIHIRA Sanpei Yoshiro
sanpei: maintainer-approval?
Details | Diff
Patch for release/arm64/RPI.conf, zero 2(without W model) (872 bytes, patch)
2025-10-11 06:45 UTC, MIHIRA Sanpei Yoshiro
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Weber 2024-05-06 17:58:35 UTC
FreeBSD-14.1-BETA1-arm64-aarch64-RPI.img.xz does not boot on Raspberry Pi Zero 2, systems shows the rainbow screen.

This is easily fixed by copying bcm2710-rpi-2-b.dtb to bcm2710-rpi-zero-2.dtb

But this fix should not be necessary, the dtb for zero 2 should already be in the downloaded image.

see
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261147
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-05-12 21:58:34 UTC
^Triage: does this problem recur with more recent versions of FreeBSD?
Comment 4 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-10-06 08:00:35 UTC
Created attachment 264341 [details]
Patch for release/arm64/RPI.conf

I have Raspberry PI zero 2W.

I hope this dtb file will be included 15.0-RELEASE.
Comment 5 Mark Millard 2025-10-07 00:32:46 UTC
The msdosfs is missing the required *.dtb file for the
RPi-0-2W model, it needs a copy of bcm2710-rpi-zero-2-w.dtb
from:

/usr/local/share/rpi-firmware/bcm2710-rpi-zero-2-w.dtb

(that results from installing sysutils/rpi-firmware first).

Untimately, the /usr/src/release/ materials need to
include putting the bcm2710-rpi-zero-2-w.dtb in the
msdosfs it builds for arm64 RPi* releases and snapshots.

(The above is a copy of an old note of  mine from another
defect report.)
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-10-08 16:35:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e41e099ef199de096abd9a93289bdacfd83a5f48

commit e41e099ef199de096abd9a93289bdacfd83a5f48
Author:     Yoshiro MIHIRA <sanpei@sanpei.org>
AuthorDate: 2025-10-06 07:54:08 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-10-08 16:34:25 +0000

    release/RPI: Add RPI Zero 2W device tree blob dtb

    Enable Pi 02W support on the release SD card images by including the
    device tree.

    PR:             278816
    MFC after:      3 days
    Approved by:    cperciva (re)

 release/arm64/RPI.conf | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 7 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-10-10 12:39:38 UTC
I tried the newest 16-CURRENT SD Card image and it worked perfectly[OK].

FreeBSD-16.0-CURRENT-arm64-aarch64-RPI-20251010-0dc634d48fcc-281019.img

I'd be grateful if you could MFC this change to 14-stable and 13-stable, in addition to 15.0.
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-10-10 16:31:37 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=89cee021a790974e8d184554f3a5de4ae8317748

commit 89cee021a790974e8d184554f3a5de4ae8317748
Author:     Yoshiro MIHIRA <sanpei@sanpei.org>
AuthorDate: 2025-10-06 07:54:08 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-10-10 16:15:01 +0000

    release/RPI: Add RPI Zero 2W device tree blob dtb

    Enable Pi 02W support on the release SD card images by including the
    device tree.

    PR:             278816
    MFC after:      3 days
    Approved by:    cperciva (re)

    (cherry picked from commit e41e099ef199de096abd9a93289bdacfd83a5f48)

 release/arm64/RPI.conf | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-10-10 17:13:44 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=fce5d401a80377b8f2195280051348958d81698c

commit fce5d401a80377b8f2195280051348958d81698c
Author:     Yoshiro MIHIRA <sanpei@sanpei.org>
AuthorDate: 2025-10-06 07:54:08 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-10-10 17:08:50 +0000

    release/RPI: Add RPI Zero 2W device tree blob dtb

    Enable Pi 02W support on the release SD card images by including the
    device tree.

    PR:             278816
    MFC after:      3 days
    Approved by:    cperciva (re)

    (cherry picked from commit e41e099ef199de096abd9a93289bdacfd83a5f48)

 release/arm64/RPI.conf | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 10 Alexander Ziaee freebsd_committer freebsd_triage 2025-10-10 20:39:06 UTC
stable/13 is a no-go unless someone can test it.
Comment 11 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-10-11 02:01:04 UTC
(In reply to Alexander Ziaee from comment #10)

Thank you for the MFC to 15, 14-stable. Once the snapshot SD image is created, I'll test it on my end.

>stable/13 is a no-go unless someone can test it.

I'm using 13.4-RELEASE on my Pi Zero 2W without issues, by adding bcm2710-rpi-zero-2.dtb to the MSDOS partition, the same way I did for 16-current.

Therefore, I'd be glad if the same support could be applied to 13-stable.

Although I haven't been able to test the release image creation for 13-stable, I was able to confirm that the Pi Zero 2W boots [OK] simply by adding bcm2710-rpi-zero-2.dtb to the latest 13-stable SD Card image below:

FreeBSD-13.5-STABLE-arm64-aarch64-RPI-20251009-e01971362fe6-259487.img
Comment 12 Mark Millard 2025-10-11 02:49:25 UTC
I'll note that the orginal report here (and the summary)
are for (as written):

bcm2710-rpi-zero-2.dtb (no wireless)
instead of the:
bcm2710-rpi-zero-2-w.dtb (with wireless)

Should both be present?

(It does seem that the variant for the
bcm2710-rpi-zero-2.dtb is not sold any 
more.)
Comment 13 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-10-11 06:45:11 UTC
Created attachment 264480 [details]
Patch for release/arm64/RPI.conf, zero 2(without W model)

I apologize. I wasn't aware that the Zero2 (non-W model) existed.

I haven't been able to verify it since I don't have the Zero 2, but I created the diff in the same way as for the Zero2W. I would be grateful if you could also apply this one.
Comment 14 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-10-11 06:45:51 UTC
reopen for zero 2(without W model)
Comment 15 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-10-19 03:55:58 UTC
I tested the latest 14.3-stable and 15.0-BETA1 RPI images listed below on a Pi Zero 2W, and they successfully booted [OK].

FreeBSD-14.3-STABLE-arm64-aarch64-RPI-20251016-a728b96686e6-272674.img
FreeBSD-15.0-BETA1-arm64-aarch64-RPI.img

Request 1
It would be great if you could also add this support to 13.5-stable.

Request 2
Additionally, please add separate support for the Pi Zero (original model, without Wi-Fi) across all branches, including current.
Comment 16 Mark Millard 2025-10-19 05:14:54 UTC
(In reply to MIHIRA Sanpei Yoshiro from comment #15)

Assumning that the "RPi Zero" is correct notation (or
was "RPi Zero 2" intended?) . . .

QUOTE
Request 2
Additionally, please add separate support for the Pi Zero (original model, without Wi-Fi) across all branches, including current.
END QUOTE

That is not going to happen as FreeBSD 15 and 16 do not support
the armv6 (ARM1176JZF-S, 32-bit) or earlier any more and the RPI
Zero and RPi Zero W (not "2" in the naming) have the status:

QUOTE of https://www.raspberrypi.com/documentation/computers/processors.html#bcm2835 :
BCM2835
The BCM2835 is the Broadcom chip used in the Raspberry Pi 1 Models A, A+, B, B+, the Raspberry Pi Zero, the Raspberry Pi Zero W, and the Raspberry Pi Compute Module 1. Some details of the chip can be found in the peripheral specification document. It contains a single-core ARM1176JZF-S processor.
END QUOTE

14.* only gives the armv6 Tier 3 status. It is tier 2 in 13.5.


"RPi Zero 2" side note:

The RPi Zero 2W is a 64-bit chip. While the RPi* firmware ships
with a bcm2710-rpi-zero-2.dtb as well as the
bcm2710-rpi-zero-2-w.dtb ., the RPi* folks do not publish anything
about what would use bcm2710-rpi-zero-2.dtb as far as I can find.
Comment 17 Mark Millard 2025-10-19 06:54:57 UTC
Well, I did a basic check and diff'd the
FreeBSD ports rpi-firmware files:

bcm2710-rpi-zero-2.dtb
vs.
bcm2710-rpi-zero-2-w.dtb

They are byte-for-byte identical by content.
Only the name is different.

So may be the issue is that different vintages
or versions of the RPi firmware use different
names to find the same data (by content).


Side note: The FreeBSD dtc rejects modern
downloaded of these 2 *.dtb files from the
RPi* upstream materials, reporting:

QUOTE
Bad magic token in header.  Got a0a0a0a expected 0xd00dfeed
END QUOTE

I've not checked any other of the *.dtb files
from the RPi* folks.
Comment 18 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2025-11-06 12:40:40 UTC
The Zero 2 (non-W model) is not commercially available. Therefore, we do not need to include bcm2710-rpi-zero-2.dtb.

Regarding stable/13:

>stable/13 is a no-go unless someone can test it.

I made a typo in my previous report concerning the filename:

Typo: bcm2710-rpi-zero-2.dtb

Correct: bcm2710-rpi-zero-2-w.dtb

I am currently using 13.4-RELEASE on my Pi Zero 2W without any issues, by adding bcm2710-rpi-zero-2-w.dtb to the MSDOS partition, the same way I did for 16-current.

Therefore, I would be grateful if this same support could be applied to 13-stable.

Although I haven't been able to test the release image creation for 13-stable, I can confirm that the Pi Zero 2W boots successfully [OK] simply by adding bcm2710-rpi-zero-2-w.dtb to the latest 13-stable SD Card image:

FreeBSD-13.5-STABLE-arm64-aarch64-RPI-20251009-e01971362fe6-259487.img
Comment 19 Alexander Ziaee freebsd_committer freebsd_triage 2025-11-06 13:09:39 UTC
I am not really supposed to add new hardware support to 13 stable*. It is EoL in one month and we do not want people to deploy new 13.x installations with it since really two years ago. Please use 15.0-BETA5.
Comment 20 Mark Millard 2025-11-06 16:58:50 UTC
(In reply to Alexander Ziaee from comment #19)

https://www.freebsd.org/security/ shows:

Branch		Release		Date		Expected EoL
. . .
stable/13	n/a		n/a		April 30, 2026
releng/13.5	13.5-RELEASE	March 11, 2025	April 30, 2026

So somewhat less than 6 months from now.

The structure of your overall point may still apply
despite the longer time frame.