From nobody Sat Jul 29 20:38:07 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 4RCxD25rY3z4qfL9 for ; Sat, 29 Jul 2023 20:38:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-55.consmr.mail.gq1.yahoo.com (sonic307-55.consmr.mail.gq1.yahoo.com [98.137.64.31]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCxD22j3sz4PxD for ; Sat, 29 Jul 2023 20:38:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690663104; bh=+tNpYCWeRxYDAH1TYW45QesNvIGTx+nPwONbioEv9ag=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=ij4cuKI8a4qVJuzPaR09EgFQ++/XgJC1hTjCJorbgRnKwb9d6lJTgTJYjiKdbY52KhfY7NUxxqPoB6ugKitOednny10tx0ZxlGRUBhFx7SeP16vpNmBAfem+jumYQeXUEPqhkmdSXf/wvMO1FtIL/BwhCYbUk4nRc18lVvSWpgbZQeykJZn29P9G61uFsjt9zT4vMakoeyOCJ71wV8Eu/O913vg/6Sz8VOlg8ee65nQd/0um5CZZN9IQf1gojRKXPepjUIWr/v1CFSDF5Tt5phG5DVguc7N9XPqp3FGlUvrZYQbZhYcP/KG89QqSpVzi5+UKr8MmTZjXWZQIWCjn0g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690663104; bh=1eoBbJDs4NuzOuJl2D+wzvbNaJUe/BU9Sn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oBFG otLb2Wdn3C_OkJC4tSbmfwuOee5EmEOJw1kB7QL5dLDSWHFmkW0RvazjFj2h2h2SNSYgij6IZlhx RY_j82x91GyotKSSCfcJqKHhyLtTtfD6AppeOvCD7_ksm3r4V.jj2zgufNEaPcEDRixIjKl4FzoE If7TajHyrhi3JaavCXFDmAc6AXJpXPq6yv_KHLWs.v4IV_nDuFUaT8p_QEjZlcCgbfvZBFhQ0RLP YPpfdLVoBKIb.JCzpAecKMYuazIAv8asVp0yoWTBfCk9deMWKm6Zn.sgL6p4kU4haLg8mKJ_bBaA d0s5ZzhYjJxPD2PAvzHMqt6rU2cN8J7TfFchYZ6.odU_L9IL3Bp6ytJ4bs9SGQiVB1zUk7FWr.4m BgwURLkEkWxkW21a15_oPSPG7akEmqF.aeG4b8iL.E671ERnmZbZzHZagbRx13JYohet3X4x_IH1 QKkWtvk2o3vJANP55ZaWQee4xBi9lAjiwzR7FuSb2OygXEH8tS64vf07kqhdQZDK_u54hZwMc.ev cX_3VDr8oWI7HJME.6F8chbSG5DnloPh0p_gk4UVrsMn7fejtgGw0L6qfWVwYKWhRqhOdtnPZn0g a X-Sonic-MF: X-Sonic-ID: 727521e2-9f3a-4a96-8ffd-fa0e9d850114 Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Sat, 29 Jul 2023 20:38:24 +0000 Received: by hermes--production-ne1-549c7f6c44-z56p4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4a4314c505512e7ef65351e2164503c6; Sat, 29 Jul 2023 20:38:19 +0000 (UTC) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Some issues related to the port of Raspberry Pi. From: Mark Millard In-Reply-To: Date: Sat, 29 Jul 2023 13:38:07 -0700 Cc: freebsd-uboot@freebsd.org, FreeBSD ARM List Content-Transfer-Encoding: quoted-printable Message-Id: <301B53AB-47CD-4BCE-9888-2BEF2F2F8437@yahoo.com> References: To: ykla X-Mailer: Apple Mail (2.3731.700.6) X-Rspamd-Queue-Id: 4RCxD22j3sz4PxD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Jul 29, 2023, at 11:30, ykla wrote: > In = https://github.com/FreeBSD-Ask/freebsd-ports/tree/main/sysutils/rpi-firmwa= re 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, FYI for 13.2-RELEASE (at least the RPi* aarch64 image): Its U-Boot was specially built/installed, avoiding the problematical version. After mounting the msdosfs file system from the 13.2-RELEASE RPi* aarch64 media that I have: # strings /mnt/u-boot.bin | grep "U-Boot 20" U-Boot 2022.10 (Apr 07 2023 - 02:47:36 +0000) > which one are you using? I already indicated my U-Boot context in the material that you replied to: QUOTE 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) END QUOTE I'll note that one way to identify the RPi* firmware build in the tagged release is to do the likes of: # strings /boot/efi/start4.elf | grep VC_BUILD_ID_ VC_BUILD_ID_USER: dom VC_BUILD_ID_TIME: 10:50:39 VC_BUILD_ID_VARIANT: start VC_BUILD_ID_TIME: Mar 17 2023 VC_BUILD_ID_BRANCH: bcm2711_2 VC_BUILD_ID_HOSTNAME: buildbot VC_BUILD_ID_PLATFORM: raspberrypi_linux VC_BUILD_ID_VERSION: 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) on the start*.elf file of interest. Sometimes a new tagged release is for changes elsewhere and this part does not change. The above from 1.20230405 is actually unchanged from the prior 1.20230317 tagged release, for example. Another thing that is involved is the RPi* EEPROM content's vintage. The tagged versions of the files used to update the EEPROM can be accessed via: https://github.com/raspberrypi/rpi-eeprom/tags/ An oddity of the last release for this is that it has 2 tags for bf7419c: a) 1 based on YYYY.MM.DD (normal): v2023.01.11-138c0 and: b) 1 based on YYYY.DD.MM (unusual): v2023.11.01-138c0 Again, if I can, I tend to use tagged releases of these, not development versions. I'm not aware of being able to use FreeBSD to manage the EEPROM contents. I use RaspiOS64 (my abbreviation) for such management. > 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: > >=20 > > 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. > >=20 > > --------------- > >=20 > > 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, = Skipping I'll note that I've never gotten that "Unexpected XHCI event TRB" message historically. So I'm not familiar with what leads to it. > > 6a0 000000004 01000000 01008401) >=20 > 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. >=20 > 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 : >=20 > # strings /boot/efi/u-boot.bin.2023.01.arm64 | grep "U-Boot 20" > U-Boot 2023.01 (Feb 06 2023 - 08:06:49 +0000) >=20 > (My config.txt references that name.) >=20 > So, the later material below is not based on the same U-Boot that > you are using. >=20 > > --------------- > > 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-firmwa= re > > I don't understand programming very well. Can someone help me with = this problem? > >=20 > > 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 > >=20 > > 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. > >=20 > > I'm not sure if the upstream has made any fixes for this issue. > >=20 >=20 > 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. >=20 > 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. >=20 > The tagged versions are available via: >=20 > https://github.com/raspberrypi/firmware/tags/ >=20 > The most recent there is: >=20 > https://github.com/raspberrypi/firmware/releases/tag/1.20230405/ >=20 > I downloaded: >=20 > = https://github.com/raspberrypi/firmware/archive/refs/tags/1.20230405.tar.g= z >=20 > and did: >=20 > # tar -xf 1.20230405.tar.gz firmware-1.20230405/boot/ = firmware-1.20230405/README.md > # rm ~/firmware-1.20230405/boot/kernel*.img >=20 > to extract the relvent material. >=20 > I updated one of the RPi4B USB3 boot media to have this firmware > (and .dtb's) in its msdosfs file system. >=20 > It booted the 8 GiByte RPi4B Rev 1.5 just fine (based, in > part, on my U-Boot build, however). >=20 > The media I picked to test with has not had its FreeBSD updated > in a while: >=20 > # 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/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400082 1400082 =3D=3D=3D Mark Millard marklmi at yahoo.com