Commit Graph

99249 Commits

Author SHA1 Message Date
Simon Glass
6e79f1f503 doc: test: Add docs and test for part_find
Add some documentation and a test for this new command.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
1137ab205f cmd: Refactor part_find() into separate functions
This function uses #ifdefs and ends up with a very large indent, Split
it into two separate functions, one for the EFI app and one for other
builds.

Drop the use of config.h while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
1657f8ab08 cmd: sandbox: efi: Enable part_find for sandbox and EFI app
Enable this command for sandbox and the EFI app.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
004eb91bda cmd: part_find: Correct radix and calls
Recent work removed the if_type member. Update the code to use the new
method for obtaining the interface type.

Use hex so that large partition numbers (>=10) work correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
2f4e1b291f test: Allow creating disks with a different Ubuntu version
Add a way to specify the (fake) Ubuntu release being used, so that we
can (later) add more tests for this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:43:54 -06:00
Simon Glass
4e38954a41 test: Drop an unwanted blank line in dm_test_video_box()
This test has a blank line which separates one part of the test from
another. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-24 18:29:40 -06:00
Simon Glass
3ccd53b647 efi: Drop config.h
We don't need to include this file anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-24 18:29:39 -06:00
Simon Glass
f1e328709d efi: Avoid a memory leak in efi_bind_block() on error path
Free the memory used if an error occurs.

Series-to: u-boot
Series-cc: Matthew Garrett <mgarrett@aurora.tech>, efi
Cover-letter:
efi: Add docs and tests and a few tweaks
This series addresses feedback provided on the original series,
including:

- adding documentation and tests for the two new commands
- fixing an issue that somehow didn't fail in CI
- splitting up a large function into two parts
- using lmb for the allocation, instead of looking at internal tables
- dropping use of config.h

Link: https://lore.kernel.org/u-boot/20241123195616.305687-1-mjg59@srcf.ucam.org/
Link: https://patchwork.ozlabs.org/project/uboot/list/?series=433949&state=*&archive=both
END

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-24 18:29:39 -06:00
Simon Glass
801f6a72d3 doc: Fix up the booti examples
The command has been updated but the docs was left behind. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7f9e630a9e ("boot: Drop hex prefix from the booti image-mov..")
2025-09-24 18:29:39 -06:00
Simon Glass
82e2ee10d6 console: Reset the pager when clearing the console
When the console is cleared we have a fresh screen so we can reset the
pager.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-24 18:29:39 -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
d7c51083a6 bdinfo: Show the flags
The flags contain lots of little pieces of information. Print them out
with the bdinfo command, so the user can look them up if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-24 18:29:38 -06:00
Simon Glass
2712397363 Merge branch 'labh' into 'master'
Fixes for some test in the lab

See merge request u-boot/u-boot!186
2025-09-23 19:51:42 +00:00
Simon Glass
c3646ef52e test: Deal with the silent menu in grub
The distro test for EFI in the EFI ARM app is currently flaky.

If the test does not send an 'escape' character, then the board may boot
straight into Ubuntu. If it does, but didn't need to, then grub sits at
the command prompt.

Handle this by pressing escape twice (which should always go to the grub
command line), then using the 'normal' command to start the menu.

Series-to: concept
Series-cc: heinrich

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-23 13:45:23 -06:00
Simon Glass
16a1847b06 efi: test: Update distro EFI-app tests for new naming
The EFI-media devices names were recently changed to make it easier to
tell them apart. Update the tests as well, since this change caused them
to fail.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: dea4ea00a7 ("efi: Set the efi_media device name when binding")
2025-09-23 12:25:40 -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
abd0cb5a50 colibri-imx8x: Increase the boot delay
A delay of one second makes it hard for the lab to interrupt boot, thus
causing test failures. Increase it to 5s

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-23 12:19:20 -06:00
Simon Glass
136c959dd2 Merge branch 'loadw' into 'master'
boot: efi: Various improvements to booting with the EFI app

See merge request u-boot/u-boot!185
2025-09-23 17:36:53 +00:00
Simon Glass
783035c554 efi: app: arm: Add various options to the build
Enable some options which are useful for development:

- Show function names when logging
- Enable SMBIOS so we can view these tables
- Include kaslrseed support
- Enable commands for hashing images
- Support write on FAT filesystems

Series-to: concept
Series-cc: heinrich
Cover-letter:
boot: efi: Various improvements to booting with the EFI app
This series provides a number of tweaks which make it easier to test
booting with the EFI app, particularly on ARM:

- 'fake go' in bootstd
- more debugging in various places
- tidy up the generally incorrect ATAGs error
- drop a panic() in the bowels of boot
- ensure booti does not overwrite memory when relocating

It also includes a way to quit or disable the pager, which is very
helpful when running the app on a machine with no serial console.

Finally, a bug in the release script is causing CI to fail, so a few
patches deal with that.
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
5cdb093dfe efi: app: Move efi_main() to the bottom of the file
It is common for the main program to be at the bottom, but with recent
changes it has crept up a bit. Move it back to the bottom.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
b1248a5bc1 efi: app: Call efi_exit() if board_init_r() returns
Move the efi_exit() function further up the file and call it if the
board_init_r() function returns.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
18db472e85 efi: Include efi.h in the efi_variable.h header
This header makes use of efi_status_t so should include the header which
provides it. Add this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
695e4bef30 arm: Use lmb when relocating the image
It isn't necessarily safe to move the kernel (up to) 2MB higher in
memory. If the kernel is in a FIT, this may overwrite other data such as
the devicetree.

Use lmb (where available) as is done with other image relocations. Update
the return value to provide more specific information on failure.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
dbc1a770da lmb: Provide a static inline for lmb_alloc()
When building xilinx_zynqmp_kria we cannot access lmb_alloc() since it
it is not present in the image. The linker garbage-collection does not
seem to handle this either.

Follow the normal procedure in this case and declare a static inline.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
35cdcaa850 arm: bootm: Fix a confusing message about ATAGs
When an FDT is not provided, U-Boot currently says:

   FDT and ATAGS support not compiled in

even if CONFIG_OF_LIBFDT and CONFIG_LMB are enabled. This can send
people on a wild goose chase. Add a separate message for a devicetree
not being present.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
07bc1efe0a arm: Update boot_prep_linux() to return an error
Rather than panicing, return the error so that the top-level bootm logic
can decide what to do.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
829f6a3e0a boot: Add more debugging in FIT-handling
Provide return values from a few functions to make it easier to track
the flow of execution in a few places.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
46ea89dbf9 boot: Fix code formatting in fit_image_load()
Drop an unwanted blank line and format a few lines to 80cols.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
f0927fc920 boot: Add more debugging around devicetree selection
Provide some debugging for the select string and the FDT which is
actually chosen from the FIT.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
aaf889390f boot: Support a fake go with pxe
Provide a way to pass the 'fake go' flag from the bootflow flag through
to the PXE implementation, so that a request for a fake go
(via 'bootflow boot -f') is handled correctly in the bootmeth and when
booting.

Add a little more debugging of this in PXE.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:05 -06:00
Simon Glass
79ba2bc013 boot: Show the ramdisk node when debugging
Add a new debug line for the offset of the ramdisk node. Fix up some
missing newlines on other log messages in this file, while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
7f9e630a9e boot: Drop hex prefix from the booti image-moving message
This message includes the 0x prefix which is not used elsewhere. Drop it
for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
0df6320119 boot: Provide a bootflow option to fake a boot
Allow using 'bootflow boot -f' to fake a boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
47c1adb636 boot: Tidy up the bootflow flags
Use a BIT() macro to specify the flags. Fix an extra space in the
comment while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
424bb755a9 boot: Select the fake-go state explicitly
Rather than always going through this state, require callers to
explicitly request it. This will allow the option to be enabled without
affecting the boot, unless the user expressly requests it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
5e97965c34 boot: Provide a Kconfig to enable faking the boot
This feature was designed for tracing but can be useful for debugging
too, since it is possible to examine the state of the system just before
handing off to the OS.

Provide a separate CONFIG_BOOTM_FAKE_GO option to allow this feature to
be used separate from tracing. Enable it for the EFI app.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
dd80fd963c console: Add a way to quit pager with no further output
Add support for pressing 'q' to throw away any further output until the
prompt is reached.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
c7ba355d1f console: Add bypass keypress to disable paging
Add support for pressing 'Q' to put the pager into bypass mode,disabling
further paging for the current session.

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
e617ccfc40 console: Correct condition for setting enabled pager bypass
The pager should be bypassed if the terminal was not detected. Fix the
condition which actually says the opposite.

Also fix a long line in pager_post()

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -06:00
Simon Glass
b54422a25d console: Restore old pager test-bypass value
The test.py tests pass -P to sandbox to tell it to bypass the pager.
Tests which change this value must restore it to the old value.

Fix this, so that the -P setting remains in place across test runs.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 11:23:04 -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
43fa7974bf doc: Resolve a formatting error in upcoming releases
When there is a final release, it should be on the same line. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-22 09:38:26 -06:00
GitLab CI
05cebf0bdd docs: Add 2025.10-rc3 to release history 2025-09-22 09:40:07 +00:00
GitLab CI
238eb7c102 chore: Bump version for release candidate 2025.10-rc3 c2025.10-rc3 2025-09-22 09:40:05 +00:00
Simon Glass
3a2d787d68 Merge branch 'curs' into 'master'
video: Support a cursor more generally

See merge request u-boot/u-boot!184
2025-09-19 20:42:30 +00:00
Simon Glass
1fd04ae30a console: Add some cursor tests
Add a few tests of cursor operation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

Series-to: concept
Series-cc: heinrich
Cover-letter:
video: Support a cursor more generally
At present U-Boot does not support displaying a cursor on the console,
except with expo.

It is quite useful to have a cursor, particularly when using the
command-line editor.

This series adds tracking of the cursor position for both truetype and
normal consoles. The cursor is shown when U-Boot is idle and is removed
before writing characters to the display. A save-buffer ensures that the
old display contents are provided.

Some related improvements in this series include:
- expo lineedit support with normal console
- arrow keys now render correctly when editing commands with truetype
- truetype console now also supports bitmap fonts

The cursor is not currently supported for rotated consoles.

A README for claude is provided, although so far I have not had too much
success with it.

A fix for an intermittent build is added as well, along with silencing
some build messages noticed from Rust ulib.
END
2025-09-19 13:21:02 -06:00
Simon Glass
cea8b622b6 video: Add some notes about the cursor
Provide a few notes about how the cursor works in the video console.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-19 12:56:02 -06:00
Simon Glass
d9d653b08b video: truetype: Avoid clearing on backspace
Now that the truetype console properly handles clearing text from the
display during editing, we don't need to clear the character when
processing a backspace.

This allows arrow keys to work as expected on the truetype console.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-19 12:56:02 -06:00
Simon Glass
81675eff4a video: truetype: Clear after the current char on insert
Within the CLI, inserting a character works by writing out the new char
and then all the ones after it.

With the truetype console this results in gibberish since the new
chars are written on top of the old. To resolve this, clear the rest of
the input when a character is inserted. Consider that the end of the
input, at least until furture characters are written.

As an optimisation, don't clear if the new character is the same as the
old.

This cleans up a dot above the 'g' of greatness which should not be
there, so update the dm_test_video_truetype() test.

It also clean up the part of the 't' of 'not be' which should not be
there, so update dm_test_video_truetype_bs() too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-19 12:56:02 -06:00
Simon Glass
e38a1ae08e video: Show the cursor when idle
When the console is idle and at the CLI, ensure the cursor is visible.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-19 12:56:02 -06:00