Commit Graph

482 Commits

Author SHA1 Message Date
Simon Glass
f8e55a7a2d CI: Allow selecting particular tests for CI
Normally the job itself controls which tests are run, by providing an
optional test spec and using the -k option.

It is sometimes useful to run a subset of tests on CI. Add a new
TEST_SPEC variable to control this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-03 00:38:15 +12:00
Simon Glass
d62dfb382c CI: Allow more control over which jobs run
Provide some additional variables which can be used to deselect whole
stages, or select a particular test.py build.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-03 00:15:05 +12: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
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
4da27e4529 qconfig: Add an way to select defconfigs without stdin
Sometimes it is useful to process just one or two defconfigs and it is
convenient to do this just by listing them in the arguments. Add a -D
option for this.

Update the docs to avoid mentioning boards which have been removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-07-09 23:11:33 +02:00
Simon Glass
8630e568b2 fs: Rename fs_read() to fs_legacy_read()
This existing function does not have any context associated with it.
Rename it so that fs_read() can be used for the new FS uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-28 12:30:56 -06:00
Simon Glass
3cac4dd7a4 emulation: Allow booting without CMDLINE
Use programmatic boot so that it is possible to boot without
CONFIG_CMDLINE enabled.

Series-to: u-boot
Cover-letter:
emulation: Improve support for booting from QFW
U-Boot supports booting Linux from QFW which means that the kernel and
any initrd are provided on the QEMU command line instead of being found
in boot media.

This series improves this support in several ways:
- Enhances bootstd to implement 'bootflow read', thus allowing the
  files to be loaded and inspected (with potential cmdline changes)
  before booting
- Updates bootstd to use programmatic boot, so that it works even when
  CONFIG_CMDLINE is disabled
- Expands build-qemu script to allow providing cmdline and root disk

It also includes a rough script to time U-Boot when running QEMU with
kvm, making use of the qemu-boot-time repo:

   https://github.com/stefano-garzarella/qemu-boot-time.git
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-12 19:43:54 +00:00
Simon Glass
28548b43b6 emulation: Support zboot in the qfw bootmeth
The zboot option is used on x86, so add support for it. Use the
programmatic boot API rather than building a command to run, so that it
can work without CONFIG_CMDLINE

For now the other boot options still use the cmdline.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-12 19:43:54 +00:00
Simon Glass
90aa800f03 emulation: Support read_all() in qfw bootmeth
It is useful to be able to read the images into memory without actually
booting the kernel. This allows the cmdline to be changed using
'bootflow cmd', for example. Implement this for the QFW bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-12 19:43:54 +00:00
Simon Glass
16e59e0f94 Add a contrib directory
Add a place where people can add contributions, along with
documentation. These may be useful to other developers of U-Boot but are
not maintained / supported by the core developers.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-09 06:36:15 -06:00
Simon Glass
e815adea77 Review docs and header for board_fdt_fixup()
Now that pre-relocation devicetree mnipulation uses an event rather than
a weak function, update the docs and remove the function from the init.h
header.

Series-to: u-boot
Cover-letter:
fdt: Use events for pre-relocation devicetree manipulation
At present a weak function is used to modify the devicetree before
relocation. This is not ideal, since it is hard to find out whether a
board provides this function or not.

Another issue is that the fixups happen in multiple places in the init
sequences, with a confusing set of #if checks.

A final issue is that the fixups are done on the flat tree, which can be
quite inefficient.

This series introduces a new event to handle these fixups, converts all
boards and update the docs. The event passes an oftree instead of a
void * so that in future it can support livetree updates.

It would be possible to remove OF_BOARD_FIXUP and just always send the
event, but this would have a small code-size impact on the majority of
boards, since only about 45 use this feature.
END
2025-06-08 04:58:49 -06:00
Neha Malcom Francis
a1d7427941 doc: memory: Add documentation for system RAM
Add documentation for system RAM utilization in U-Boot.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-06-02 10:42:46 -06:00
Simon Glass
21ae2207d5 efi: Provide an easy way to debug with gdb
Add a Kconfig option to easily enable debugging of the app using the
recommended method. Provide some docs too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-02 08:25:41 -06:00
Simon Glass
d28d37fd25 efi: doc: Use inline links for EFI app documentation
Update the links to an embedded style. Also drop the part about needing
to support ARM, as this is done now.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-06-02 08:25:41 -06:00
Simon Glass
2d29554e18 passage: Add documentation
Add documentation about standard passage and update the maintainers.

Series-changes: 2
- Add detailed arch-specific information
- Add comments about passing a bloblist to Linux
- Add comments about how to pass standard passage to EFI
- Fix 'it' typo

Series-changes: 3
- Fix 'that' typo
- Update docs for the various code changes

Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I91d5b9ae45e8d1081b1e165620ad1946bd69af00
2025-05-29 19:06:30 +01:00
Simon Glass
14cce62f78 emulation: fdt: Allow using U-Boot's device tree with QEMU
At present it is impossible to change the qemu_arm64 defconfig to
obtain a devicetree from the U-Boot build.

This is necessary for FIT validation, for example, where the signature
node must be compiled into U-Boot.

A proposed change to QEMU to allow device tree additions has been
blocked for several years. The only known workaround is to use QEMU's
dumpdtb option, merge in the signature node manually, disable
OF_HAS_PRIOR_STAGE and then start QEMU with special arguments. This is
complicated enough that it is documented in U-Boot[1].

Unfortunately the only way to disable OF_HAS_PRIOR_STAGE at present is
to hack the Kconfig.

Add a new QEMU_MANUAL_DTB Kconfig option which makes OF_HAS_PRIOR_STAGE
optional, thus avoiding needing to patch U-Boot to get this working.

This seems a clearer solution than just making OF_HAS_PRIOR_STAGE
visible, since that symbol is intended to be set automatically by each
platform.

Series-to: u-boot
Series-cc: trini
Series-cc: Peter Maydell <peter.maydell@linaro.org>
Series-cc: Andrew Phelps <andrew.phelps@canonical.com>
Series-cc: ilias
Series-changes: 2
- Add a new QEMU-specific Kconfig instead
- Move patch into the standard-passage series

Series-changes: 3
- Fix 'usiing' typo
- Add mention of QEMU_MANUAL_DTB in doc/

[1] https://docs.u-boot.org/en/latest/develop/devicetree/dt_qemu.html
Link: https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org/#24481799

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>
2025-05-29 17:21:36 +01:00
Simon Glass
e9f7a83074 doc: Tidy up the hooks documentation
Now that these files are within the repo, link the documentation to the
normal U-Boot documentation. Update directory paths and convert it to
rST format.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 10:48:04 +01:00
Simon Glass
a07abd67da efi: Create a new CONFIG_EFI
Create a Kconfig which indicates that EFI functionality is in use,
either as a client (EFI app / stub) or provider (EFI loader). This will
make it easier to share code between these two parts of U-Boot

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00
Simon Glass
ca1f2dbd8e efi: Rename CONFIG_EFI to CONFIG_EFI_CLIENT
The generic name 'EFI' would be more useful for common EFI features. At
present it just refers to the EFI app and stub, which is confusing.

Rename it to EFI_CLIENT

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00
Simon Glass
5f4327ec9f efi: Rename the lib/efi directory
This directory was created when U-Boot gained the ability to run as an
EFI app in 2015. Since then the EFI-loader feature has been added.

The code in lib/efi is not actually used by the loader, so the name is
confusing.

Rename the directory to efi_client to indicate that it includes files
just for U-Boot being a client of EFI, i.e. the EFI app and stub.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00
Simon Glass
e27b36c015 expo: Tidy up insets and improve tests
Insets are handled inconsistently at present, since menus use them to
offset the label text, whereas textlines don't. This is done because
menus need the margin to be visible when opened. However this causes an
alignment issue when menus and textlines appear in the same cedit.

Remove the offsets from menus and compensate by adjusting the bounding
boxes used for highlighting and the opened menu.

Line up menu items and textlines vertically and add a style option for
textlines to control how much padding is added.

Add a test to check the positions of objects in a cedit, since this is
more direct than the rendering tests. Add style information so that the
impact can be seen.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-24 08:19:02 +01:00
Simon Glass
cafd1d6e7e patman: Add basic documentation for new features
Describe the new subcommands and how they should be used in a normal
workflow.

Note that the naming of branches is very rigid, or 'opinionated' in
marketing terms. Patman can track a single branch for each version of a
series and they must all be named the same, except for the
version-number suffix. Version 1 series have no suffix.

This description is fairly bare-bones but should be enough for some
initial testing and comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-24 05:26:46 +01:00
Jerome Forissier
af0643e16e trace: document 'trace wipe'
Add documentation for the 'trace wipe' command.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-05-16 18:50:25 +02:00
Simon Glass
721804b0f8 scripts: Rename build-efi.py to drop the file extension
The .py extension isn't very useful. Drop it and update the shebang to
specify Python 3

Update the docs for this and also drop the old reference to 2021 images.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-15 06:35:37 +02:00
Simon Glass
c256ad374f expo: Begin implementation of a text editor
It is useful to be able to edit text, e.g. to allow the user to edit the
environment or the command-line arguments for the OS.

Add the beginnings of an implementation. Future work is needed to finish
this: keypress handling and scrolling. For now it just displays the
text.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-02 09:45:52 -06:00
Simon Glass
eb84e601b3 expo: Support object alignment
Add support for left, right and centred alignment for text, in the
horizontal dimension.

Also support top, bottom and centred in the vertical dimension, for the
text object as a whole.

Alignment is not yet implemented for images. It has no meaning for
menus. A textline object uses a text object internally, so alignment
is supported there.

Provide some documentation to explain how objects are positioned.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-02 09:45:52 -06:00
Simon Glass
59f4889d42 expo: Implement a box
It is useful to be able to draw a box around elements in the menu. Add
support for an unfilled box with a selectable thickness.

Note that there is no support for selecting the colour for any expo
objects yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-02 09:45:52 -06:00
Simon Glass
958a378fdc patman: Move capture_sys_output() into terminal and rename
This function is sometimes useful outside tests. Also it can affect how
terminal output is done, e.g. whether ANSI characters should be emitted
or not.

Move it out of the test_util package and into terminal.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:03:34 -06:00
Tom Rini
e137fc69f5 python: Use and refer to the venv module rather than virtualenv
Using some form of sandbox with Python modules is a long standing best
practice with the language. There are a number of ways to have a Python
sandbox be created. At this point in time, it seems the Python community
is moving towards using the "venv" module provided with Python rather
than a separate tool. To match that we make the following changes:

- Refer to a "Python sandbox" rather than virtualenv in comments, etc.
- Install the python3-venv module in our container and not virtualenv.
- In our CI files, invoke "python -m venv" rather than "virtualenv".
- In documentation, tell users to install python3-venv and not
  virtualenv.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-01 05:56:48 -06:00
Tom Rini
2825b387b0 Kbuild: Always use $(PHASE_)
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
Makefiles as part of the macros to determine when to do something in our
Makefiles based on what phase of the build we are in. For consistency,
bring this down to a single macro and use "$(PHASE_)" only.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-01 05:56:48 -06:00
Simon Glass
483d409aa3 efi: arm: Add an EFI app for arm64
Introduce an EFI app for arm64 and update the documentation.

Provide a value for LOAD_ADDR to avoid a link error.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-27 05:31:43 -06:00
Simon Glass
8c620fd504 boot: Consider non-bootable partitions
Any 'bootable' flag in a DOS partition causes boostd to only scan
bootable partitions for that media. This can mean that extlinux.conf
files on the root disk are missed.

Put this logic behind a flag and update the documentation.

For now, the flag is enabled, to preserve existing behaviour. Future
work may provide a command (or some other mechanism) to control this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-15 08:49:43 +00:00
Simon Glass
4fb62608ce Convert build-efi script to Python
Before this gets any longer, convert it to Python so it is easier to
maintain.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-15 07:40:58 +00:00
Simon Glass
d428226459 test/py: Drop u_boot_ prefix on test files
We know this is U-Boot so the prefix serves no purpose other than to
make things longer and harder to read. Drop it and rename the files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # test_android / test_dfu
2025-02-16 17:30:53 -07:00
Simon Glass
aa677583d3 test/py: Shorten u_boot_console
This fixture name is quite long and results in lots of verbose code.
We know this is U-Boot so the 'u_boot_' part is not necessary.

But it is also a bit of a misnomer, since it provides access to all the
information available to tests. It is not just the console.

It would be too confusing to use con as it would be confused with
config and it is probably too short.

So shorten it to 'ubman'.

Signed-off-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
2025-02-16 17:30:53 -07:00
Simon Glass
777c7a0c20 test: Update documentation
Update documentation for how to write tests and the 'ut' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-02-16 14:11:28 +00:00
Simon Glass
1aef5f7ce1 test/py: Add a report show test durations
Execution time varies widely with the existing tests. Provides a way to
produce a summary of the time taken for each test, along with a
histogram.

This is enabled with the --timing flag.

Enable it for sandbox in CI.

Example:

   Duration : Number of tests
   ======== : ========================================
       <1ms :  1
       <8ms :  1
      <20ms : # 20
      <30ms : ######## 127
      <50ms : ######################################## 582
      <75ms : ####### 102
     <100ms : ## 39
     <200ms : ##### 86
     <300ms : # 29
     <500ms : ## 42
     <750ms : # 16
      <1.0s : # 15
      <2.0s : # 23
      <3.0s :  13
      <5.0s :  9
      <7.5s :  1
     <10.0s :  6
     <20.0s :  12

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-02-07 06:30:42 -07:00
Simon Glass
486743c3eb efi_loader: Add documentation for the EFI log
Add a note in the documentation about this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-18 19:50:32 -07:00
Simon Glass
1b244135e2 fdt: Allow the devicetree to come from a bloblist
Standard passage provides for a bloblist to be passed from one firmware
phase to the next. That can be used to pass the devicetree along as well.
Add an option to support this.

Tests for this will be added as part of the Universal Payload work.

Note: This is the correct way to deal with bloblist, since it allows
boards to choose whether they want to use the devicetree from there, or
not.

Link: https://patchwork.ozlabs.org/project/uboot/patch/20231226094625.221671-1-sjg@chromium.org/
Link: https://patchwork.ozlabs.org/project/uboot/patch/20231228133654.2356023-1-sjg@chromium.org/
Link: https://patchwork.ozlabs.org/project/uboot/patch/20231228194725.2482268-1-sjg@chromium.org/
Link: https://patchwork.ozlabs.org/project/uboot/patch/20240104014919.413568-1-sjg@chromium.org/
Link: https://patchwork.ozlabs.org/project/uboot/patch/20230921015730.1511373-31-sjg@chromium.org/
Link: https://patchwork.ozlabs.org/project/uboot/patch/20230830180524.315916-31-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-05 11:00:23 -07:00
Simon Glass
0938c3a7a7 Revert "fdt: Allow the devicetree to come from a bloblist"
This stops coral, bob and kevin from booting.

The correct way to do this was always to use a Kconfig option, so let's
first revert this broken idea.

This reverts commit 70fe238594.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-05 11:00:23 -07:00
Simon Glass
9820ce9a2f fs: Record loaded files in an ad-hoc bootflow
This makes a start on dealing with images loaded outside the context of
bootstd. For now, it just records these images. They can be listed using
the 'bootstd images' command.

Often, very little is known about these images, but future work could
perhaps use the filename or contents to detect the type.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-05 11:00:23 -07:00
Simon Glass
ab0887ffdf bootstd: Add a simple command to list images
Add a new 'bootstd images' command, which lists the images which have
been loaded.

Update some existing tests to use it. Provide some documentation about
images in general and this command in particular.

Use a more realistic kernel command-line to make the test easier to
follow.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-05 11:00:23 -07:00
Tom Rini
3073246d1b Prepare v2025.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-25 16:59:13 -06:00
Heinrich Schuchardt
8c87187119 doc: move README.kconfig to HTML documentation
* format according to Sphinx style
* add link to Linux Kconfig documentation
* sort table alphabetically in 'Conversion from boards.cfg to Kconfig'

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-11-23 23:15:39 +01:00
Tom Rini
b30787ad24 Merge patch series "Enable https for wget"
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

Hi all,

This is a respin of [1] adding https support to wget. In short

patch#1 enables the crypto algorithms we need in mbedTLS
patches#2, #3 enable anf fix the lwIP part we need
patch#4 is adding https:// parsing support in our wget
patch#5 is making https:// the default for QEMU lwip defconfig so
people can easily test
and finaly patch#6 updates our documentation

[1] https://lore.kernel.org/u-boot/20241024112449.1362319-1-ilias.apalodimas@linaro.org/

Link: https://lore.kernel.org/r/20241110083017.367565-1-ilias.apalodimas@linaro.org
2024-11-12 19:10:01 -06:00
Ilias Apalodimas
99649c6757 doc: uefi: Describe UEFI HTTPs boot
We now can use a combination og lwIP & mbedTLS and download from
https://. Describe the config options needed to enable it as well
as some limitations

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-11-12 19:09:52 -06:00
Tom Rini
cca05617a8 Prepare v2025.01-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-11 10:07:36 -06:00
mason1920
7604d874ff doc: remove vile language 2024-11-09 09:56:45 +01:00
Simon Glass
ae3b5928d6 x86: coreboot: Allow building an expo for editing CMOS config
Coreboot provides the CMOS layout in the tables it passes to U-Boot.
Use that to build an editor for the CMOS settings.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-03 21:27:12 -06:00
Tom Rini
180d31ae94 Prepare v2025.01-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-10-28 17:26:30 -06:00