Commit Graph

98464 Commits

Author SHA1 Message Date
Simon Glass
0c856610a9 Merge branch 'devops' into 'master'
CI: Automate releases with a scheduled job

See merge request u-boot/u-boot!113
2025.07-rc2
2025-07-18 02:44:45 +00:00
Simon Glass
75360e4c45 CI: Automate releases with a scheduled job
Introduce a new CI job in .gitlab-ci-release.yml to automate the
creation of project releases.

This single job, designed to run on a schedule, contains logic to:

  - create a final release (e.g. 2025.08) on the first Monday of an
    even-numbered month.
  - create a release candidate (e.g. 2025.07-rc1) on all other
    scheduled days.

This uses official release-cli to create both the git tag and the
corresponding GitLab Release entry automatically.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-18 02:44:28 +00:00
Simon Glass
5799c8f9b1 Merge branch 'play' into 'master'
CI: Add a beagleplay board

See merge request u-boot/u-boot!124
2025-07-18 02:43:51 +00:00
Simon Glass
a00a473657 CI: Add a beagleplay board
This board is interesting since it has two separate U-Boot builds. Add
it to the sjg lab.

Add the required support for a second build directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-17 20:42:00 -06:00
Simon Glass
d3e3575148 Merge branch 'fix-spl' into 'master'
spl: Finish rename of jump_to_image_no_args()

See merge request u-boot/u-boot!123
2025-07-18 01:51:19 +00:00
Simon Glass
dbe7b5ae23 spl: Finish rename of jump_to_image_no_args()
Some uses of this weak function were missed. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: e2670b665d
2025-07-17 18:30:01 -06:00
Simon Glass
630c46362a Merge branch 'colib' into 'master'
test: Check booting via a script on an ARM board

See merge request u-boot/u-boot!122
2025-07-15 23:16:10 +00:00
Simon Glass
7c4ce04b1d test: Check booting via a script on an ARM board
Use the Colibri-iMX8x board to check that booting with a U-Boot script
works as expected.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 19:04:54 -06:00
Simon Glass
acce346379 Merge branch 'qemj' into 'master'
bootm: Clean up arch-specific, pre-OS clean-up

See merge request u-boot/u-boot!121
2025-07-13 00:07:42 +00:00
Simon Glass
712dd7cebc x86: Drop bootm_announce_and_cleanup()
Now that bootm_final() does most of what we want, drop this separate
function.

Series-to: concept
Cover-letter:
bootm: Clean up arch-specific, pre-OS clean-up
Each arch does something slightly different before booting the OS. Some
archs even do different things depending on the CPU type.

EFT_LOADER has its own special code, regardless of which arch is being
booted.

It is quite hard to know what actually happens in the final milliseconds
before the OS boot.

This series attempts to clean up U-Boot in this area.

The basic approach is to create a new bootm_final() function which is
called by all archs. It provides some flags for a couple of necessary
variations but otherwise it is generic.

RISC-V, x86 and ARM are converted over to use this new function. For
consistency, EFI loader is converted as well.

A noteable change is that EFI_LOADER now does bootstage processing
before boot, if enabled, thus producing a report.

Future work could take this a little further:
- Drop board_quiesce_devices() and rely on driver model for that
- Similarly with udc_disconnect()
- cleanup_before_linux() could use more details as to what it is
  supposed to do, to reduce the number of arch-specific variations
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:25:43 -06:00
Simon Glass
08f9163483 riscv: Drop announce_and_cleanup()
Now that RISC-V's announce_and_cleanup() function matches bootm_final(),
just use the latter.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:24:31 -06:00
Simon Glass
9571da723b arm: Drop announce_and_cleanup()
Now that ARM's announce_and_cleanup() function includes the same steps
as bootm_final(), just use the latter.

Move over part of a comment which seems useful.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:24:03 -06:00
Simon Glass
6da757f538 bootm: Move bootm_disable_interrupts() to bootm_final()
Move disabling of interrupts to bootm_final() so it is done for bootm
and EFI boot paths. Drop the now-duplicate calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:22:33 -06:00
Simon Glass
309c53edbb bootm: Drop re-enabling of interrupts on error
The logic in bootm to re-enable interrupts if the OS fails to boot does
not seem very useful, since the board resets immediately afterwards.

Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:21:34 -06:00
Simon Glass
ec4efd7f0f bootm: Move board_quiesce_devices(void) to bootm_final()
This function is called just before boot, so move it from EFI into the
common bootm_final() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:18:52 -06:00
Simon Glass
490dbf1968 bootm: Call cleanup_before_linux() from bootm_final()
Add this call to the bootm_final() function, dropping it from RISC-V

Add a flag to ensure that cleanup_before_linux() is not called when
booting an EFI app.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:18:52 -06:00
Simon Glass
7482087639 bootm: Move cleanup_before_linux() to bootm.h
Move the declaration of this function to a common header. Make sure it
is included by files which define it.

Fix up a few whitespace problems while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:18:34 -06:00
Simon Glass
0cde568159 x86: Add cleanup_before_linux()
This function is not present on x86, but there is an x86-specific
version which is never called. Add the former, making it call the
latter.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:17:08 -06:00
Simon Glass
898b951842 efi: Drop EFI_GRUB_ARM32_WORKAROUND
This work-around dates from 2019 and grub 2.04 which is quite old. New
builds of grub don't have the problem and old boards presumably use an
older U-Boot, so don't need this.

Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:16:50 -06:00
Simon Glass
a1ae8de12c riscv: Call bootm_final()
Make use of this function, adding some pieces needed by RISC-V

Drop the udc_disconnect() from EFI_LOADER since it is now done in
bootm_final()

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:14:47 -06:00
Simon Glass
d095cf76ba riscv: Drop board_quiesce_devices()
This is not used on RISC-V so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:14:47 -06:00
Simon Glass
c3b0c2979e x86: Call bootm_final()
The x86 code in bootm_announce_and_cleanup() is very similar to the new
bootm_final() function, so just use the latter. Move over a useful
comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:14:47 -06:00
Simon Glass
bd57096c36 bootm: Do bootstage processing in bootm_final()
Mark kernel start before booting. If enabled, show a bootstage report.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:13:03 -06:00
Simon Glass
df1d27e51c bootstage: Add some missing dummy functions
Neither bootstage_fdt_add_report() nor bootstage_report() has a dummy
double for when bootstate is disabled. Add them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:07:04 -06:00
Simon Glass
1490f70f9d bootm: Add a message when booting
Add a message about starting the kernel. For EFI this will be printed
when boot-services are exited.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 16:07:03 -06:00
Simon Glass
148240871e efi: Make use of bootm_final()
Call this function from the EFI code. Add the required call to
dm_remove_devices_active() there.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 15:59:38 +02:00
Simon Glass
ed1c8186cf boot: Create a function for final pre-boot steps
There are various functions which announce that booting is imminent and
do related preparation. Most of these are arch-specific.

In practice, most archs do the a similar thing. It would be better to
have a common function, with perhaps some events for things that are
really arch- and board-specific.

Create a new function for this. For now, nothing uses it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 15:59:38 +02:00
Simon Glass
469917f67d test: Only show the timing summary if test actually run
If there is a failure before any test manages to run, the timing summary
will not be present. Handle this case to avoid a strange exception.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 15:59:38 +02:00
Simon Glass
62c19a204f Merge branch 'virt' into 'master'
Minor improvements to virtio-fs

Closes #15

See merge request u-boot/u-boot!119
2025-07-12 13:47:30 +00:00
Simon Glass
2b66e2f9d3 fs: Reuse a directory device when accessing the same dir
At present a new directory device is created for every access to a
directory. This means that a new device is always created when 'ls' is
used.

Where the directory being accessed matches an existing device, this is
not necessary.

Check that path against existing directories and reuse the device if
possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 15:14:47 +02:00
Simon Glass
878f27e552 fs: Use an empty string for the root directory
It is easier to use an empty string when the root directory is intended.
Adjust the code to drop use of "/" and NULL and just use and empty
string.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 14:29:06 +02:00
Simon Glass
1560075474 virtio: Correct dir creation to use existing stream
Rather than creating a new stream, which gets lost, virtio_fs_dir_open()
should use the existing one. Fix it, so that the fh member is preserved
for future use.

This fixes a problem where the fh value is not preserved, thus causing
a subsequent 'ls' on the same directory to fail.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: #15
2025-07-12 14:29:06 +02:00
Simon Glass
753438e516 virtio: Add a little more debugging
Add some debugging to virtiofs in the directory-handling area.

Drop a stray, blank line while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 14:29:06 +02:00
Simon Glass
41d10e0f8b Merge branch 'ci-lab' into 'master'
Lab selection from git push

See merge request u-boot/u-boot!120
2025-07-12 11:40:01 +00:00
Simon Glass
394d25c2b6 gitlab: Support running on a particular lab board
Sometimes it is useful to test a commit just on the lab, or even just on
a particular board in the lab. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 12:56:35 +02:00
Simon Glass
c0aed65cdf hook: Add hooks for okoro
Provide a symlink so that tests can run on okoro (a laptop).

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 12:53:22 +02:00
Simon Glass
213cc053f0 doc: Add pointers to the concept tree
Expand the CI documentation to mention the concept tree. Add a reference
to the page from the build page.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 12:53:22 +02:00
Simon Glass
7627e3cdb8 Merge branch 'qemi' into 'master'
emulation: Improve ACPI support for qemu-x86_64

See merge request u-boot/u-boot!116
2025-07-12 07:14:10 +00:00
Simon Glass
f614197115 emulation: Add the BGRT on the end of the QEMU tables
It is useful to show a boot logo when starting up. Add the BGRT table
after the QEMU-provided tables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Cover-letter:
emulation: Improve ACPI support for qemu-x86_64
When running under QEMU U-Boot obtains its ACPI tables from QEMU, since
it has the require information. This works well in most cases.

QEMU also provides SMBIOS tables, but U-Boot doesn't currently use those
on x86. This creates problems if a VM environment is expecting to see
particular values (e.g. those which it passed to QEMU!) when booting. So
this series switches QEMU on x86 to use those SMBIOS tables.

Finally, there is a facility in EFI for showing a boot logo, via a BGRT
table. QEMU does not provide this itself, so this series augments the
ACPI tables with a new BGRT table containing a suitable logo.
END
2025-07-12 07:57:47 +02:00
Simon Glass
6d2aabd2cc emulation: Drop computing the ACPI checksum
QEMU provides a table indicating the checksums to be calculated. U-Boot
already handles this, so we don't need to compute the checksums at the
end. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00
Simon Glass
3be860fe74 acpi: Support a boot logo (BGRT)
Add support for creating a BGRT so that Linux will show a logo on
startup and shutdown.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02: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
c42e00c7cc qemu: Use SMBIOS tables from QEMU
While U-Boot can create its own tables, the ones from QEMU should be
used when booting within QEMU. For example, LXD uses some of the fields
to decide whether to start cloud-init or not.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00
Simon Glass
3354f95e7e acpi: Provide a way to locate the end of the ACPI tables
For QEMU we want to add new tables to the end of what QEMU provides. Add
a function to find the correct place for a new table.

Add a function to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00
Simon Glass
34203312d0 acpi: Allow finding the RSDT or XSDT
At present acpi_find_table() support locating most of the tables, but
not these two, since they are the pointers to the rest.

When adding new tables, these tables need to be located and updated, so
update acpi_find_table() to allow searching for them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00
Simon Glass
84dfe7f251 acpi Adjust dm_test_acpi_find_table() to use a fixed buffer
Most sandbox tests use a fixed address in emulated RAM so that it is
easier to debug test failures. Update dm_test_acpi_find_table() to work
this way.
2025-07-11 21:12:11 +02:00
Simon Glass
e593cc86be acpi: Move code table-writing code to lib/acpi/acpi.c
The acpi_table.c file includes ACPI_WRITER() declarations and is only
included in the build if CONFIG_ACPIGEN is enabled.

For QEMU we want to augment the tables provided via qfw, but
CONFIG_ACPIGEN is not enabled.

Move the core functions out to the acpi.c file which is included in all
x86 builds. This allows the QEMU build to make use of these functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00
Simon Glass
2d72a90152 acpi: Pull out setup code from acpi_find_table()
The start of this function determines whether xdst or rdsp is used for
locating tables. Move it into a separate function so that we can use
this logic elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00
Simon Glass
ff86c28784 emulation: Simplify write_acpi_tables()
Update this function to make use of the new support for reading qfw
files, this simplifying it considerably.

Fix up the header order while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-11 21:12:11 +02:00