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?


Can I solve this issue without having to recompile the kernel?



Thomas


F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1001 0000 [0200]
F3: 1001 0000
F6: 300C 0028
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
T0: 0000 0392 [010F]
Jump to BL

NOTICE:  BL2: v2.6(release):c30a1caf827-dirty sdmmc
NOTICE:  BL2: Built : 21:35:11, Aug 10 2024
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7986 (2000MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 2048MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.6(release):c30a1caf827-dirty sdmmc
NOTICE:  BL31: Built : 21:35:15, Aug 10 2024


U-Boot 2024.07-rc3-mt7986-43599-gbc68f3572ff (Aug 10 2024 - 21:29:30 +0200)

CPU:   MediaTek MT7986
Model: BananaPi BPi-R3
DRAM:  2 GiB
Core:  44 devices, 19 uclasses, devicetree: separate
MMC:   mmc@11230000: 0
Loading Environment from MMC... Reading from MMC(0)... *** Warning - bad CRC, 
using default environment

In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Net:   
Warning: ethernet@15100000 (eth0) using random MAC address - 16:75:30:ee:b0:0c
eth0: ethernet@15100000
No EFI system partition
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
    26894   bcm2710-rpi-2-b.dtb
    29011   bcm2710-rpi-3-b-plus.dtb
    28392   bcm2710-rpi-3-b.dtb
    26890   bcm2710-rpi-cm3.dtb
    49090   bcm2711-rpi-4-b.dtb
    48810   bcm2711-rpi-400.dtb
    49202   bcm2711-rpi-cm4.dtb
    52456   bootcode.bin
       65   config.txt
            efi/
     7314   fixup.dat
     5448   fixup4.dat
            overlays/
  2953312   start.elf
  2229120   start4.elf
   570680   u-boot.bin
    11304   mt7986a-bpi-r3-sd.dtb

15 file(s), 2 dir(s)

enter kernel-name: 
## Error: "kernelinput" not defined
## Error: "initrd" not defined
PARTITION_CONFIG only exists on eMMC
sd available
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: ff, ef, aa
Failed to initialize SPI flash at 0:0 (error -2)
NAND available
sd nand
fit=bpi-r3.itb
Failed to load 'bpi-r3.itb'
BPI-R3> 
BPI-R3> fatload mmc 0:5 0x46000000 /efi/boot/bootaa64.efi
227979 bytes read in 18 ms (12.1 MiB/s)
BPI-R3> fatload mmc 0:5 0x47000000 /mt7986a-bpi-r3-sd.dtb 
11304 bytes read in 2 ms (5.4 MiB/s)
BPI-R3> bootefi 0x46000000 0x47000000
Booting /\efi\boot\bootaa64.efi
disks: sd0*
>> OpenBSD/arm64 BOOTAA64 1.18
boot> 
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 3023768+1214656+12712936+633232 
[269381+91+701664+287051]=0x13edb50

Reply via email to