Re: Raspberry PI information

[email protected] (Michael van Elst)
Newsgroups gmane.os.netbsd.ports.arm
Organization Serpens User Group
Message-ID <[email protected]>
[email protected] (Havard Eidnes) writes:

>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?


Both. You can boot UEFI and load netbsd, hardware support
is pretty limited.



>2: do we run on CM4?  What about CM5?  Same as RPI5?

CM5 is like RPI5.
CM4 is like RPI4.

In either case the "compute module" needs some environment,
usually a "carrier board" or "I/O board".

You won't see lots of hardware support there either.



>3: CPU types does not mention any of the RPI5 variants

The arm core is supported.



>4: UEFI in general

You need to get the proper UEFI from somewhere else.



>Under "NetBSD 10" is mentioned:
>  RPI4 general support (UEFI firmware required)

>and under "NetBSD current" is mentioned:
>  RPI5 general support (UEFI firmware required)

The official NetBSD only supports RPI4 as a generic
aarch64 server with UEFI firmware.



>There is a separate section named
>  UEFI booting
>but it is IMHO short on concrete details for how to go about
>using it.


>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.
>Is this still accurate?  Is it impossible to use a serial console
>when booting using the UEFI boot image?  And is the 3GB memory
>limit still a thing?  Makes it kind of pointless to try to run on
>an 8GB RPI5, no?

The 3GB issue is a hardware flaw of the RPI4. Setting the UEFI
limit was an early crude workaround. It shouldn't be required
anymore.



>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.

Try:

https://www.raspberrypi.com/documentation/computers/config_txt.html#what-is-config-txt



>I also have a general sense that this section could be expanded.


>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.

Can't tell that. I lost one card, not for wear out, but for
writing while removing power.


> How does
>one use e.g. an eMMC card instead?

eMMC devices are usually built-in. The RPI has none. You will find
adapters for SD card slots or USB and then they are used like
an SD card or a USB stick with no advantage.


> Without going the route via
>first installing Linux?  What about these newfangled nVME HATs
>available for use with the RPI5?

The RPI documentation tells you all this, it is independent of
running Linux or NetBSD.



>7: vcgencmd
>says
>  The program vcgencmd, referenced in the boot section, can be
>  found in pkgsrc/misc/raspberrypi-userland.

The userland code builds only for 32bit arm. I have a
modified version that partially runs on aarch64. But
the tool is not really useful.


>No such mention is made in the boot section, though.  And
>... what's that supposed to do?

vcgencmd sends commands to the firmware that runs on the GPU.



>   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?

UEFI offers a menu when booting (similar to a PC BIOS setup).


>Does this also apply to RPI5 with -current?

No.



>10: Updating dtb files

>This whole section goes on about this without saying where these
>files are supposed to come from?!?



>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.


Firmware updates are (mostly) agnostic regarding the OS.

For RPI0-3 the firmware is on the boot disk.

For RPI4 part is on a EEPROM, there is a self-update during
the boot process. The tool to set this up is Linux only
but can easily be replicated.

For RPI5 all of the firmware is in a EEPROM. I guess NetBSD
could update it when it got support for the SPI interface.


>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)?

Firmware comes exclusively from Raspberry Pi, there is no
source. Fetch it from github or RPI OS.



>12: X11 on aarch64?

>Status is still "does not work"?


The RPI firmware (still) offers a dumb framebuffer that is
used for wsfb.



>Generally, I was hoping for something here which could tell me
>how to do the system-dependent tasks from NetBSD.  E.g. how does
>one go about adjusting the EEPROM settings, to enable booting
>from an nVME HAT?  I'm assuming the Linux command to edit the
>EEPROM settings is not available, since it's not mentioned?

Assuming recent firmware, the RPI5 will boot from NVME automatically,
but it's not first in the boot order.




Greetings,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.