Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Raspberry PI information
Hello, and happy solstice!
I'm a long-time NetBSD user and developer, and have run NetBSD on
various hardware (alpha, i386, amd64, sparc, sparc64, macppc...).
I also run qemu-based arm and aarch64 systems, but have so far
not had my hands on actual arm hardware. Raspberry PI is as far
as I understand fairly "mainstream", so I'm looking at
https://wiki.netbsd.org/ports/evbarm/raspberry_pi/
and I'm trying to figure out what works and what doesn't, and how
one operates such systems. Am I the only one who comes out of
this with waay too many un-answered questions than expected?
Who's willing to work with me to improve this? Some examples:
The ARM ecosystem is large, and NetBSD supports many, many boards. It may
come as no surprise to learn there are several ways to do many things, and
the reasons to choose one over another aren't always clear or easy to
discover.
It'd be nice to have as much of this information in one place as possible.
I'll try to answer what I can :)
1: status of RPI5 support:
As of early 2024, NetBSD does not support the Raspberry Pi 5.
but later under "NetBSD current" (unspecified version):
RPI5 general support (UEFI firmware required)
so which is it?
I got one, and NetBSD under UEFI runs on it, but the last time I checked
(October, I think), ethernet didn't work and NetBSD can't change the
processor frequency, so it needs to be set in the UEFI menus. I don't
remember the status of wifi / Bluetooth.
RPI4 general support (UEFI firmware required)
RPI5 general support (UEFI firmware required)
There is a separate section named
UEFI booting
but it is IMHO short on concrete details for how to go about
using it.
This could be improved, for sure. Other systems, like the Orange Pi 5,
work surprisingly well with UEFI, much better than with native booting.
Later under "RPI4 xhci" is mentioned
One workaround is to switch to UEFI, but that leads to a 3GB
memory limit and needing a monitor.
Neither of those are true (any more?) I've been running an 8 gig RPi 4 via
a serial console for years now.
5: SD card structure and booting process
This section finishes off with a non-clickable URL to
https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md
which redirects to
https://www.raspberrypi.com/documentation/computers/configuration.html
and which starts by talking about raspi-config. Is that program
even available on NetBSD?
No, it isn't. In the past, most documentation had information about making
changes to config.txt and cmdline.txt, but more recent documentation
suggests raspi-config without explaining the actual changes.
6: Ability to boot from other media?
I've understood that microSD cards are the easiest way to boot a
raspberry pi, but that they wear out rather quickly. How does
one use e.g. an eMMC card instead? Without going the route via
first installing Linux? What about these newfangled nVME HATs
available for use with the RPI5?
The Pis 3A+, 3B and 3B+ have one-time programmable memory to enable USB
booting. The Pi Zero 2 has it too, but already enables USB booting,
apparently.
The Pis 4 and 5 have EEPROM and can be set to USB booting.
Personally, I've not bothered and just have a small microSD card on all
systems and use the "root=" line in cmdline.txt to root elsewhere. The
kernel also lives on the microSD.
ends with
\todo Explain if updating firmware is necessary when e.g.
moving from 8 to 9, or 9 to current.
"current" here probably refers to pre-10, no? Could perhaps be
updated with more current information?
We should also clarify which Pis load netbsd.img, netbsd7.img, along with
config.txt changes for kernel name, 64 bit, et cetera.
9: RPI4 UEFI 3 GB
To work around bugs in hardware (that may or may not be fixed
in recent RPI4) and because not all OSes have workarounds, the
UEFI firmware's default is to limit RAM to 3GB. NetBSD 10 can
be used with more, so this needs to be configured in UEFI.
How?
The UEFI pre-boot menus allow you to set the amount of memory the OS will
use.
11: Updating the firmware
It is somewhat likely that running NetBSD from a given branch
X with firmware from a branch Y < X will not go well. It is
unclear if firmware from a branch Y > X will work. It is
standard practice to use firmware from the right branch. An
alternative view is that newer firmware is usually better, and
the the firmware needs to be new enough for the hardware.
The first sentence is kind of scary. However, this does not say
where the firmware (is supposed to) come from. Is it maintained
inside the NetBSD source tree as a binary blob (it sounds like
it)? I suppose it originally comes from elsewhere? Where, both
in-tree and elsewhere?
This is puzzling to me. First, these are boot files. "Firmware" usually
has the connotation of something firm, like a flash chip. Second, it has
been years since the boot files have been meaningfully out of sync with
NetBSD's expectations, unless there are things I haven't seen yet.
For the most part, AFAIK, you can safely just fetch the latest boot files
from here and expect them to Just Work:
https://github.com/raspberrypi/firmware/releases
Always referring to the "upstream" documentation gives the task
of distringuishing betwen "system-dependent" and "Linux-
dependent" parts of the documentation, and then finding out how
to do the corresponding task in NetBSD is left as a task for the
user to figure out.
Yes, this makes it hard for me even though I've been using Raspberry Pis
of every kind since they came out. I can only wonder at what a beginner
would make of it.
Sorry for this being a bit negative; I'm willing to work with
whoever is able to provide me with accurate information in this
area.
It's not negative, in my opinion, to express a bit of exasperation now and
then, particularly when it's in the interest of doing something
constructive :)
I'm happy to help however I can. I've collected lots of notes over the
years - perhaps I should go through them and see what can be used in
NetBSD's documentation.
John
Home |
Main Index |
Thread Index |
Old Index