Commit Graph

1709 Commits

Author SHA1 Message Date
Simon Glass
935ae7fc6a scripts: build-efi: Use a locally built OVMF image
The standard OVMF image does not include mouse support. Use a locally
built release build instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-18 09:38:25 +01:00
Simon Glass
b1110b1fe7 scripts: build-efi: Use the USB mouse
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>
2025-10-13 14:20:15 +01:00
Simon Glass
fae5a7c0fc scripts: build-qemu: Add --bootcmd option to pass bootcmd via fw_cfg
Add a --bootcmd option to the build-qemu script that allows passing a
boot command to QEMU via fw_cfg. The bootcmd is written to the
"opt/u-boot/bootcmd" fw_cfg entry, which can be read by U-Boot's
EVT_BOOTCMD handler.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-07 06:13:49 -06:00
Simon Glass
ed6674e5be acpi: bgrt: Move the BGRT image into the images directory
Move the BGRT image to use the same video_image linker-list approach
as the other embedded image. Move it into the drivers/video/images
directory and rename it to 'bgrt.bmp' since we know it is an image.

Drop the old bgrt Makefile rule as it is no-longer needed.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:51:03 -06:00
Simon Glass
d16fbb3f52 video: Support a linker list of images
It is inconvenient to have to access graphical images as independent
symbols. Create a new rule which handles any file mentioned in
drivers/video/images/Makefile

For each graphical image, embed in the image and create a linker-list
entry for it.

Series-changes: 2
- Use Canonical copyright

Series-changes: 3
- Rename it to video_defs.h since we will use it elsewhere

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:50:57 -06:00
Simon Glass
81e1ce0ea7 script: Use a minimum of 1G of memory for EFI
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>
2025-09-24 18:29:39 -06:00
Simon Glass
4669ad3785 scripts: Update build-efi/qemu to support disabling pager
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>
2025-09-23 12:22:45 -06:00
Simon Glass
08faed68c3 scripts: Fix RST formatting in release_version.py
Fix line continuation in generate_schedule() that caused Sphinx to fail
with "Bullet list ends without a blank line; unexpected unindent" error.
Add tests to validate RST formatting of generated documentation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
0e944b89ab scripts: Fix conditional syntax for capsule ESL generation
The ifeq/else/endif conditional for capsule_esl_file generation was
incorrectly placed inside the recipe, causing malformed Makefile syntax
that prevented proper dependency resolution. This resulted in build
failures when CONFIG_EFI_CAPSULE_AUTHENTICATE was enabled because the
capsule_esl_file target could not be created from the certificate file.

Move the conditional to properly wrap the rule definitions, allowing
Make to correctly parse and execute the capsule ESL generation rules.

Signed-off-by: Simon Glass <sjg@chromium.org>
Co-developed-by: Claude <noreply@anthropic.com>
2025-09-19 11:42:34 -06:00
Simon Glass
ff37f4218a script: Support mouse with build-efi/qemu scripts
Provide arguments to QEMU to enable a mouse. Note that this does not
work with EFI at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-15 04:49:38 -06:00
Simon Glass
c448fc201c CI: Allow empty EXTRAVERSION
This can be empty for final releases, so adjust the logic to cope with
that.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-12 05:05:17 -06:00
Simon Glass
e2dc195820 CI: Correct the release numbering
This is around the wrong way. It should start with rc1 and progress up
from there. Fix this.

Also ensure that releases only happen every second Monday.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-12 05:05:16 -06:00
GitLab CI Runner
4fe2797092 scripts: Add Python-based release version calculation system
Add a Python script to replace shell-based release version calculations
with proper datetime handling:

Features:
- Calculates release versions based on U-Boot's bimonthly schedule
- RC numbering counts backwards from final release (rc1=2wks, rc2=4wks,
  rc3=6wks)
- Dead-period detection for dates too early in release cycle
- Automatic Makefile version updates
- Release documentation generation and updates
- Multiple output formats (shell variables, JSON, version string)

Testing:
- 39 comprehensive test cases covering all scenarios
- 93% test coverage including edge cases and error handling
- Tests for cross-year boundaries, dead periods, and file operations

The script provides robust release automation for the GitLab CI pipeline
with proper error handling and extensive validation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org)
2025-09-11 22:00:10 -06:00
Simon Glass
e63307f8c0 efi: Add a missing dependency for capsule_esl_dtsi
The input file is used to process the dtsi, so add a dependency. This
bug was previously masked by a FORCE which was removed in

   7738c4c2d7 Makefile: Avoid FORCE with ESL

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-10 11:37:03 -06:00
Simon Glass
7738c4c2d7 Makefile: Avoid FORCE with ESL
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>
2025-09-09 22:58:34 +00:00
Simon Glass
53a402b8c6 Makefile: Avoid FORCE with test overlays
We don't need to force building of these files if they already exist.
Drop the FORCE dependencies.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
eeaaa9c448 Makefile: Avoid FORCE with CHID
We don't need to force building of this file if it already exists. Drop
the FORCE dependency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
896268f40e Makefile: Shorten a few quiet build steps
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>
2025-09-09 22:58:34 +00:00
Simon Glass
f379b6570f ulib: scripts: Add a script to support symbol-renaming
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>
2025-09-08 13:09:56 -06:00
Simon Glass
a9e04b5d36 Makefile: Integrate CHID files into the build
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>
2025-09-04 07:08:25 -06:00
Simon Glass
7d793ccadd scripts: Add a tool to convert CHIDs to devicetree
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>
2025-09-04 07:08:25 -06:00
Simon Glass
c6883b8a71 scripts: Add an option for the build directory
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>
2025-08-12 13:41:05 -06:00
Simon Glass
7c63cdd830 scripts: Correct virtio-sci typo
Fix a small typo in the help.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 16:53:16 -06:00
Simon Glass
5f6e2806b0 scripts: build-efi: Enable the display on ARM
Enable the display on ARM devices, so it works when running Tianocore.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 16:53:16 -06:00
Simon Glass
79c09c4244 scripts: build-qemu: Always call the run() function
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>
2025-08-08 16:53:16 -06:00
Simon Glass
0d08920da2 scripts: build-qemu: Enable the display on ARM
ARM devices can use a GPU display, which U-Boot only recented supports.
Enable the option.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 16:52:48 -06:00
Simon Glass
219adf6bf8 scripts: build-qemu: Correct networking
Networking is not currently enabled, since the wrong variable is used.
Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 15:59:43 -06:00
Simon Glass
654bf17503 scripts: build-qemu: Support Tianocore on ARM
When ARM is selected, use the ARM Tianocore image.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 15:59:43 -06:00
Simon Glass
4470f4f729 scripts: build-qemu: Move virtiofsd code into the helper
Move this code into the helper so that build-efi can use it too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 15:59:43 -06:00
Simon Glass
2a6a7e9716 scripts: build-qemu: Move qemu program-name to the helper
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>
2025-08-08 15:59:43 -06:00
Simon Glass
a783a7ea64 scripts: build-qemu: Move memory size to the helper
Move this field to the helper so we can (later) have it set up the
virtiofs daemon.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 15:59:43 -06:00
Simon Glass
68ec2401ad scripts: Adjust EFI script to support an OS
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>
2025-08-08 14:47:39 -06:00
Simon Glass
f7a683d3f3 scripts: Adjust EFI script to support a root disk
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>
2025-08-05 11:49:30 -06:00
Simon Glass
3cf8c74bb7 scripts: Always use the RNG device with QEMU
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>
2025-07-30 13:42:18 +12:00
Simon Glass
3b8ed0cebb sandbox: Adjust how OS-interface files are built
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>
2025-07-23 20:19:42 -06:00
Simon Glass
5db07904c5 x86: emulation: Move the x86_64 build to Q35
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>
2025-07-22 14:39:37 -06:00
Simon Glass
a4a1a69412 acpi: Provide a way to build in a boot logo
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>
2025-07-11 21:12:11 +02:00
Simon Glass
4f8548284b scripts: Make the build rule for the logo more specific
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>
2025-07-11 21:12:11 +02:00
Simon Glass
cbc27536ff scripts: build-qemu: Support a random-number generator
Add a --rand option to enable access to /dev/random from QEMU.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-10 07:26:51 +02:00
Simon Glass
1492937d63 scripts: Allow -d to specify multiple disks in build_helper
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>
2025-07-09 23:11:32 +02:00
Simon Glass
b3d8820e98 scripts: Support a root disk connected via virtio-scsi
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>
2025-07-02 12:34:59 -06:00
Simon Glass
65d7446e31 scripts: Move root-disk processing to helper
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>
2025-07-02 12:34:59 -06:00
Simon Glass
fcc852c0f0 scripts: Move OS selection into the helper
Both scripts allow booting from an ISO containing an OS, so move this
handling into the common helper.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-30 14:25:33 -06:00
Simon Glass
e2e338d4f1 scripts: Move bitness and os_arch to helper
These two concepts are used in both scripts, so move them to the helper.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-30 14:14:58 -06:00
Simon Glass
f8de2c4048 scripts: Move some QEMU-arg building into build_helper
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>
2025-06-30 14:14:58 -06:00
Simon Glass
cd73d77f92 scripts: build-efi: Use --write-kernel instead of -K
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>
2025-06-30 14:14:58 -06:00
Simon Glass
686ee0523a scripts: build-efi: Use -a instead of -A
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>
2025-06-30 14:14:58 -06:00
Simon Glass
12e532f710 scripts: build-efi: Drop the -a option
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>
2025-06-30 14:14:58 -06:00
Simon Glass
ce85d868e1 scripts: Use the same main() approach fo both scripts
Add a main() function for EFI and adjust the scripts to look the same in
this area.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-30 14:14:57 -06:00
Simon Glass
c44dd6832c scripts: Move common arguments into build_helper.py
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>
2025-06-30 14:14:57 -06:00