Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [EXT] no HDMI on rpi4b NetBSD 10.1




El 15 de julio de 2025 18:49:44 CEST, Steve Rikli <sr%genyosha.net@localhost> escribió:
>On Tue, Jul 15, 2025 at 08:14:18AM +0200, Ramiro Aceves wrote:
>> El 14/7/25 a las 23:00, Steve Rikli escribió:
>> > On Mon, Jul 14, 2025 at 04:21:50PM +0000, Kulesa, Craig A - (ckulesa) wrote:
>> > ...
>> > > - Install the NetBSD image file to microSD, then mount its msdos
>> > >   partition and unzip the RPI4 UEFI files into it.  Then you can boot
>> > >   both UEFI and NetBSD from the same microSD.  This minimizes hardware
>> > >   footprint at the expense of more complexity and a large hit to drive
>> > >   speed.
>> > 
>> > Is is possible to simply unzip the RPi4_UEFI_Firmware_v1.42.zip archive
>> > into a running NetBSD system's msdos /boot/ directory, and then reboot?
>> > Or it it better to do that "offline", with the microSD mounted in
>> > another system?
>> 
>> I have done it in a running system and reboot without problems. Also
>> Offline.
>
>Good to know. I was planning to experiment "live" + reboot to start.

Fine, it should work,  let us know the result.

>
>> > I note that the zip archive and msdos partition /boot/ directory from
>> > the NetBSD img have different layouts and content, but there's some
>> > overlap; here's what I have from the booted NetBSD arm64.img
>> > installation:
>> > ...
>> > If I simply unpack the zip archive directly into /boot/, it will
>> > overwrite the config.txt which came with NetBSD img; and also end up
>> > with different copies of at least bcm2711-rpi-4-b.dtb in /boot/ as well
>> > as in /boot/dtb/broadcom/ .
>> 
>> I think that config.txt overwritting is needed in order to make UEFI work.
>> Compare UEFI firmare zip file  config.txt with the NetBSD supplied one and
>> you will see the difference. Keep a copy of yours just in case you need
>> something. I have only changed arm_boost=1 to arm_boost=0 to not stress my
>> RPi too much on long compilation.
>
>Lacking other feedback, I was thinking I'd use the config.txt from UEFI zip
>as-is, and potentially merge the NetBSD options back in, depending how it
>goes.

Good idea.

>
>Wrt the NetBSD arm64.img /boot/config.txt, I noticed especially:
>
>    os_prefix=dtb/broadcom/
>    cmdline=../../cmdline.txt
>    kernel=/netbsd.img
>    kernel_address=0x200000
>
>and in the NetBSD arm64.img /boot/cmdline.txt file there is:
>
>    root=NAME=netbsd-root console=fb
>
>which looks like the NetBSD "/" partition location and presumably default
>console definition. That seems important at first glance.
>
>Fwiw I briefly checked config.txt docs when this rpi4 had the stock
>Raspbian on it; config.txt appears to offer some functionality here which
>is provided on other platforms by the NetBSD /boot.cfg file. Probably I
>should revisit those config.txt docs at this point.  :-)
>
>I expect there are many ways to craft config.txt plus associated UEFI
>binaries, config, dtb, and support files to achieve various results.
>

Yes, all seems complicated and you never know what config things will or not work in NetBSD.


>> > Should the existing /boot/ content be removed first? I.e. empty out
>> > the /boot/ directory which came with NetBSD img, and then unzip the
>> > new UEFI archive into it?
>> 
>> Good question, UEFI instructions say it should work, but I have not tested.
>> I have never understood dtb files. My understanding of all of this subject
>> is very limited. Hope not having said something wrong.
>> All of this is very  is a bit difficult for me to understand. We need better
>> documentation.
>
>The docs I've seen so far about unpacking UEFI zip files seem a little
>imprecise, or assume eg. you'll be unpacking the zip bundle into a
>newly-formatted (i.e. empty) fat/msdos partition.
>

Yes, the instructions are too short, imprecise and generic. UEFI firmware GitHub instructions asume you start from a clean SD card with a clean MSDOS partition and after UEFI fw installation you end with a BIOS that boots and will be able to launch the OS you have configured as the boot drive.



>NetBSD wiki (https://wiki.netbsd.org/ports/evbarm/raspberry_pi/) has
>this to say:
>
>"Write the UEFI firmware to the SD card. Then either insert a USB drive
>with the standard NetBSD arm64.img written to it, or have the FFS
>partition from that image on the rest of the uSD card. The RPI will then
>boot from that filesystem.
>
>No specifics about what to do with the existing /boot/ from arm64.img ,
>though I think that somewhat implies it will be unused (ignored?)

All is very obscure.


>
>> > > Regardless, I recommend booting to the UEFI screen (via serial console
>> > > or HDMI) and configuring UEFI as desired (to remove the 3 GB RAM
>> > > limit, set boot order, verify the ACPI mapping to allow the wifi chip
>> > > to attach, etc) -- then have it boot NetBSD from whichever device
>> > > holds NetBSD.   Doing it in two stages helps debugging later.
>> > 
>> > I don't know how to "boot to the UEFI screen" yet, but perhaps this
>> > will become clearer after installing and booting the UEFI zip bundle?
>> 
>> You will see inmediately at boot a screen with a big raspberry from which
>> you can enter UEFI, similar to a PC BIOS (pressing F2 perhaps? I do not
>> remember exactly the keys).
>
>Got it -- we'll see. :-)  I tried this rpi4 with no boot media to check
>what the onboard firmware offered, but it doesn't seem to be interactive,
>just diagnostic messages.
>
>Cheers,
>sr.

Keep in touch and waiting for your findings.

Sorry for my primitive English....



Home | Main Index | Thread Index | Old Index