Provide a way to include a directory of files in the firmware image
created by build-efi
This is useful for including a U-Boot environment, for example.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
When running U-Boot as an EFI application under EDK2/OVMF, U-Boot doesn't
have direct access to QEMU's fw_cfg interface. To support the --bootcmd
option, write a uboot.env file to the EFI partition containing the boot
command.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Complete writing of any output before running QEMU, since otherwise it
does not always appear until QEMU exits (e.g. with 'tee')
Signed-off-by: Simon Glass <sjg@chromium.org>
The USB mouse seems to have an absolute-pointer driver which can be
enabled in OVMF. Switch to this for x86.
Signed-off-by: Simon Glass <sjg@chromium.org>
Since the U-Boot app now requests 512MB (to fit the ramdisk, etc.) and
Tianocore uses some as well, the current 512MB is not enough. Double it.
Signed-off-by: Simon Glass <sjg@chromium.org>
The pager can interfere with tests and there is a lab test which uses
the build-efi script. Add an option to disable the pager so that the
labgrid test can request that.
Signed-off-by: Simon Glass <sjg@chromium.org>
When running in CI it is better to specify the build directory rather
than provide a device. Add a --build-dir option.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the root disk conflicts with the boot disk used to hold the
app (or payload). Use virtio for this disk and number the others after
that.
Signed-off-by: Simon Glass <sjg@chromium.org>
The build-efi and build-qemu scripts have common code to set up the root
disk. Move it to build_helper to avoid duplication.
Signed-off-by: Simon Glass <sjg@chromium.org>
Providing a kernel, initrd and related options are useful in the EFI app
too, so move them into the common code.
Signed-off-by: Simon Glass <sjg@chromium.org>
We want to use the -K option for providing a kernel via QEMU's QFW
interface. Perhaps we could use the same option and require that the
file be provided always, but that is less convenient.
For now, rename the option.
Signed-off-by: Simon Glass <sjg@chromium.org>
It seems better to specify the arch rather than using somewhat cryptic
flags. The build-qemu scripts uses -a (for Architecture) so do the same
for build-efi
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This is not really needed, since it is the default and we have -p to
select the payload. It also conflicts with -a in build-qemu
Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
The two main QEMU scripts (build-efi and build-qemu) share some common
arguments, so put them in the common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the -bios option is used to specify the firmware, but this does
not allow settings to be adjusted.
Use the pflash method instead, with a separate variables file, so that
settings can be changed.
Add a -g option to tell QEMU to stop and wait for gdb to connect.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a -v option for verbose output. For now this just shows the QEMU
cmdline before starting it. This allows the user to start it separately,
perhaps tweaking the args.
Signed-off-by: Simon Glass <sjg@chromium.org>
Bring this script into line with build-qemu so an OS and release can be
specified. As with that script, only Ubuntu is supported for now.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is a useful feature when booting the EFI app, so add this option to
the build-efi script too, matching the same option in build-qemu
Signed-off-by: Simon Glass <sjg@chromium.org>
Make use of the mk_fs() function to avoid needing to use sudo to mount
the loopback partition. This makes the script a little more friendly for
those nervous about sudo in their tools.
Signed-off-by: Simon Glass <sjg@chromium.org>
The .py extension isn't very useful. Drop it and update the shebang to
specify Python 3
Update the docs for this and also drop the old reference to 2021 images.
Signed-off-by: Simon Glass <sjg@chromium.org>