Re: adding UEFI to NetBSD /boot/ [was Re: no HDMI on rpi4b NetBSD 10.1]
Steve Rikli <[email protected]> Tue, 22 Jul 2025 09:38:46 -0700
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 22, 2025 at 12:26:59PM +0200, Martin Husemann wrote: > Yes, for arm boards it is basically 3 different things: > > - boards booting with FDT and u-boot (but no UEFI), mostly 32bit; > here you have to make sure the correct dtb file is loaded > (names/defaults are in the u-boot default environment), and the > right dtb file is available on the FAT partition of your boot medium > > - boards (mostly 64bit) that do not come with (usable) UEFI firmware. > Here you have to find the proper UEFI firmware and install it (e.g. in > flash memory) > > - boards that come with proper UEFI firmware right from the start, here > you can just boot the generic image. This part can be easily documented > (including boot.cfg) as it is the same on all arm boards > > For the first variant we provide various pre-configured images (derived > from the generich image) on armbsd.org. If you have a board that should > be in that list but isn't check if there is a pkgsrc sysutils/u-boot-* > for your device, and try if that works. When it does, let us know so we > can add it to the armbsd.org collection of images. > > For the last variant there often is a EDK2 port and some of them are > linked from the wiki (I use that e.g. on Quartz64 and Firefly P2S devices). > This usually come with very good installation instructions. > > For others you have to deal with the board specific UEFI firmware (like > in the RPI cases) and "somehow" get that running first. Documenting this > requires board+firmware specific knowledge. I think a summary like this of the ~3 board types could be helpful in the INSTALL guide, particularly if a couple common board/SoC examples could be listed for each type. The evbarm-aarch64 INSTALL guide almost doesn't mention UEFI; mostly references to bootaa64.efi in "subdirectory structure" and "Upgrading a previously-installed NetBSD System". Whereas there's a section about "Installation for Armv7 and AArch64 devices with U-Boot". This looks like a common section across the evbarm-* INSTALL guides. I was thinking a section right after that e.g. "Installation for Armv7 and AArch64 devices with UEFI" and some of your notes would be a useful starting point. That admittedly may not be applicable to some of the other evbarm-* INSTALL guides. The steps about dd'ing images and such are in-common, but the U-Boot section mentions e.g. installing board-specific U-Boot, while INSTALL has nothing comparable for UEFI. > This is why knowledge is > sparse. Things like "cmdline.txt" are specific to the RPI firmware > and maybe even boot method used, I wouldn't be suprised if even on RPI > the file would not be used at all when booting NetBSD via the UEFI > boot loader. Yes. IME rpi4b with UEFI notices the presence/absence of cmdline.txt but NetBSD appears to not make use of it. > Once UEFI runs, everything later is common again and should be well > documented. Agreed. Once I had NetBSD itself installed and running on the sysdisk, post-install configuration for rpi4 was nearly identical to my other i386 and amd64 systems. Pleasantly so. :-) Cheers, sr.