> Date: Sun, 11 Aug 2024 01:41:32 +0200
> From: Thomas Dettbarn <det...@dettus.net>
> 
> Hello.
> 
> So, I am currently trying to run my favourite operating system
> on my shiny new BananaPI BPI-R3. Thus far, I was able to Frankenstein
> a u-boot image with the miniroot75.img and got into the OpenBSD
> bootloader.
> 
> However, whilst loading the bsd.rd MIGHT work, running it does not.
> (Please see the .txt file I attached to this email for a full log of the
> boot process. It is completely stuck after that last line)
> 
> 
> One of my assumptions is that the bootloader itself might load the
> bsd.rd to the wrong location in memory, namely the one defined in
> /usr/src/sys/arch/arm64/conf/RAMDISK:
> 
> makeoptions     KERNEL_BASE_PHYS="0x00200000"
> makeoptions     KERNEL_BASE_VIRT="0xffffff8000200000"
> 
> 
> Loading anything to this address on this platform is forbidden:
> 
> BPI-R3> fatload mmc 0:5 0x00200000 /efi/boot/bootaa64.efi
> ** Reading file would overwrite reserved memory **
> 
> So my question (to eliminate this hypothesis), can you tell me
> if the boot loader is loading the kernel to KERNEL_BASE_PHYS
> or KERNEL_BASE_VIRT?

Neither.  The bootloader will load the kernel into a block of
memory that is free according to the UEFI memory map.

Now it is entirely possible that your the U-Boot in your frankenstein
setup is busted and doesn't provide a correct UEFI memory map.  But
based on your bootlog I have a different hypothesis.  Your device tree
might be wrong.

The U-Boot device tree differs from the upstream Linux device tree.
One of the aspects it differs in is the "compatible" property of the
UART.  OpenBSD doesn't recognize this alternative "compatible" and
therefor won't find a suitable console device.  The result would be no
serial console output.

To test this hypothesis you could take the mt7986a-bananapi-bpi-r3.dtb
device tree from OpenBSD's dtb package and try to load that.

One warning though, support for the MediaTek SoC on this board in
OpenBSD is minimal.  Don't expect much more to work than just the
serial port...

Reply via email to