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>
Same functionality as the readline shell, but based on
ipython so that it has nicer help/autocomplete/etc
Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
Add a warning message when overriding the target serial device with
SECDEV variable, just in case one is caught by surprise there.
Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
Under macOS host, secondary UART device name is different from the linux
device name. Check OS name and chose default device name accordingly.
Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
This allows booting a kernel with the firmware cpio and a cpio
containing matching modules. The modules initramfs can be prepared from
the kernel source directory with:
`make dir-pkg && usr/gen_initramfs.sh -o initramfs_mod.cpio -u squash -g squash ./tar-install/lib/`
The modules are available in /modules/$(uname -r) and the initramfs can
handle modules in the same way as the vendor firmware to make them
available for itself and the main OS.
Signed-off-by: Janne Grunau <j@jannau.net>
* tools/run_guest.py: Allow specifying entrypoint for raw images
This allows running images other than m1n1 that don't have the
entrypoint at 0x800. If unspecified, it defaults to 0x800 for m1n1.
Signed-off-by: Javier Alvarez <javier.alvarez@allthingsembedded.net>
This allows running images other than m1n1 that don't have the
entrypoint at 0x800. If unspecified, it defaults to 0x800 for m1n1.
Signed-off-by: Javier Alvarez <javier.alvarez@allthingsembedded.net>
Move the regmap from experiments/ to a handier place. Also add the
codec to trace_codecs.py and codecshell.py.
Signed-off-by: Martin Povišer <povik@protonmail.com>
Replace the handrolled implementation in experiments/agx_1tri.py and
tools/reset_panic_counter.py.
In addition reset the panic counter in reboot.py and run_guest.py. If
can reboot or start guests the boot process works fine and macOS
recovery needs to leave us alone.
Signed-off-by: Janne Grunau <j@jannau.net>
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>
-t is optional, we may not have a tty_dev, so we can avoid trying to
grab the baudrate from it if it's unspecified.
We don't want to use dtb_addr for booti; this is the unmodified payload.
m1n1 will load it and add bits to it at a separate address for passing
on to U-Boot. For booti purposes, we actually want the augmented FDT
rather than the user-specified.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
This doesn't really take any significant time and is the correct thing
to do. Use --no-sepfw for e.g. serial bring-up where doing the ADT dance
costs measurable time.
Signed-off-by: Hector Martin <marcan@marcan.st>