Opened 4 years ago

Last modified 4 years ago

#16499 new bug

uboot.scr script lockup u-boot.bin + qemu

Reported by: kallisti5 Owned by: nobody
Priority: low Milestone: Unscheduled
Component: System/Boot Loader Version: R1/beta2
Keywords: u-boot Cc:
Blocked By: Blocking:
Platform: All

Description

When attempting to use u-boot.bin + qemu on arm to load our EFI bootloader, our boot.scr locks up here:

Found U-Boot script /boot.scr
1563 bytes read in 2 ms (762.7 KiB/s)
## Executing script at 40200000
Haiku u-boot script entry
(LOCKUP)

I dug into this in the past, and it turns our loading an environment file in qemu results in a lockup. This doesn't happen anywhere except u-boot.bin running under qemu.

I originally had a "really hacky" workaround here but removed it: https://git.haiku-os.org/haiku/commit?id=9f739dd2e868114ce19ae73afcff07caf2ddb8b6

test ${media} != virtio && test -e ${media} 0 uEnv.txt && fatload ${media} 0 ${scriptaddr} uEnv.txt && env import -t ${scriptaddr} ${filesize} \

Essentially, if bootmedia is not virtio, load uEnv.txt from the block device. The lockup if I remember correctly happens during the env import

Mostly storing this issue here for bus factor since i'm the only one who knows about it :-)

Change History (1)

comment:1 by kallisti5, 4 years ago

Oh.. I removed it since we use uEnv.txt as a source of knowledge on if we're using an efi or native u-boot loader. (and the path to said loader)

We might be able to rewrite this to "look for the relevant /EFI/BOOT/BOOTARM.EFI" and use it if found... but we would need to calculate the EFI loader name within the boot.scr. (I didn't see a simple way, so didn't do this)

At some point, boot.scr might be able to "completely go away" since u-boot actually tries to find an EFI loader at the expected paths.. but boot.scr is required if we'll ever want to use the native u-boot loader.

Note: See TracTickets for help on using tickets.