From nobody Sat Jul 29 18:30:45 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RCtNy17Tnz4qDt2; Sat, 29 Jul 2023 18:30:58 +0000 (UTC) (envelope-from yklaxds@gmail.com) Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCtNy0cQnz4J5w; Sat, 29 Jul 2023 18:30:58 +0000 (UTC) (envelope-from yklaxds@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-xa2b.google.com with SMTP id 71dfb90a1353d-4865e927e1cso1251742e0c.2; Sat, 29 Jul 2023 11:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690655457; x=1691260257; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rIsR+mPNP6GnNnbbRxKm646kEnqDLj0d4/tS4qrSJ6k=; b=jE6u74qZnnIQdNtYPeWQru2Qhi7dt0B6Mf0cmERFQFPAYGLNSUu1gokMRKvaYoXinx mZd1/VcX0wWMLXp/ouz7oaZ4G0GaWwxu8mBG5nE4oFpUB6EqTVpf5oB4ZIEgBWPvYLZ7 mjTHTSHW5pGgBLS/wuomCi7r5ggUScZLflqA5qoo9exFwdGpeuI9e9u4+DEsTu7Zqg/y Y99/EfPxoyR4kLC3fiOYg4RyWuPV6Kem/dCc+zfQs27tpvGKB4tcYi05O33JUe86kuFB N4hvLJ4MOD3lUdqL5bQhOrU2XfyxcdfPlGfDgVq2ZaaWwl7AfTQTqXIB0jXow0OdH4ur kexg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690655457; x=1691260257; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rIsR+mPNP6GnNnbbRxKm646kEnqDLj0d4/tS4qrSJ6k=; b=XwAnZs7sT/1UC5obEflbUeoikebI8dHxiLb4EDkaAiJ5E/+8+n18BXoEA9oiTJo9rc 17nENCApKc/elWq7TIERnMyTH6y9v2aKEYw08j7YAFeXlpsUWntc4Gs4pODJHKcGU3GI 05N0NHxT3lx2FmrWPk+CWybwdYx9wMupcLqnu5VXFf8zVs3QGD2Mo6tF11jj7aLZb6u1 fap1RTyHc5gTzAkAhYyyGmA17mjrPaV3KIrD54Ta56rZIno1FGDZ91R8bC/VO1SovLcB SOpORvSzl8YVbz7zRO+hsKIfEpcdEokCS0nk5st9xQHznPP6pd2cOFRlhXcZ7UCx/gtz y+cA== X-Gm-Message-State: ABy/qLaRYFxglgEYucD+/kKifrKF4LKFNnM6MyEfXb3D6KM5Lro3RGDw 0s4bVbdt3yanDzvNfCIaB2Y2KXTmCReDH+ER5Aw= X-Google-Smtp-Source: APBJJlEDRXGV3/MLnB/J9+m6AQr9UvD6BUl+dHt1cxCfBogOldlGX8yt6rQJRKvoVrqQzE1kc2/n0yqOXqtAmkht3TY= X-Received: by 2002:a1f:4311:0:b0:481:68cc:751 with SMTP id q17-20020a1f4311000000b0048168cc0751mr4007415vka.13.1690655457410; Sat, 29 Jul 2023 11:30:57 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: ykla Date: Sun, 30 Jul 2023 02:30:45 +0800 Message-ID: Subject: Re: Some issues related to the port of Raspberry Pi. To: Mark Millard Cc: freebsd-uboot@freebsd.org, FreeBSD ARM List Content-Type: multipart/alternative; boundary="000000000000fa05c70601a465f2" X-Rspamd-Queue-Id: 4RCtNy0cQnz4J5w X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated --000000000000fa05c70601a465f2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In https://github.com/FreeBSD-Ask/freebsd-ports/tree/main/sysutils/rpi-firmwar= e we are indeed using the same version of Raspberry Pi firmware i.e. 1.20230405, I am using freebsd 13.2 release of u-boot, which one are you using? Mark Millard =E4=BA=8E 2023=E5=B9=B47=E6=9C=8830=E6=97= =A5=E5=91=A8=E6=97=A5 =E4=B8=8A=E5=8D=882:07=E5=86=99=E9=81=93=EF=BC=9A > On Jul 29, 2023, at 09:23, ykla 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=E2=80=A6=E2=80=A6 > > Bus xhci_pci:Reglster 58000420 NbrPorts 5 > > Starting the contorller > > USB XHCI 1.00 > > scanning bug xhci_pci for devices... Unexpected XHCI event TRB, Skippin= g > > 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-firmw= are > > I don't understand programming very well. Can someone help me with this > problem? > > > > Additionally, the author of raspberrypi-userland (who is the same perso= n > 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=3D272792 > > 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/ar= m64.aarch64/sys/GENERIC-NODBG-CA72 > arm64 aarch64 1400082 1400082 > > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > > --000000000000fa05c70601a465f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In https://github.com/FreeBSD-Ask/free= bsd-ports/tree/main/sysutils/rpi-firmware we are indeed using the same = version of Raspberry Pi firmware i.e. 1.20230405, I am using freebsd 13.2 r= elease of u-boot, which one are you using?

Mark Millard <marklmi@yahoo.com> =E4=BA=8E 2023=E5=B9=B47=E6=9C= =8830=E6=97=A5=E5=91=A8=E6=97=A5 =E4=B8=8A=E5=8D=882:07=E5=86=99=E9=81=93= =EF=BC=9A
On Jul 29, 2023, at 09:23= , ykla <yklaxds@gmail.com> wrote:
>
> Hi,
> However, strangely, when I replaced the rpi4-firmware in the ports wit= h 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=E2=80=A6=E2=80=A6
> Bus xhci_pci:Reglster 58000420 NbrPorts 5
> Starting the contorller
> USB XHCI 1.00
> scanning bug xhci_pci for devices... Unexpected XHCI event TRB, Skippi= ng
> 6a0 000000004 01000000 01008401)

That output looks like U-Boot output, before FreeBSD's UEFI loader
has been loaded. (I'd be=C2=A0 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 pers= on as the firmware's port author) has also deleted the project. There i= s currently no upstream for this project
>
> The current Raspberry Pi 4B 8GB version has issues with booting. The c= urrent u-boot booting process gets stuck at the rainbow screen.see also https://bugs.freebsd.org/bugzilla/= show_bug.cgi?id=3D272792
> 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/raspbe= rrypi/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/R= EADME.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-cee09bd= a03c8-dirty: Wed Mar 15 20:25:49 PDT 2023=C2=A0 =C2=A0 =C2=A0root@CA72_16Gp= _ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm64.aarch64/sys/G= ENERIC-NODBG-CA72 arm64 aarch64 1400082 1400082

=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--000000000000fa05c70601a465f2--