Commit Graph

4499 Commits

Author SHA1 Message Date
Tom Rini
907d3438f7 Merge patch series "vepxpress64: disable CRC32 by default and add FVP with TF-A guide"
Harrison Mutai <harrison.mutai@arm.com> says:

This patch introduces two updates to the vexpress64 project:

- Disable CRC32 by default to prevent aborts in a standard FVP setup.
- Add a guide for running FVP with TF-A, providing a clear starting point for
  users.

Link: https://lore.kernel.org/r/20250304165204.53097-1-harrison.mutai@arm.com
2025-05-16 07:36:53 +00:00
Simon Glass
b7d6edfd69 scripts: Convert the build-qemu script to Python
Convert this to Python and make use of the build_helpers module. Update
that module to remove old options and improve the ordering of options.

The script doubles in size, part of which is being a lot more friendly
with virtiofsd problems, as well as adding a verbose mode.

Update the documentation as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-15 07:54:38 +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
d93f42d6e3 bootstd: Provide a command to select the bootdev order
It is sometimes useful to select or override the default bootdev order.
Add a command for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-02 09:45:32 -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
Tom Rini
d7bd570fad Merge patch series "This series adds support for file renaming to EFI_FILE_PROTOCOL.SetInfo()."
Gabriel Dalimonte <gabriel.dalimonte@gmail.com> says:

This series adds support for file renaming to EFI_FILE_PROTOCOL.SetInfo().
One of the use cases for renaming in EFI is to facilitate boot loader
boot counting.

No existing filesystems in U-Boot currently include file renaming,
resulting in support for renaming at the filesystem level and a
concrete implementation for the FAT filesystem.

Link: https://lore.kernel.org/r/20250217182648.31294-1-gabriel.dalimonte@gmail.com
2025-05-01 05:56:47 -06:00
Gabriel Dalimonte
f12f27d2e0 fs: fat: add rename
The implementation roughly follows the POSIX specification for
rename() [1]. The ordering of operations attempting to minimize the chance
for data loss in unexpected circumstances.

The 'mv' command was implemented as a front end for the rename operation
as that is what most users are likely familiar with in terms of behavior.

The 'FAT_RENAME' Kconfig option was added to prevent code size increase on
size-oriented builds like SPL.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html

Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
2025-05-01 05:56:47 -06:00
Harrison Mutai
796206b5ac board: vexpress64: enable bloblist for SPL handoff
Enable bloblist on vexpress64 platforms to facilitate information
passing from TF-A using the firmware handoff framework.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2025-04-08 14:55:13 -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
Raymond Mao
d18ab9a74d tcg2: decouple eventlog size from efi
Move default eventlog size from efi to tpm for using in both
efi and measured boot.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-03-15 15:47:34 +00:00
Simon Glass
abcfdc2510 acpi: Support checking checksums
When the ACPI tables come from an earlier bootloader it is helpful to
see whether the checksums are correct or not. Add a -c flag to the
'acpi list' command to support that.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-15 08:49:43 +00: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
Marek Vasut
f168da34d0 Makefile: Drop SPL_FIT_GENERATOR support
The SPL_FIT_GENERATOR is long superseded by binman, drop SPL_FIT_GENERATOR
support as there are no more users.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/22109373594b6a5d1110be9420ccd8fbb93a61d3.1730452668.git.michal.simek@amd.com
2025-02-10 04:38:21 -07:00
Daniel Semkowicz
526996bfaf board: theobroma-systems: Update TF-A setup steps for RK3588 boards
ddrbin_tool interface has been changed. Additional chip_name argument
is now required to modify ddr binary file. Update documentation
to be consistent with the new interface.

Update BL31 and ROCKCHIP_TPL file paths to match current version
of binaries available in the rkbin repository.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-02-08 16:11:34 -07:00
FUKAUMI Naoki
fe87b9bd4c rockchip: Add support for Radxa ROCK 5C
Radxa ROCK 5C[1] is a Rockchip RK3588S2 based single board computer.

[1] https://radxa.com/products/rock5/5c

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-02-08 16:11:34 -07:00
Tianling Shen
6b6a821989 board: rockchip: add FriendlyElec NanoPi R3S
The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
Ethernet ports designed and developed by FriendlyElec for IoT
applications.

Specification:
- Rockchip RK3566
- 2GB LPDDR4X RAM
- optional 32GB eMMC module
- SD card slot
- 2x 1000 Base-T
- 3x LEDs (POWER, LAN, WAN)
- 2x Buttons (Reset, MaskROM)
- 1x USB 3.0 Port
- Type-C 5V 2A Power

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2025-02-08 14:58:38 -07:00
Jacobe Zang
a4454e3a29 board: rockchip: add Khadas Edge2 RK3588 board
Khadas Edge2 is a Rockchip RK3588S based SBC (Single Board Computer)
by Khadas.

There are tree variants depending on the DRAM size : 8G and 16G.

Specification:

    Rockchip RK3588S SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16GB memory LPDDR4x
    Mali G610MP4 GPU
    3x MIPI CSI 4x lanes
    2x MIPI-DSI DPHY 4x lanes
    32/64GB eMMC
    1x USB 2.0, 1x USB 3.0, 2x USB-Type-C
    1x HDMI 2.1 output, 1x DP 1.4 output
    USB PD over USB Type-C

Kernel commit:
04d552993522 ("arm64: dts: rockchip: Add Khadas edge2 board")

Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
2025-02-08 14:58:38 -07:00
Simon Glass
f1ea51a032 doc: Update ut documentation
Update documentation for the 'ut' command, since it has changed a
little.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-02-08 13:50:15 +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
870fffb5a7 efi_loader: Add a command to show the EFI log
Add a simple command which lists the log. Avoid creating any new records
when this command is invoked.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-18 19:47:44 -07:00
Simon Glass
1afecc2db1 doc: efi: Add the EFI-loader API documentation
Bring in the documentation from the efi_loader.h header file, so we can
see the API defined there.

Fix efi_alloc() to avoid a warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-17 10:58:19 -07:00
Simon Glass
9e6d0c3900 docker: Support building for multiple architectures
Add instructions on how to build the file for multiple architectures.
Add a message indicating what is happening.

Update the documentation as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-17 06:53:19 -07:00
Simon Glass
cee7f69038 scripts: Add a script for building and booting QEMU
It is handy to be able to quickly build and boot a QEMU image for a
particular architecture and distro.

Add a script for this purpose. It supports only arm and x86 at present.
For distros it only supports Ubuntu. Both 32- and 64-bit builds are
supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-07 15:55:33 -07:00
Simon Glass
6cc483bc22 env: Provide a work-around for unquoting fdtfile
Some boards use a CONFIG option to specify the value of this variable.
This is normally handled by efi_get_distro_fdt_name() but in the case
of sunxi this does not work, since 'soc' is sunxi, but the files are
in the allwinner directory.

Provide a work-around for this particular case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-05 13:58:19 -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
Simon Glass
c68ddff0c0 doc: Add devicetree bindings for options
Some of U-Boot's options have made it upstream, so bring in the binding
file.

This is taken from dt-schema commit c9b4797

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-03 06:42:29 -07:00
Simon Glass
8fc28b7078 common: doc: Drop old LED support
This has been replaced with a new LED framework, so drop this old code
and documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-03 06:42:29 -07:00
Christoph Stoidner
512c6b67a2 board: phytec: imx93: Add phyCORE-i.MX 93 support for all SOM variants
The phyCORE-i.MX 93 is available in various variants (e.g. different ram
sizes, eMMC HS400 yes/no). Enable hardware introspection for the
imx93-phyboard-segin_defconfig, so that during startup the SOM module
variant can be detected, and the hardware can be configured accordingly.
The resulting SPL and u-boot binary shall able to boot each
phyCORE-i.MX 93 module variant on each carrier board. Finally rename
imx93-phyboard-segin_defconfig to imx93-phycore_defconfig, to highlight
its SOM scope.

Signed-off-by: Christoph Stoidner <c.stoidner@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Yannic Moog <y.moog@phytec.de>
2024-11-25 23:08:02 -03:00
Tom Rini
3073246d1b Prepare v2025.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-25 16:59:13 -06:00
Jerome Forissier
5753b9eb48 doc: cmd: wget: document lwIP syntax
The lwIP version of wget supports a different syntax with a URL,
in addition to the legacy syntax. Document that.

While we're at it, fix a couple of minor issues in the legacy
syntax:
- hostIPaddr can be a DNS name if CONFIG_CMD_DNS is enabled
- path is mandatory

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-11-23 23:33:48 +01:00
Heinrich Schuchardt
f9dd2e2c9f doc: remove README.TPL
doc/develop/spl.rst describes SPL, TPL, VPL.
Remove the outdated README.TPL document.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-11-23 23:16:03 +01: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
Caleb Connolly
ef14c347db dfu: add scsi backend
This is extremely similar to the MMC backend, but there are some notable
differences.

Works with a DFU string like

    scsi 4=u-boot-bin part 11

Where "4" is the SCSI dev number (sequential LUN across all SCSI devices)
and "11" is the partition number.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20 17:57:58 +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
Tom Rini
fdcf06d58d Merge tag 'u-boot-rockchip-20241111' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/23280

- Add board:
        rk3328: FriendlyElec NanoPi R2S Plus
        rk3568: Qnap TS433
        rk3588: Cool Pi CM5 GenBook
- Move rk3399_force_power_on_reset to TPL for puma board;
2024-11-11 07:25:25 -06:00