The FreeBSD script added in #185 required patching u-boot since it specified the
loader base/size in a non-standard way. This changes the way arguments are
passed to the bootefi command so it works with the asahi u-boot fork which I've
been using. I also changed the case where the loader isn't specified to have
u-boot boot from the nvme since I have that driver functional enough to have it
mount the root fs now.
Signed-off-by: Ayrton Munoz <a.munoz3327@gmail.com>
The differences are documented in the script itself, but the main odd
bit is that we pass the provided kernel as an initramfs. Our modified
loader will probe for the initramfs start/end props in FDT and put up
a memdisk that we load the kernel from. This choice was made for two
reasons:
1.) Avoid ad-hoc interpretations of a memory region in m1n1, it doesn't
care if we actually passed it an initramfs or not anyways.
2.) We already had some code on hand to do this in our loader, so I
suspect we've done similar shenanigans elsewhere anyways.
This also requires a U-Boot change to allow bootefi of an arbitrary
location, as long the size is provided.
The alignment constraints for loader/kernel were kept arbitrarily. The
kernel will be bounced anyways by loader. I don't recall what
alignment requirements UEFI payloads have, but 2M seems reasonable.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>