Re: Some issues related to the port of Raspberry Pi.

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 29 Jul 2023 18:07:11 UTC
On Jul 29, 2023, at 09:23, ykla <yklaxds@gmail.com> wrote:
> 
> Hi,
> However, strangely, when I replaced the rpi4-firmware in the ports with the latest version from the official Raspberry Pi source and copied it to a USB drive, the system started to loop with the following code.
> 
> ---------------
> 
> Net: eth0:ethernet@7d580000
> PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
> starting USB……
> Bus xhci_pci:Reglster 58000420 NbrPorts 5
> Starting the contorller
> USB XHCI 1.00
> scanning bug xhci_pci for devices... Unexpected XHCI event TRB, Skipping
> 6a0 000000004 01000000 01008401)

That output looks like U-Boot output, before FreeBSD's UEFI loader
has been loaded. (I'd be  more sure if there was more context.) Of
course the RPi* firmware and .dtb starts being involved before
U-Boot starts and, so, is involved.

I actually use my own U-Boot build, in part because some of my USB3
boot media require something like a usb_pgood_delay for U-Boot to
tolerate them. My in-use build is based on 2023.01 :

# strings /boot/efi/u-boot.bin.2023.01.arm64 | grep "U-Boot 20"
U-Boot 2023.01 (Feb 06 2023 - 08:06:49 +0000)

(My config.txt references that name.)

So, the later material below is not based on the same U-Boot that
you are using.

> ---------------
> The original author seems to have abandoned the project, so I forked a copy from the ports archive. You can find it here: https://github.com/FreeBSD-Ask/rpi3-psci-monitor and https://github.com/FreeBSD-Ask/freebsd-ports/tree/main/sysutils/rpi-firmware
> I don't understand programming very well. Can someone help me with this problem?
> 
> Additionally, the author of raspberrypi-userland (who is the same person as the firmware's port author) has also deleted the project. There is currently no upstream for this project
> 
> The current Raspberry Pi 4B 8GB version has issues with booting. The current u-boot booting process gets stuck at the rainbow screen.see also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272792
> If someone could provide assistance, I would be very grateful.
> 
> I'm not sure if the upstream has made any fixes for this issue.
> 

I expect that you may not be using an officially tagged release
but instead are using a development version of the RPi* firmware.
I avoid the development versions when I can.

I had no trouble with the firmware-1.20230405 materials, the
most recent tagged release available. The RPi4B context is
the 8 GiByte Rev 1.5 with the "C0T" part number label on the
top of the SOC.

The tagged versions are available via:

https://github.com/raspberrypi/firmware/tags/

The most recent there is:

https://github.com/raspberrypi/firmware/releases/tag/1.20230405/

I downloaded:

https://github.com/raspberrypi/firmware/archive/refs/tags/1.20230405.tar.gz

and did:

# tar -xf 1.20230405.tar.gz firmware-1.20230405/boot/ firmware-1.20230405/README.md
# rm ~/firmware-1.20230405/boot/kernel*.img

to extract the relvent material.

I updated one of the RPi4B USB3 boot media to have this firmware
(and .dtb's) in its msdosfs file system.

It booted the 8 GiByte RPi4B Rev 1.5 just fine (based, in
part, on my U-Boot build, however).

The media I picked to test with has not had its FreeBSD updated
in a while:

# uname -apKU
FreeBSD CA72_UFS 14.0-CURRENT FreeBSD 14.0-CURRENT #90 main-n261544-cee09bda03c8-dirty: Wed Mar 15 20:25:49 PDT 2023     root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm64.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400082 1400082

===
Mark Millard
marklmi at yahoo.com