Re: RPI 4/5 u-boot new port, is there any interest? [16 GiByte RPi5B (D0) basics operational via the EDK2 variant for such, NMVe booting too]
Fred Finster <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
Hello All RPi5 BCM2712 and RPi5 BCM2711 users, Bob Prohaska, Mark Milliard, Bjoern A. Zeeb, Adrian Chadd. Thank you for the extensive work you do supporting Armv8a (64-bit) (and previous Armv7 (32 bit) builds for FreeBSD executing on various Arm64 (Aarch64) Single boad computers like the Raspberry Pi 5 step D0 revision D04190 in a Raspberry Pi model 500 Keyboard. I realize I got wordy and added many small details that interest me. Hope this post helps us all move forward to use FreeBSD software on Arm64 Hardware. Here, I share my few blog posts on using FreeBSD Arm64 images and porting GhostBSD source code to run on Arm64 hardware. https://ghostbsd-arm64.blogspot.com/ https://ghostbsd-arm64.blogspot.com/2025/10/freebsd-143-booting-freebsd-on.html#more My suggestions for addition to the wiki.FreeBSD.org for Arm64 entries. IS GIC3 in this hardware model SOC? 1.) What stepping revision do you have for which hardware model are you running. I have attached a small python program at this blog post, check_steping.py You can copy from the following blog post and make your own python file. it was tested on the Debian Linux, bookworm Raspberry Pi Operating System. https://ghostbsd-arm64.blogspot.com/2025/10/freebsd-143-booting-freebsd-on.html#more I also upgraded the EEPROM contents and the boot loader executable binary from the raspberry Pi operating system using the given debian bookworm linux tools and reported the results in the blogpost "freebsd-143-booting-freebsd-on.html#more" URL given above. 2.) Report back what stepping and revision number is your RASpi5 , RASpi500, RASpi400, RASpi4B hardware For the Raspberry Pi 500 Keyboard model, I used: Revision :d04190 Dee Zero 4190 Is there a consistent method like a poll or web page entry (using a database) to collect a running sum of Revision Numbers and RAM size for various make and models of Raspberry Pi for this Revision Number? See the figure/table below for a better explanation. See attached Screenshot 2025-12-18 at 00-34-53 Free BSD Examples: I Cannot seem to copy and paste information here. See file attachment Screenshot2025-12-18 xxxxxxx.png 3.) Use and improve the attached Python File to determine which steeping revision is your Broadcom 2712 SOC (System On a Chip ) Do you need the RasPi5_D0.zip file to overwrite the contents of your booting image with the latest D0 stepping model firmware? Raspi5_D0.zip Thank you Ronald Klop for your help with these firmware upgrades to support the D0 stepping of the BCM2712 SOC with firmware files from Raspberry Pi. Copied the content of the rpi5-uefi zip to the ms-basic-data partition https://github.com/NumberOneGit/rpi5-uefi/releases/download/v0.1/RPI5_D0.zip 4.) Documentation in the Arm64 portion of the wiki.freebsd.org, which Single Board Computers with a ARM processor SOC support the GIC3 General Interrupt Controller version 3 ( not the version 2 GIC2 ) Version GIC 3 allows for supporting and using BHyve Arm64 on only that GICv3 hardware. check your dmesg and your SOC documentation for which version the SOC supports. The Broadcom BCM2712 uses a GIC2, Ampere CPU uses a GIC3. FreeBSD Foundation or Arm64 FreeBSD developers may mention to Raspberry Pi Foundation and the Arm Corporation that FreeBSD supports Bhyve virtualization software only on a General Interrupt Controller Version 3 or 4. Maybe newly designed Arm SOCs can select the GIC3 version model deployed inside the SOC. 5.) Yes, to operate using FreeBSD software on a Raspberry Pi 5, this deep in the woods, you have to be nerdy and have knowledge and tools at your disposal, like several USB flash drive sticks, a few 16 or 32 Gigabyte microSD cards, a 3.3V serial port to 5V USB convertor board device to plug into your 5V USB port on laptop or desktop development computer. Have a full size SD port with a convertor / holder for that microSD card you want to write an image you either downloaded from a website or created with the FreeBSD tools. Very Nerdy. I see the need for a single image that supports booting a Raspberry Pi 5 or Raspberry Pi 500 ( also the Raspberry Pi 4B and Raspberry Pi 400 keyboard models ) This single image (Maybe its all the BCM2711 and BCM2712 firmware files need to be installed on the ESP FAT32 partitions. The Arm64 kernel files appear to be common. VCHIQ HDMI Audio for BCM2711 is different than the BCM2712. Seems that the SOC chip determines and selects which firmware files to load, and DTB files. ) please. No nerdy dance methods to make hardware boot up with FreeBSD. Just a single boot image file, like what Raspberry Pi Operating System does. 6.) Look at the Raspberry Pi Imager software that has hooks to allow additional manufactures operating system boot images to be downloaded and written into a blank MicroSD card or blank USB flash drive stick. Note that a hobbyist may not have various other computers and tools to use in creating/modifying an image to be able to boot a BCM2712 D0 stepping SOC. So a single image made specific for that model computer using the stepping is very important to make very easy to download and burn one image to get up and running FreeBSD on that single board computer. It is truly amazing to plug in a hard wired ethernet cable into the raspberry Pi 5 hardware (the other end of the ethernet cable is plugged into a DHCP enabled ethernet router ( this creates the ability to start with a only raspberry Pi hardware and blank media to download and burn an image into blank media. This is a great help to new users. Just turn on the power, and select an operating system image and download and burn into a selected blank microSD card or a blank USB flash drive stick plugged into any of the Raspberry Pi models. No need for extra tools or special development hardware to get started using FreeBSD on Raspberry Pi Arm64 or Armv7 Hardware. FreeBSD.org Just needs to provide a FTP server to share the file for that specific Raspberry Pi model SBC. This will provide a low cost hardware entry into using Arm64 with the FreeBSD Operating System. Today, Raspberry Pi Operating System (Debian Linux) is very easy to get started and use. This is the competitive field we are in to attract younger users. Buy a Raspberry Pi 500 or RasPi 5 hardware and test drive yourself the method and process of getting started. Raspberry Pi Linux makes this super easy. Start with nothing but blank media and a an internet connected wired ethernet cable to select an operating system image to burn into that blank media. Your physical location in the world is irrelevant to use the Linux open source software. FreeBSD can use the same methods and interfaces by providing a single image for that specific model hardware. (ie provide several images for several single board computers that have those image setup and tested on that hardware. This would be the starting point. Right now you take a Raspberry Pi 4 (BCM2711 ) image and add the Raspberry Pi 5 or RasPi500 firmware files to the ESP FAT32 partition. IE use Rasp5_D0.zip file to overlay onto the ESP FAT32 partition. (not a single image file that boots the RasPi5 hardware or the RasPi4 hardware) This requires more development computers or tools to get a bootable image written into the media for booting and using that Raspberry Pi 500 keyboard computer. Yes, it gets wordy to specifically with detail to explain an idea. Again my method or process was to first download and use Raspberry Pi Linux Operating System to update the EEPROM contents and the bootloader, so that I had the latest versions updated in my Raspi500 keyboard hardware. Was very cool to start with an ethernet CAT5 wired cable and blank media, Turn on the power and download an operating system image , write that image into blank media, finish , reboot the hardware and now I can surf the web, read about raspberrypi. org, Raspberrypi.com, FreeBSD.org, FreeBSD Arm mailing lists, and play youtube.com/c/robonuggie video files to learn more raspberry Pi hardware and Arm64 processors. Wow from nothing working, to surfing the web. FreeBSD can be a solution for new users to learn about Arm64 SOCs and FreeBSD operating System. But FreeBSD has to step up to the competition Linux and make our competitive solution very easy to install for Arm64 Single Board computers, Ie 1 single boot image file for a specific hardware model, tested to work, play audio, and many other small interfaces working properly, WIFI, HDMI Audio, several TTY serial UART interfaces, a couple I2C, a couple SPI interfaces. Video decoding, Video Encoding, GPIO pins. Here will be the quoted remarks we will hear in the near future: "Oh that interface does NOT WORK on FreeBSD, so I just started with Raspberry Pi Linux and continue now to use Linux, Is FreeBSD some old UNIX software? It did not work for my hardware needs, so I never pursued learning about FreeBSD on Arm64. Linux and SystemD is just great for me to use now. Tools, hardware interfaces everything is there and just working with Linux. I learned while using Linux on Raspberry Pi hardware, now to learn FreeBSD is hard and requires too much time to learn because it is not like Linux that I know and use." These remarks will become a missed opportunity to acquire new FreeBSD users today with inexpensive Arm64 hardware available on the present market place. So I am working to create documentation and methods to use FreeBSD and GhostBSD on Arm64 hardware like the Raspberry Pi 500 keyboard BCM2712 stepping D0 and Raspberry 4B BCM2711 SOC. See revision D43399. Thank you Adrian Chadd for moving these 3 patches into the kernel source tree to support VCHIQ Audio HDMI interface on the HDMI TV speakers. https://lists.freebsd.org/archives/freebsd-arm/2025-September/005163.html https://lists.freebsd.org/archives/freebsd-arm/2025-November/005442.html 3 patches are now in /usr/src 7.) AUDIT file software versions, especially firmware files and DTB, DTC, and device driver files. use MD5HEAP software, so that one can audit and compare files to versions that have been tested to execute and run correctly. Can we provide an text file of the AUDIT checksums for each source file that goes into the creation of a binary image file. https://ghostbsd-arm64.blogspot.com/2021/05/audit-your-boot-files-with-md5deep.html Audit your boot files withe MD5deep software compiled for Arm64 https://ghostbsd-arm64.blogspot.com/2025/10/raspberry-pi-master-firmware-zip-file.html Raspberry Pi Master firmware files Very excited to use the RPI 500 Keyboard with a USB SSD Samsung T7 500 GB model, to further create documentation and methods for booting up FreeBSD operating System. https://ghostbsd-arm64.blogspot.com/2025/09/setting-up-freebsd-on-raspberry-pi-5.html List of ideas to work on: 1.) What stepping revision do you have for which hardware model are you running. C0 or D0 for the BCM2712 2.) Report back what stepping and revision number is your RASpi5 , RASpi500, RASpi400, RASpi4B hardware 3.) Use and improve the attached Python File to determine which steeping revision is your Broadcom 2712 SOC (System On a Chip ) 4.) Documentation in the Arm64 portion of the wiki.freebsd.org, Which ARM64 SOCs internally use the GIC3 model? Good to support BHYVE Arm64 virtualization 5.) Yes, to operate using FreeBSD software on a Raspberry Pi 5, this deep in the woods, you have to be nerdy and have knowledge and tools at your disposal, Make it simpler for the new users, please. No nerdy dance methods to make hardware boot up with FreeBSD. Just a single boot image file, like what Raspberry Pi Operating System does. 6.) Look at the Raspberry Pi Imager software that has hooks to allow additional manufactures operating system boot images to be downloaded and written into a blank MicroSD card or blank USB flash drive stick. 7.) AUDIT file software versions, especially firmware files and DTB, DTC, and device driver files. use MD5DEEP audit software for files, so that one can audit and compare files to versions that have been tested to execute and run correctly. Your version compared to what version has been tested to work. 8.) Yes, I need to write up a bug report after I get the RPI500 Keyboard operational with FreeBSD again. I first tried to use CLI command "PKG install MD5DEEP" with an image RPI FreeBSD 15.0 Alpha 5. pkg reported back the "/usr/etc/local/pkg" directory was missing and package exited back to the prompt. Directory path "/usr/etc/local" did exist. But not sub directory "pkg" Question: Should the "pkg" command have created the missing directory it need to store information locally about which pkgs were installed? OR should the created FreeBSD image already have the directory path created and available, before starting and executing the pkg command, like pkg list or pkg search xyz "pkg" command just failed and exited. I had to manually issued "sudo mkdir -p /usr/local/etc/pkg" before the pkg would operate. How would you have repaired this issue? When you first boot one of these created binary images and then use command "pkg" to update; Does PKG command work for you on this new FreeBSD system? What can you add to make ARM64 FreeBSD supported better for new to FreeBSD Users? Written Documentation, Bug reports. FreeBSD revision entries. Yes, very wordy and long mailing list post of ideas to improve the Raspberry Pi 5 image. One could audit the Firmware files to verify that the latest Raspberry Pi Firmware files are being used. https://ghostbsd-arm64.blogspot.com/2025/10/raspberry-pi-master-firmware-zip-file.html Fred Finster https://ghostbsd-arm64.blogpost.com Blog Posts http://ghostbsdarm64.hopto.org My NGINX webserver with new compiled FreeBSD Arm64 versions of software. Not operational today, but will be in the future. 2 attachments, Screenshot of BCM2712 revisions. check_stepping.py Python file to answer what revision number do you have?
Screenshot 2025-12-18 at 00-34-53 FreeBSD 14.3 Booting FreeBSD on Raspberry Pi 500 Keyboard model BCM2712 D0 stepping. ASIX8872A USB to Ethernet Controller.png
(image/png, 48.3 KB) - not displayed
check_stepping.py
(text/x-python, 1.7 KB)
#!/usr/bin/env python3
import subprocess
def get_revision():
try:
result = subprocess.run(['cat', '/proc/cpuinfo'], capture_output=True, text=True, check=True)
for line in result.stdout.splitlines():
if line.startswith('Revision'):
return line.split(': ')[1].strip()
return None
except subprocess.CalledProcessError:
return None
def check_d0_dmesg():
try:
result = subprocess.run(['dmesg'], capture_output=True, text=True, check=True)
return 'bcm2712d0' in result.stdout.lower()
except subprocess.CalledProcessError:
return False
def check_iomem():
try:
result = subprocess.run(['cat', '/proc/iomem'], capture_output=True, text=True, check=True)
return '107d517c00' in result.stdout
except subprocess.CalledProcessError:
return False
def check_config_txt():
try:
result = subprocess.run(['cat', '/boot/firmware/config.txt'], capture_output=True, text=True, check=True)
return 'bcm2712d0' in result.stdout.lower()
except subprocess.CalledProcessError:
return False
def infer_stepping(rev):
if rev is None:
return "Unknown (could not read /proc/cpuinfo)"
d0_indicators = [
check_d0_dmesg(),
check_iomem(),
check_config_txt()
]
if any(d0_indicators):
return "D0 (confirmed by device tree, iomem, or config)"
if rev == 'd04190':
return "C0/C1 (likely, 8GB model, confirm with dmesg or iomem)"
return "C0/C1 (default assumption)"
rev = get_revision()
print(f"Revision: {rev}")
print(f"Inferred Stepping: {infer_stepping(rev)}")
print("Run 'dmesg | grep -i bcm2712' or 'sudo cat /proc/iomem | grep gpio' for confirmation.")