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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
-----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
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>
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>
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>
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>
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>
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.
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
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
- 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.
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;
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>
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>
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>
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>