We don't need to force building of the ESL dtsi or capsule file if they
already exist. Drop the FORCE dependencies.
Signed-off-by: Simon Glass <sjg@chromium.org>
A few of the steps are longer than the 7 characters allowed. Shorten
them so that the build output looks better:
Signed-off-by: Simon Glass <sjg@chromium.org>
When U-Boot is used as a library with other programs, some U-Boot
function names may conflict with the program, or with standard-library
functions. For example, printf() is defined by U-Boot but is typically
used by the program as well.
The easiest solution is to rename symbols in the object file, so that
they appear with a 'ub_' prefix when linked with the program.
Add a new build_api.py script which can:
- rename symbols based on a rename.syms file
- generate a header file (with the renamed symbols) for use by the
program
This makes use of the 'objcopy --redefine-sym' feature.
The tool has 100% test coverage.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
When CONFIG_CHID is enabled, U-Boot must have access to a set of CHIDs
which it can use to identfy the hardware it is running on.
Add support for reading a hwids/compatible.hwidmap file in the board
directory and including the information in the board's devicetree.
This works by running the hwids_to_dtsi.py.py script and putting the
result in the dtsi_include_list variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a Python script to convert Hardware ID files (as produced by
'fwupd hwids') into a devicetree format suitable for use within U-Boot.
Provide a simple test as well.
Co-developed-by: Claude <noreply@anthropic.com>
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>
The helper deals with whether we are actually running or not. We want it
to show the arguments even if not. So always call it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Put this in the helper so that we can (later) have it show the correct
error when the virtiofs daemon fails.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the OS disk conflicts with the boot disk used to hold the
app (or payload). Number the OS disk after that.
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>
There is no harm in always having this device enabled, thus reducing the
number of script arguments. Enable RNG always.
Series-to: concept
Series-version: 2
Series-changes: 2
- Use /dev/urandom instead, dropping the now-unnecessary arguments
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
The current mechanism uses a completely separate build rule for each
file which must be built with system headers.
Before adding any more files, adjust the scheme so that the flags are
handled in the common Makefile, with sandbox simply listing the files
affected.
Signed-off-by: Simon Glass <sjg@chromium.org>
Q35 is newer and has a native PCI Express bus. Move to using this by
default.
Update the QEMU script to select the correct machine.
Signed-off-by: Simon Glass <sjg@chromium.org>
EFI has a Boot Graphics Record Table which can be used to show a logo
when booting up and shutting down.
Add support for adding this to the image, using a U-Boot logo which
includes the name, since many people will be unfamiliar with the logo.
Signed-off-by: Simon Glass <sjg@chromium.org>
This rule assumes that any .bmp file relates to the logo. We want to be
able to add a second BMP in some cases, so update the rule to match
a filename ending in '_logo.bmp'
Signed-off-by: Simon Glass <sjg@chromium.org>
Sometimes it is useful to provide several disks to QEMU. Update the -d
flag to support this. It can be used like this:
scripts/build-qemu -d root.img mmc6.img -r
Signed-off-by: Simon Glass <sjg@chromium.org>
Sometimes it is useful to use SCSI instead of the plain virtio. Add a
-S option to connect the root disk via SCSI.
Drop the -S for --sct-seq since it is a less common option.
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>
If linker lists have inconsistent alignment it can cause strange
runtime errors. Add a script that can detect and report these problems.
Signed-off-by: Simon Glass <sjg@chromium.org>
Qboot is a good demonstration of the fastest possible boot on x86. Add
a way to run Qboot instead of U-Boot, for easy comparison.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a -C flag to enable the serial console when booting Linux. This is
only supported on x86, but a future -c flag might perhaps support other
archs.
Signed-off-by: Simon Glass <sjg@chromium.org>
QEMU provides a special way to pass a kernel and a devicetree via the
QFW interface. Add -K and -I options to provide these.
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>