Commit Graph

2449 Commits

Author SHA1 Message Date
Tom Rini
301bac6047 cmd: Remove <common.h> and add needed includes
Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06 15:05:04 -06:00
Tom Rini
55608302a4 cmd/Kconfig: Add some missing dependencies
With the migration to Kconfig complete, we can now add some previously
missing dependencies to some commands.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06 15:05:03 -06:00
Kishan Dudhatra
8024d57789 cmd: gpt: initialize partition table
Change in v2:
	- Fix applies to all block devices, not just MMC.

If partition init is not completed within the gpt write,
the gpt partition list will not be updated.

Signed-off-by: Kishan Dudhatra <kishan.dudhatra@siliconsignals.io>
2024-05-03 12:22:58 -06:00
Tom Rini
62825d48c4 Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/20596

- RISC-V: cmd: Add SBI implementation ID and extension ID
- Board: Rename spl_soc_init to spl_dram_init
- Board: milkv_duo: Add SPI NOR flash, Ethernet, Sysreset support
2024-05-01 19:40:32 -06:00
Heinrich Schuchardt
b49861ab85 cmd: sbi: add coreboot and oreboot implementation IDs
Let the sbi command detect the coreboot and oreboot SBI Implementation IDs
defined in SBI specification v2.0.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-05-01 22:40:17 +08:00
Heinrich Schuchardt
c57c187bd4 cmd: sbi: add Supervisor Software Events extension
OpenSBI has implemented the Supervisor Software Events Extension.
Allow detecting it in the sbi command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-05-01 22:40:17 +08:00
Heinrich Schuchardt
84aab11d35 cmd: terminate efidebug test bootmgr early on error
If efi_bootmgr_load() fails, there is no point in trying to start an image
that has not been loaded.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-05-01 07:37:37 +02:00
Heinrich Schuchardt
a55039d6a8 efi_loader: superfluous efi_restore_gd after EFI_CALL
EFI_CALL() invokes __efi_entry_check() which executes set_gd(efi_gd).
There is no need to execute set_gd(efi_gd) again via efi_restore_gd().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-05-01 07:37:32 +02:00
Heinrich Schuchardt
aa028df7ba cmd: CONFIG_CMD_BLOBLIST must depend on CONFIG_BLOBLIST
With CONFIG_CMD_BLOBLIST=y, CONFIG_BLOBLIST=n linker errors occur:

    usr/bin/ld: cmd/bloblist.o: in function `do_bloblist_list':
    cmd/bloblist.c:27:(.text.do_bloblist_list+0x6):
    undefined reference to `bloblist_show_list'

    /usr/bin/ld: cmd/bloblist.o: in function `do_bloblist_info':
    cmd/bloblist.c:19:(.text.do_bloblist_info+0x6):
    undefined reference to `bloblist_show_stats'

Fixes: 4aed227623 ("bloblist: Add a command")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-29 10:53:58 -06:00
Tom Rini
9552923ded Merge patch series "Kconfig: some cleanups"
Michal Simek <michal.simek@amd.com> says:

I looked as cleaning up some dependencies and I found that qconfig is
reporting some issues. This series is fixing some of them. But there are
still some other pending. That's why please go and fix them if they are
related to your board.

UTF-8: I am using uni2ascii -B < file to do conversion. When you run it in
a loop you will find some other issue with copyright chars or some issues
in files taken from the Linux kernel like DTs. They should be likely fixed
in the kernel first.
Based on discussion I am ignoring names too.
2024-04-22 11:01:56 -06:00
Michal Simek
953d335d39 Kconfig: Add missing quotes around source file
All errors are generated by ./tools/qconfig.py -b -j8 -i whatever.
Error look like this:
drivers/crypto/Kconfig:9: warning: style: quotes recommended around
'drivers/crypto/nuvoton/Kconfig' in 'source drivers/crypto/nuvoton/Kconfig'

Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-04-22 11:01:48 -06:00
Heinrich Schuchardt
8afeab4cdf cmd: eficonfig: check initrd path allocation
After allocating memory for the initrd file path we need to check the
initrd buffer pointer is not NULL.

Fixes: 87d791423a ("eficonfig: menu-driven addition of UEFI boot option")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-20 08:21:28 +02:00
Michal Simek
84dda5ce3e Kconfig: Remove all default n options
default n doesn't need to be specified. It is default option anyway.
Similar changes have been done by commit 18370f1497 ("Kconfig: Remove all
default n/no options").

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18 16:37:22 -06:00
Tom Rini
d893c93205 optee_fixes_cleanups
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEgWII69YpahbL5iK5gS8AYozs+qIFAmYhGnwACgkQgS8AYozs
 +qJ/OhAAgTrJ2HPuRrC2jK4wsj4uokUK/cRFVKrk6JlXmE+aVyN5G8OgE77xm1E1
 8f+7v7NIO2EtEzC6QaYEzC36zHMyNBoTIw963McLvuQOQCvupoatn0st5N8LQiCg
 ePZXoBVhb5zan/oo0rGhgooEXi8wkmzVhpFyjNHIUb7dAMP+ApOWS4tm2z44B1YP
 240glh6o0apVKSkXeAylsb+QkjmgnDCD60XOoarSTtTJoutd/nMR/AfIMa0Q7+31
 8Kx+wTJySgwjbyWLpag4KpeV+GWORT+96EP3IawgJtyQQDvKEyheGR8L/n7dgzGN
 YGV3SytX25u8zzA1Stx+sFhy4P1L5ixWWsKmxiFSHkBxqAZ+1QJr7sUYaLNc2TQP
 gBbCGEgmIehxPk43KJh8GQeS48VDGdwZVrMnMwu9DOR2cL33bFgWh/1IOWiqdtM6
 3rg6ObfrO89zxmrC+FX44d0EeG1msdSheWYzblwkx7pW0N3mJ4AWQMCTRqxoUds/
 fogMDDQIFoXq6frYp1ve1C3Obfi5mvq6KMHk5OGY6GEW6+mXojdEaENHYicDdubE
 fkeUMfcqTe3r45lN7USlH1JJQpyJQq79WabIqlcRWBxW1JD2ayhKpLgZMWjOh+VP
 i4255BiCJ5kMBteHovp7FJqIeFQU9KXKQbfFa5h1w4CftQTjHaQ=
 =mfCo
 -----END PGP SIGNATURE-----

Merge tag 'tpm-master-18042024' of https://source.denx.de/u-boot/custodians/u-boot-tpm

Igor says:
"The problem initially was in the TEE sandbox driver implementation
 (drivers/tee/sandbox.c) and it's limitations, which doesn't
 permit to have multiple simultaneous sessions with different TAs.
 This is what actually happened in this CI run [1], firstly "optee_rpmb"
 cmd was executed (and after execution we had one session open), and
 then "scp03", which also makes calls to OP-TEE, however it fails
 in sandbox_tee_open_session() because of this check:

 if (state->ta) {
     printf("A session is already open\n");
     return -EBUSY;
 }

 I had two ways in mind to address that:
 1. Close a session on each optee_rpmb cmd invocation.
 I don't see any reason to keep this session open, as obviously
 there is no other mechanism (tbh, I don't know if DM calls ".remove" for active
 devices) to close it automatically before handing over control to
 Linux kernel. As a result we might end up with some orphaned sessions
 registered in OP-TEE OS core (obvious resource leak).
 2. Extend TEE sandbox driver, add support for multiple
 simultaneous sessions just to handle the case.

 I've chosen the first approach, as IMO it was "kill two birds with one stone",
 I could address resource leak in OP-TEE and bypass limitations of
 TEE sandbox driver."

Link: https://lore.kernel.org/u-boot/CAByghJZVRbnFUwJdgU534tvGA+DX2pArf0i7ySik=BrXgADe3Q@mail.gmail.com/

The CI https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/20414
showed no problems
2024-04-18 12:13:40 -06:00
Tom Rini
cdd20e3f66 Revert "Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled""
As reported by Jonas Karlman this series breaks booting on some AArch64
platforms with common use cases. For now the best path forward is to
revert the series.

This reverts commit 777c284609, reversing
changes made to ab3453e7b1.

Link: https://lore.kernel.org/u-boot/50dfa3d6-a1ca-4492-a3fc-8d8c56b40b43@kwiboo.se/
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-18 08:29:35 -06:00
Igor Opaniuk
dfac18e944 cmd: optee_rpmb: build cmd for sandbox
Support CMD_OPTEE_RPMB for SANDBOX configurations.
Test:

$ ./u-boot -d arch/sandbox/dts/test.dtb
...
=> optee_rpmb write_pvalue test_variable test_value
Wrote 11 bytes
=> optee_rpmb read_pvalue test_variable 11
Read 11 bytes, value = test_value

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18 16:04:48 +03:00
Igor Opaniuk
fbdaafbb80 cmd: optee_rpmb: close tee session
Close tee session after each optee_rpmb invocation, as there is no
reason to keep it open, considering the absence of any available mechanism
to clean up all open sessions automatically before handing over control
to the Linux kernel. Without proper clean-up we might end up with orphaned
sessions registered in OP-TEE OS core (obvious resource leak).

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18 16:04:48 +03:00
Arseniy Krasnov
248fc16055 cmd: mtd: OTP access support
Add access to OTP region. It supports info, dump, write and lock
operations. Usage example:

'mtd otpread nand0 u 0 1024' - dump 1024 bytes of user area starting
 from offset 0 of device 'nand0'.

'mtd otpwrite nand0 10 11223344' - write binary data 0x11, 0x22, 0x33,
 0x44 to offset 10 to user area of device 'nand0'.

'mtd otplock nand0 0 1024' - lock 1024 bytes of user area starting
 from offset 0 of device 'nand0'.

'mtd otpinfo nand0 f' - show info about factory area of device 'nand0'.

Link: https://lore.kernel.org/all/20240326223919.3781-1-avkrasnov@salutedevices.com
Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-04-14 08:49:40 +02:00
Weizhao Ouyang
85f3d3de8d cmd: sf: Fix sf probe crash
Handle the return value of spi_flash_probe_bus_cs() to avoid sf probe
crashes.

Link: https://lore.kernel.org/all/20240104114619.280513-1-o451686892@gmail.com
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-04-14 08:49:39 +02:00
Vincent Stehlé
6d9a851e50 Fix references to trace doc
The README.trace has been moved and converted to rst in commit dce26c7d56
("doc: move README.trace to HTML documentation"); fix all the remaining
references to this file.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-13 11:14:29 +02:00
Heinrich Schuchardt
04fc470cf8 sandbox: move sandbox specifics to booti_setup()
Instead of checking a configuration setting in booti_start() adjust the
sandbox implementation of booti_setup().

Write a console message when trying to run the booti command on the sandbox
indicating that it is not supported.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-12 08:53:31 -06:00
Tom Rini
777c284609 Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled"
Simon Glass <sjg@chromium.org> says:

This series is the culmanation of the current line of refactoring
series. It adjusts pxe to call the booting functionality directly
rather than going through the command-line interface.

With this is is possible to boot using the extlinux bootmeth without
the command line enabled.

It also updates fastboot to do a similar thing.
2024-04-10 17:06:27 -06:00
Simon Glass
637425bab3 fastboot: Change fastboot_buf_addr to an address
Given the name of this variable, it should be an address, not a
pointer. Update this, to make it easier to use with sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Dmitrii Merkurev <dimorinny@google.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
2024-04-10 17:04:25 -06:00
Simon Glass
b34c8289d2 bootm: Make OS booting dependent on BOOTM
Booting an OS does not require the 'bootm' command, so change the
condition for these options.

Move them into boot/ so they don't depend on CMDLINE

Note that CMD_BOOTM_PRE_LOAD has been put directly into the bootm code
so will need some additional refactoring (and a test!) to allow it to
change over.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-04-10 17:04:25 -06:00
Simon Glass
6e558e34e0 bootm: Add a Kconfig option for bootm functionality
Create a separate Kconfig option which enables the bootm logic,
separate from the 'bootm' command. This will eventually allow booting
without CMDLINE enabled.

Update boards which disable CMD_BOOTM to disable BOOTM instead, since
CMD_BOOTM now depends on BOOTM

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 17:04:25 -06:00
Tom Rini
ab3453e7b1 Merge patch series "Complete decoupling of zboot logic from commands"
Simon Glass <sjg@chromium.org> says:

This series refactors the zboot code to allow it to be used with
CONFIG_COMMAND disabled.

A new zboot_run() function is used to boot a zimage.
2024-04-10 13:49:35 -06:00
Simon Glass
9ad5fdf1a8 x86: zboot: Separate logic functions from commands
Move zboot_start() and zboot_info() in with the other logic functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-04-10 13:49:16 -06:00
Simon Glass
02ed6c333e x86: zboot: Move argument processing outside zboot_start()
Process the arguments before calling zboot_start() so that we can
separate the command line from the internal logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:16 -06:00
Simon Glass
d531499749 x86: zboot: Drop intermediate zboot_go() function
This function only calls zboot_go() so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:16 -06:00
Simon Glass
cb19931ee5 x86: zboot: Drop intermediate zboot_setup() function
Move error checking into the caller so that do_zboot_setup() can call
zboot_setup() directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:16 -06:00
Simon Glass
db0c6f47c3 x86: zboot: Move environment setting into zboot_load()
The only difference between the command and the underlying logic is the
setting of envrionment variables. Move this out of the command
processing since it needs to be done in any case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:16 -06:00
Simon Glass
42a99d0df6 x86: zboot: Create separate functions for the logic
Separate out the commands from the logic. This will eventually allow
the logic to be used when CONFIG_CMDLINE is not enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:16 -06:00
Simon Glass
228c6722d4 x86: zboot: Avoid iteration in do_zboot_states()
Drop the iteration and write out each state in full. This will allow
the arguments to be reduced and adjusted in future patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:16 -06:00
Simon Glass
80d4c98757 x86: zboot: Create a separate ZBOOT option for zboot logic
Most of the functionality of zboot is contained in the logic which
handles a zimage. Create a separate Kconfig for the logic so that it can
(later) be used without the command itself being enabled.

Enable ZBOOT by default on x86, with the command depending on that. The
existing 'imply' can therefore be removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-04-10 13:49:15 -06:00
Simon Glass
bade0ac04b x86: zboot: Move command code into its own file
Much of the code in zimage.c deals with the zboot command. Move it into
a sepatate zboot.c file within the cmd/ directory. This will eventually
allow use of the zimage logic without the command being enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 13:49:15 -06:00
Caleb Connolly
ae8e1d5aa4 cmd: sysboot: null check filename
Currently if ${bootfile} is unset and sysboot is invoked with no
filename specified then U-Boot will crash will a null-pointer
dereference. Add the missing check and a matching error print.

Fixes: 993c912d30 ("cmd: sysboot: Create a sysboot command dedicated file")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-10 09:26:00 -06:00
Marek Behún
144c01678a cmd: rng: Print "Abort" on -EINTR
In the rng command, print
  Abort
instead of
  Reading RNG failed
if the error number is -EINTR, which can happen if the user pressed
CTRL-C.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
Tom Rini
cdfcc37428 Merge tag 'u-boot-dfu-next-20240402' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-next-20240402

- Implement Qualcomm wrapper for dwc3
- Multiple sector size support for UMS
- CDC ACM gadget initialization fix
- Refactor board code from dwc3 to prepare better interrupt support
- Bugfix for for qcom-smmu when compiling with -DDEBUG
2024-04-02 22:37:23 -04:00
Heinrich Schuchardt
23109d0575 cmd: smbios: type 1 wake-up time, family
Correct type 1 output

* render wake up time as string
* print family string
* remove duplicate serial number output

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-03-27 09:22:49 +01:00
Heinrich Schuchardt
4735d03a97 acpi: rename aslc_id, aslc_revision
The fields Creator ID and Creator Revision contain information about the
tool that created an ACPI table. This may be the ASL compiler for some
tables but it is not for others. Naming these fields aslc_id and
aslc_revision is misleading.

It is usual to see diverse values of Creator ID. On a laptop I saw these:
'AMD ', 'INTL, 'MSFT', 'PTEC'. Obviously not all relate to the Intel
ASL compiler.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-03-27 09:15:39 +01:00
Tom Rini
ab8d9ca304 Prepare v2024.04-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmYCK3wACgkQFHw5/5Y0
 tyzV9wwAo6JN9dVBBivLFROeDb24t3TmgT7e0AEql6Vjfj1x9xzW/L7ki0cdbGjW
 sNmqPR9ObnONv5hxMV1nlUE6lRYOj/eRaWZsz1N8e02VFhegePNgd/ZDeaPZyO10
 mDhKdGh5yr0AaIer1Yj21b7QKxrriAN9ct/qR4sw2j1AlxF959PSw0qOzb6wjpDp
 I3QCbUkmKt6ATwyYzZnM0mifs0fb1u4M6C91V50SsyBBC30veEL8Bpgd83rTtZl+
 gm1ruekfKXhmT6V92Ok3maFNU+odF6X/R1YcM2n3DTso+MugPHFYTj5VZy5qZN3+
 4x6wHTQLDr81vPz7hx4gDTK42nVplFnIHp8p9WBSH6Zs7gCYPyZAfCPmF4EzBVfo
 bjpixpGuhmM8yQweD5nFWpvnXK/e5nbfxW2vt85G+cjjNbw0OZ182UJH8PEAUam6
 786p5y1YyS9pFgJgLSHrQ041E6EQ4QjMpNbVF+7MUpe49emA0l/V7VLSNGWpeKzg
 tcuO1ycK
 =4m/d
 -----END PGP SIGNATURE-----

Merge tag 'v2024.04-rc5' into next

Prepare v2024.04-rc5
2024-03-25 22:15:47 -04:00
Caleb Connolly
304fa0aa44 usb: gadget: UMS: support multiple sector sizes
UFS storage often uses a 4096-byte sector size, add support for dynamic
sector sizes based loosely on the Linux implementation.

Support for dynamic sector sizes changes the types used in some
divisions, resulting in the compiler attempting to use
libgcc helpers (__aeabi_ldivmod).
Replace these divisions with calls to lldiv() to handle this correctly.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-4-41be480172e1@linaro.org
[mkorpershoek: squashed the lldiv() fix from caleb]
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-03-22 10:16:13 +01:00
Heinrich Schuchardt
68fc0b877b cmd: bootefi: error handling bootefi selftest
If bootefi selftest is executed and a problem with the device-tree
installation occurs, efi_install_fdt() writes sensible error messages.
It never returns EFI_INVALID_PARAMETER. It neither makes sense to check
for EFI_INVALID_PARAMETER nor to show the usage help for the bootefi
command in this case.

Fixes: 296faf4f7e ("cmd: bootefi: re-organize do_bootefi()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-03-21 07:28:43 +01:00
Heinrich Schuchardt
46e5dd661c cmd: bootefi: Don't show usage help if EFI binary fails.
If an EFI binary returns an error code EFI_INVALID_PARAMETER, we show the
usage help for the bootefi command:

    Shell> exit 0x8000000000000002
    ## Application failed, r = 2
    bootefi - Boots an EFI payload from memory

    Usage:
    bootefi <image address>[:<image size>] [<fdt address>]
      - boot EFI payload
    bootefi bootmgr [fdt address]
      - load and boot EFI payload based on BootOrder/BootXXXX variables.

        If specified, the device tree located at <fdt address> gets
        exposed as EFI configuration table.

This makes no sense.

Fixes: 296faf4f7e ("cmd: bootefi: re-organize do_bootefi()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-03-21 07:28:43 +01:00
Tom Rini
f048104999 Merge tag 'u-boot-socfpga-next-20240319' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next
- A new driver in the misc to register setting from device tree. This
  also provides user a clean interface and all register settings are
  centralized in one place, device tree.
- Enable Agilex5 platform for Intel product. Changes, modification and
  new files are created for board, dts, configs and makefile to create
  the base for Agilex5.

Build-tested on SoC64 boards, boot tested on some of them.
2024-03-19 09:10:30 -04:00
Tom Rini
099c94b761 Merge tag 'u-boot-rockchip-20240315' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next
Please pull the updates for rockchip platform:
- Add board: rk3588 Generic, Cool Pi CM5, Theobroma-Systems RK3588 Jaguar SBC,
             Toybrick TB-RK3588X;
             rk3588s Cool Pi 4B;
             rk3566 Pine64 PineTab2;
- Add saradc v2 support;
- Add PMIC RK806 support;
- rk3588 disable force_jtag by default;
- Migrate to use IO-domain driver for all boards;
- Use common bss and stack addresses for rk33xx and rk35xx boards;
- Other updates for driver, config and dts;
2024-03-15 09:15:31 -04:00
Quentin Schulz
808156189b pmic: reword help text
Reword the help text for the pmic read and pmic write commands to better
match what's expected from the user.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-03-14 18:19:44 +08:00
Maxim Moskalets
6d1734f005 cmd: add FDT setup for bootelf by flag
Added the ability to use FDT for ELF applications, required to run some
OS. To make FDT setup, you need to set the -d fdt_addr_r cmd option for
bootelf command. Enable by selecting CMD_ELF_FDT_SETUP.

Signed-off-by: Maxim Moskalets <Maxim.Moskalets@kaspersky.com>
2024-03-13 18:47:11 -04:00
Hanyuan Zhao
421359ac52 cli: allow users to determine history buffer allocation method
This commit allows users to choose the appropriate memory
allocation method between static allocated and dynamically
calloc. The previous static-array way will not obviously
contribute to the final binary size since it is uninitialized,
and might have better performance than the dynamical one.
Now we provide the users with both the two options.

Signed-off-by: Hanyuan Zhao <hanyuan-z@qq.com>
2024-03-13 12:40:43 -04:00
Weizhao Ouyang
9a6e975c7c cmd: rng: Add rng list command
The 'rng list' command probes all RNG devices and list those devices
that are successfully probed. Also update the help info.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2024-03-13 12:40:43 -04:00