Commit Graph

99294 Commits

Author SHA1 Message Date
GitLab CI
e4c38498ad chore: Bump version for final release 2025.10 c2025.10 2025-10-06 09:45:35 +00:00
Simon Glass
a598eddb93 Merge branch 'prob3' into 'master'
video: Tidy up embedded graphical images

See merge request u-boot/u-boot!191
2025-10-02 22:00:10 +00:00
Simon Glass
366ae61115 video: Provide a command to list built-in images
Add a new 'video images' command which lists the graphical images that
are compiled into U-Boot. Generally the only one is the logo.

Series-to: concept
Series-cc: heinrich
Cover-letter:
video: Tidy up embedded graphical images
U-Boot includes a few graphical images which are compiled in, such as
the logo and the BGRT logo used for EFI.

At present these are handled by a Makefile rule which looks for files
ending with '_logo.bmp'.

This series moves these into a new drivers/video/images directory and
puts them in a linker list, so it is possible to see what images are
available.

Adding a new image is simpler, just requiring the addition of the normal
'obj-y += file.bmp' rule.

This series also adds a new 'video' command which provides the existing
'setcurs' and 'lcdputs' as subcommands, along with documentation and
tests.

It also adds a more convenient 'write' subcommand.

END
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 2:44 1:43
Series-version: 3
2025-10-02 13:51:03 -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
1ad737c2ab video: Move the logo into the new video-images directory
Move u_boot_logo.bmp into drivers/video/images and include it in the
build.

Make use of the new video_image_get() macro to obtain the logo.

Drop the old SPLASH_...() macros.

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
85e1dae80c video: Add a write subcommand
This allows writing strings at particular positions on the display,
using either character or pixel positions.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-10-02 13:50:32 -06:00
Simon Glass
8db8f801ae video: Add video command with subcommands
Add a new 'video' command with 'setcursor' and 'puts' subcommands that
provide an alternative interface to the existing setcurs and lcdputs
commands.

Update the test is updated to test both the legacy commands and the new
'video' command.

Series-changes: 2
- Correct confusing output text which should be 16 instead of 10
- Improve docs for row and col

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:50:32 -06:00
Simon Glass
a85820f86c video: Add tests for the video commands
Add a simple test for the setcurs and lcdputs commands.

Series-changes: 2
- Pull out the docs into a separate patch
- Update test result for hex

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:50:32 -06:00
Simon Glass
4bda6d5454 doc: video: Add docs for video commands
Add documentation and a simple test for the setcurs and lcdputs
commands.

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

Series-changes: 2
- Split out docs into its own patch; use video: tag

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:50:32 -06:00
Simon Glass
d378fb4095 cmd: Update setcurs to use hex
Commands in U-Boot should use hex consistently. Update this command
accordingly.

Series-changes: 2
- Add new patch to switch this command to use hex

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:50:32 -06:00
Simon Glass
997d2def8a link: Disable CMD_VIDCONSOLE
This command is not really needed for link, which is near its code-size
limit. Disable it, before we add more subcommands.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 13:47:37 -06:00
Simon Glass
e49052511f Merge branch 'glob2' into 'master'
boot: Support priority for global bootmeths

See merge request u-boot/u-boot!190
2025-10-01 16:11:55 +00:00
Simon Glass
999816ff78 boot: doc: Update for new global-bootmeth features
Provide some developer documentation on the priority feature for global
bootmeths.

Series-changes: 2
- Add a bit more detail suggested by Heinrich

Series-to: concept
Series-cc: heinrich
Cover-letter:
boot: Support priority for global bootmeths
At present global bootmeths always run first, before all other
bootmeths. Optimisations in the code take advantage of this, putting
them at the end, so they can be used once and then forgotten.

In some cases it is useful to run global bootmeths later in the boot.
For example, the EFI-bootmgr bootmeth may itself scan devices and the
network, so running it first can hold up the boot significantly for
boards not actually relying on EFI-bootmgr to boot.

This series introduces a new field in global bootmeths which indicates
the priority, using the same scheme as is used with bootdev hunters.
Thus it is possible to insert the EFI-bootmgr bootmeth just before the
hunter for network bootdevs is invoked.

Despite the simplicity of the concept and the relatively small series,
this is a fairly significant enhancement. It is also quite tricky to
implement, largely due to the way the original code was written, with
global bootmeths being a small, size-optimised add-on to the original
bootstd implementation.

For now we only allow each global bootmeth to run at most once, but this
implementation is written in a way that we could relax that if needed.
Then the bootmeth itself could decide whether to run at any particular
point in the bootflow iteration.

Size growth is about 390 bytes on Thumb2 (e.g. firefly-rk3288) if
CONFIG_BOOTMETH_GLOBAL is enabled, which it normally is. With that
disabled (which saves about 4K on the same platform), there is no
growth.
END

Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 1:41
Series-version: 2
2025-09-30 17:24:09 -06:00
Simon Glass
9f00a0e3f3 boot: Run the EFI bootmgr just before network devices
At present the EFI bootmgr scans all devices in the system before
deciding which one to boot. Ideally it would use the bootstd iterator
for this, but in the meantime, give it a lower priority, so it runs
just before the network devices.

Note that if there are no hunted network devices hunted, then it will
run at the end, after all bootdevs are exhausted. In other words, it
will always run.

Series-changes: 2
- Update commit message to indicate the bootmeth will always run
- Document how the priority was chosen

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:23:58 -06:00
Simon Glass
6e4f842505 boot: Run global bootmeths after all bootdevs are exhausted
When there are no more bootdevs we should still go through the global
bootmeths, since some may not have yet been used, if their priority has
not yet come up.

Add a final check for this at the end of the iterator.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
1200d2b52f boot: Don't change the method count after global bootmeths
At present before scanning global bootmeths, the iterator sets the
method count to the index of the first global bootmeth. Now that we
support scanning the global bootmeths multiple times, we must leave this
count alone.

Check against have_global and first_glob_method instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
db66d8d149 boot: Implement a priority for global bootmeths
Allow bootmeths to select when they want to run, using the bootdev
priority. Provide a new bootmeth_glob_allowed() function which checks if
a bootmeth is ready to use.

Fix a comment in bootflow_system() which is a test for global bootmeths.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
1c54931b8e boot: Only run global bootmeths once each
Use the methods_done flags to make sure that each global bootmeth is
only used once. For now this has no effect, since they are all processed
at the start.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
8f4d910ee4 boot: Support rescanning the global bootmeths
Add the logic to scan through the global bootmeths for every new
bootdev, in preparation for allowing global bootmeths to select where in
the hunter ordering they go.

Use a new bootmeth_glob_allowed() function to check if a bootmeth is
allowed, ensuring that each can run at most once.

For now this has no actual effect, since the global bootmeths are
unconditionally processed at the start, with iter->methods_done being
updated to include all of them. Therefore when scanning again, no
unprocessed global bootmeths will be found.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
5fcdd37f14 boot: Move preparing bootdev into a function
The code at the end of iter_inc() is already somewhat tortuous. Before
making it worse, move it into a function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
07326c0baf boot: Keep track of which bootmeths have been used
Add a bitfield which tracks when bootmeths have been used. This will be
needed when global bootmeths can be used later in the iteration.

Fix a missing bootflow_free() while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
37cabfe0b1 boot: Add a flag for whether there are global bootmeths
The current 'doing_global' refers to being in the state of processing
global bootmeths. Since global bootmeths are currently used once at the
start, it becomes false once the last global bootmeth has been used.

In preparation for allowing bootmeths to run at other points in the
bootstd interation, add a new 'have_global' flag which tracks whether
there are any global bootmeths in the method_order[] list. It is set up
when iteration starts. Unlike doing_global which resets back to false
after the global bootmeths have been handled, once have_global is set to
true, it remains true for the entire iteration process. This provides a
quick check as to whether global-bootmeth processing is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
cd6424c4c3 boot: Update first_glob_method when dropping a bootmeth
For now we only support dropping non-global bootmeths from the
iteration. Update first_glob_method in that case and add a few checks
that things are correct.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
7e9ee27101 boot: Add a new test for global bootmeths
These have different behaviour from normal bootmeths and we are about to
enhance it. So add a test and also an extra check in bootflow_iter()

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:45 -06:00
Simon Glass
dcd69dc315 boot: Move showing of bootflows out of the command
It is helpful in tests to be able to show the bootflow that is being
examined. Move show_bootflow() into boot/ and rename it.

Series-changes: 2
- Add a log_err() for an invalid state

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:14:28 -06:00
Simon Glass
b69a2b1ef8 boot: Add more debugging to iter_incr()
This function is the core of the bootstd iteration. Add some debugging
for the decisions it makes along the way, to make it easier to track
what is going on.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-30 17:10:56 -06:00
Simon Glass
f89d2779c3 boot: Improve comments related to global bootmeths
Add a few comments about global bootmeths and first_glob_method

Fix a broken line in bootmeth_setup_iter_order() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-09-30 17:10:48 -06:00
Simon Glass
2617d1179c Merge branch 'proa' into 'master'
bootctl: Initial experimentation

See merge request u-boot/u-boot!189
2025-09-28 23:31:16 +00:00
Simon Glass
a2f7396291 x86: emulation: Enable bootctl for testing
Provide bootctl with x86 QEMU builds.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-28 14:33:14 -06:00
Simon Glass
d30aa0b3d3 sandbox: Enable bootctl for testing
Provide bootctl for use with testing (-T flag).

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-28 14:33:14 -06:00
Simon Glass
d9152ea75e bootctl: Initial experimentation
This provides a basic prototype for boot control.

Some documentation is in boot/bootctl/README.rst
2025-09-28 14:32:36 -06:00
Simon Glass
8bae99245b Merge branch 'apj' into 'master'
Revert "efi: arm: Drop setting of fdt_addr"

See merge request u-boot/u-boot!188
2025-09-25 19:19:43 +00:00
Simon Glass
ff3028bdef Revert "efi: arm: Drop setting of fdt_addr"
Unfortunately we cannot do this yet, as when booting with QEMU the
devicetree is provided at the start of memory. Until we have a built-in
way to handle copying this, we must retain the fdt_addr variable.

This reverts commit acc02734be265e92ec88ace5ac097ccb3099d40f.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 19:19:22 +00:00
Simon Glass
207b605450 Merge branch 'api' into 'master'
efi: Tidy up some commands and provide a keyboard driver

See merge request u-boot/u-boot!187
2025-09-25 17:53:27 +00:00
Simon Glass
e5ca1eb9ed efi: app: Provide a keyboard driver
Add a keyboard driver which returns keys produced by EFI.

This is basically the same as the serial driver but it doesn't combine
input and output into one driver, allowing more control when using a
separate screen.

Add the required devicetree fragment for ARM (only).

Series-to: concept
Series-cc: heinrich
Cover-letter:
efi: Tidy up some commands and provide a keyboard driver
This series collect various odds and ends to make the ARM EFI app show
a menu that looks reasonable, including truetype fonts and a new
keyboard driver, selectable by setting stdin to 'efi-kbd'.

Some highlights:

- fix some bugs in addr_find and part_find and adds docs / tests
- reset pager when clearing the console
- use at least 1G of memory with EFI since the app allocates 512M
- allow NEON registers so floating point can work (truetype)
- show the global_data flags with bdinfo
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
4113d6a01c efi: Move key decoding into a shared file
Create a new file in lib/efi to handle conversion of keys from EFI
format to characters, so we can use it from multiple places. Update the
serial_efi driver accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
c5606411f1 efi: arm: Drop setting of fdt_addr
This variable is not needed in the ARM app and can be confusing since
there might not be memory at this location. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
3d472da862 efi: Enable truetype in the ARM app
Enable truetype fonts so the menus can look nicer.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
e1b410daa9 Revert "ARM: Prevent the compiler from using NEON registers"
The current compiler is gcc-13 which presumably has fixed this bug.
Revert the work-around so we can enable Truetype which needs floating
point.

This reverts commit f43312c974.
2025-09-25 09:47:09 -06:00
Simon Glass
0efc5f0ffc expo: Allow manual positioning of menu items
Sometimes we want to position items individually rather than relying on
the automatic scene layout. Provide a flag for this, expanding the type
to cope.

Also add an assertion that the flags fit in the available space.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
47b3b6d969 boot: Tidy up positioning in bootflow_menu_new()
Several items use the SCENEOB_DISPLAY_MAX setting which does not work
with alignment. Some others have a negative height, which is now
checked, so results in the item being invisible.

Fix these problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
6d58e9f8b6 doc: test: Add docs and test for addr_find
Add documentation and a test for this command.

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
bd44e79ee7 cmd: Update addr_find to ignore the devicetree
We don't particularly need a devicetree to use the addr_find command, so
drop this condition.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
84f1571fc6 cmd: Update addr_find to use a simple lmb allocation
There should be no need to parse the LMB tables manually. Use the
allocation-function provided instead. Adjust the argument checks while
we are here.

Also enable this command for sandbox and the EFI app, so it is built in
CI.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
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