7127c048db
By updating $fdt_addr_r we can simplify boot-arm.scr.txt. Now we can explicitly pass the device tree address to bootefi instead of relying on a fallback inside U-Boot. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Change-Id: Ifceb574aca2814605a2e4e58e9187773817c5df2 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2970 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
19 lines
1.3 KiB
Plaintext
19 lines
1.3 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}
|
|
env exists dtb || echo "Using internal DTB..." && setenv fdt_addr_r ${fdtcontroladdr}
|
|
test "${platform}" = "efi" && echo "Launching EFI loader..." && bootefi ${kernel_addr_r} ${fdt_addr_r}
|
|
test "${platform}" = "u-boot" && echo "Launching ub loader..." && bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
|
echo "Haiku u-boot script fell through!" && exit
|