b24dbf95d0
* Tianocore is still in an early state for RISCV64 with a lot of work needed around qemu support. * u-boot however is working, and can load EFI binaries... so follow the arm model for now. (EFI via u-boot, or EFI via EFI Bios) Change-Id: I3dfde25db17b114aedce6faefc58d7556e17a46a Reviewed-on: https://review.haiku-os.org/c/haiku/+/3176 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
18 lines
1.2 KiB
Plaintext
18 lines
1.2 KiB
Plaintext
echo "Haiku u-boot script entry"
|
|
test -e mmc 0 uEnv.txt && setenv media mmc
|
|
test -e virtio 0 uEnv.txt && setenv media virtio
|
|
test -e nvme 0 uEnv.txt && setenv media nvme
|
|
env exists media || echo "ERROR: Unable to locate uEnv.txt on any known media!" && exit
|
|
test -e ${media} 0 uEnv.txt && fatload ${media} 0 ${scriptaddr} uEnv.txt && env import -t ${scriptaddr} ${filesize}
|
|
env exists loader || echo "ERROR: uEnv.txt doesn't specify bootloader!" && exit
|
|
env exists platform || echo "ERROR: uEnv.txt doesn't specify platform!" && exit
|
|
echo "uEnv.txt says to look for ${platform} bootloader named ${loader} on ${media} 0!"
|
|
test -e ${media} 0 ${loader} && echo "Found ${loader} on ${media} 0!"
|
|
echo "Loading bootloader..."
|
|
fatload ${media} 0 ${kernel_addr_r} ${loader}
|
|
test -e ${media} 0 haiku_floppyboot.ub && fatload ${media} 0 ${ramdisk_addr_r} haiku_floppyboot.ub
|
|
env exists dtb && echo "Using custom DTB..." && fatload ${media} 0 ${fdt_addr_r} ${dtb} && fdt addr ${fdt_addr_r}
|
|
env exists dtb || echo "Using internal DTB..." && fdt addr ${fdtcontroladdr}
|
|
test "${platform}" = "efi" && echo "Launching EFI loader..." && bootefi ${kernel_addr_r}
|
|
echo "Haiku u-boot script fell through!" && exit
|