This breaks chromebook_coral which says:
Video: No video mode configured in FSP!
This reverts commit 2e9313179a.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a small utility for displaying some information about U-Boot and the
hardware it's running on in a similar fashion to the popular neofetch
tool for Linux [1].
While the output is meant to be useful, it should also be pleasing to
look at and perhaps entertaining. The ufetch command aims to bring this
to U-Boot, featuring a colorful ASCII art version of the U-Boot logo.
[1]: https://en.wikipedia.org/wiki/Neofetch
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8560-QRD
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Tony Dinh <mibodhi@gmail.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
The lwIP version of wget also supports the legacy syntax. Document it in
the help string.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Prepare for implementing the EFI_HTTP_PROTOCOL.
* Make wget functionality callable even if the wget command is not built.
(add CONFIG_WGET symbol)
* Ensure that wget_with_dns() works the same with the old network stack
and with lwIP.
* Put server_name and port into wget_ctx.
* Integrate struct wget_info into wget code.
* Move ip_to_string to lib/net_utils.c
-----BEGIN PGP SIGNATURE-----
iQJWBAABCABAFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmc7WYAiHGhlaW5yaWNo
LnNjaHVjaGFyZHRAY2Fub25pY2FsLmNvbQAKCRCE7i+CcTdTS9ubD/9PHIyInE2t
jnjlHufnTzWJ1FRhj2ppykXWVVVtWlcGsGQ9TDdKqsNsCuFYnthnvRMuny7D8IXG
c6JuaqvRClwyZqFXbuvpD6wR1+AdLCgN0WEDKy47akMA5DrvH56t1HLwrZm/rBK+
cr8Nk3/+78+FQGRwDi0FdxMYqRZvH74eaNxQGHDuGJh4RTqYqHp01UA3xPz8uP1N
Tv+gVnf5lJsI5ZqjZCbjZ4KcN2JLwVOMIeGz9b/OqB9qP8OT+dqSUGRhL13qaier
Bdk0JT5BKhkzXxjOdSD2Iv2FJzSvWLG9h3FxjndyZwCqodOivsjSGh4bfkpeC6AH
QYHpIGP4VlYLs6wCBe4Ae9RJVTMrXEQbTARtLGcCI7ilTkGirfnb4bqFVWWALTdf
n7R5H5cbKsR3vIcRf78UbdJOuLREOnvc72uKrVgRpkWo7HlixIoTuPrVJJPLmser
frBLcnSaDOExkRJV1zaLp2VFE4g/AIgOYd+WyI8F70RoDJe+qyNfiaABFh29aIay
IGFw9mAklcMZEzbU5YiOZVyM7LlrP4u/JDJJs6Z+El8TiubYUrOu0ita/OtNa/RB
rwLgX+fhJZ+tYvm+mi4NY0PqW9L2HHRC1jMMVYM1VktCHRQJV3TbvEaOEsvBbrJR
D1pSyqBnMLf0aqQ1SiVaoZjmteknFwBGGQ==
=8xjC
-----END PGP SIGNATURE-----
Merge tag 'efi-next-2024-11-18' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/23430
- Prepare for implementing the EFI_HTTP_PROTOCOL:
- Make wget functionality callable even if the wget command is not
built (add CONFIG_WGET symbol).
- Ensure that wget_with_dns() works the same with the old network
stack and with lwIP.
- Put server_name and port into wget_ctx.
- Integrate struct wget_info into wget code.
- Move ip_to_string to lib/net_utils.c
These fields are currently set on exactly two platforms today, and used
by only one of them. Update pic32mzdask to use CFG_SYS_SRAM* in the one
location it needs it and otherwise drop this field from the bd_info
struct.
Signed-off-by: Tom Rini <trini@konsulko.com>
Each wget request now fills the struct wget_info. The efi
bootdevice is now set conditionally to the set_bootdevice
variable in wget_info, and the same holds for lmb memory check.
Signed-off-by: Adriano Cordova <adrianox@gmail.com>
Let net/wget.c and net/lwip/wget.c depend on CONFIG_WGET, and
cmd/wget.c depend on CONFIG_CMD_WGET. This way, the wget code
can be used regardless of whether the wget command is available.
Signed-off-by: Adriano Cordova <adrianox@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Rasmus Villemoes <ravi@prevas.dk> says:
Doing bringup of a board, part of my bootstrap logic is in U-Boot. So
when tweaking that logic, I was bitten by a previous completed
bootstrap having left a copy of the environment on the device, which
was imported and thus overrided the new logic.
So I thought, "ok, I'll just make sure to put 'env default -a' as the
first part of the bootstrap logic so I'm not bitten again". Alas, my
logic also relies on certain variables that are set by C code
(e.g. for detecting board variant), and doing 'env default -a' also
eliminates those.
Looking around, the hashtab code already supports a flag that does
exactly what I need, and exposing that is (morally) a one-liner.
Link: https://lore.kernel.org/r/20241030213404.2894247-1-ravi@prevas.dk
It can be useful to set all variables defined in the default
environment to the value they have there, but without removing
variables that are only defined at runtime. This can sort-of be done
today, by using the "env default var1 var2 ..." variant, but that
requires listing all variables defined in the default
environment. It's much more convenient to be able to say
env default -k -a
The -k flag is also meaningful in the other case: If var1 is not
defined in the default environment, but var2 is,
env default var1 var2
would emit a warning about var1 not being in the default env and thus
being deleted. With -k, there's no warning, and var1 is kept as-is.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
do_upl_write() calls upl_get_test_data() which may increment the fail
count in the unit test state. We should initialize it.
Addresses-Coverity-ID: 510465 Uninitialized scalar variable
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:
Since commit 348ea87850 ("cmd: hash: fix param count check") the hash
command cannot be used without the optional variable name parameter if
CONFIG_HASH_VERIFY=y. 'hash sha1 $loadaddr $filesize' returns
CMD_RET_USAGE.
The minimum number of arguments is four no matter if verification is
enabled or not.
Fix the parameter check.
Provide a unit test.
Link: https://lore.kernel.org/r/20241102100836.103005-1-heinrich.schuchardt@canonical.com
Since commit 348ea87850 ("cmd: hash: fix param count check") the hash
command cannot be used without the optional variable name parameter if
CONFIG_HASH_VERIFY=y. 'hash sha1 $loadaddr $filesize' returns
CMD_RET_USAGE.
The minimum number of arguments is four no matter if verification is
enabled or not.
Fixes: 348ea87850 ("cmd: hash: fix param count check")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
With the recent changes of lwip & mbedTLS we can now download from
https:// urls instead of just http://.
Adjust our wget lwip version parsing to support both URLs.
While at it adjust the default TCP window for QEMU since https seems to
require at least 16384
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Record the last active menu item and check if it equals to the
current selected item before reprint.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
This patch adds a new callback named need_reprint for menu.
The need_reprint will be called before printing the menu. If the
callback exists and returns FALSE, menu printing will be canceled.
This is very useful if the menu was not changed. It can save time
for serial-based menu to handle more input data.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
This is mostly hidden in the background, but it is sometimes useful to
look at it. Add a function to allow this.
Signed-off-by: Simon Glass <sjg@chromium.org>
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>
Coreboot tables provide information about the CMOS-RAM checksum. Add a
command which can check and update this.
With this it is possible to adjust CMOS-RAM settings and tidy up the
checksum afterwards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Update the cbsysinfo command to show the contents of the CMOS option
table.
While we are here, add some example output for this command, along with
mention of what the unimplemented tags are.
Signed-off-by: Simon Glass <sjg@chromium.org>
When the buffer address is not set, say so, rather than showing an
address which looks very strange, on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
To conform with other messages capitalize the first letter:
%s/enter description/Enter description/g
Adjust the unit tests accordingly.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
/Makefile already adds lib include paths to UBOOTINCLUDE. There is no point
in adding the same paths again.
Clearly separate the lines relating to NET and to NET_LWIP.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
The SBI 3.0 specification [1] adds the following extensions:
* Firmware Features Extension
* Message Proxy Extension
Let the sbi command detect their availability.
The Firmware Features Extension is already implemented in OpenSBI.
Correct the text for the DBTR extension and move it to the same position
as in the specification.
[1] https://github.com/riscv-non-isa/riscv-sbi-doc/releases/download/vv3.0-rc1/riscv-sbi.pdf
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
U-Boot has a fairly rigid memory map which is normally not visible
unless debugging is enabled in board_f.c
Update the 'meminfo' command to show it. This command does not cover
arch-specific pieces but gives a good overview of where things are.
Signed-off-by: Simon Glass <sjg@chromium.org>
In preparation for expanding this command, move it into a separate file.
Rename the function to remove the extra underscore. Update the number of
arguments to 1, since 3 is incorrect.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/22962
Dfu:
- Rely on device tree for spi speed/mode on spi flash
Android Image:
- Fix booting on platforms having > 4GiB of memory
- Decompress boot image to kernel_addr_r when compression is enabled
- Honor CONFIG_SYS_LOAD_ADDR when mkbootimg uses default address
Bcb:
- Rework bcb command to use U_BOOT_LONGHELP
- Move ab_select cmd to bcb cmd
- Implement ab_dump command in bcb
- bcb: Write '_<slot>' instead of '<slot>' to misc partition
Some functions are not used anywhere except the same file
where they are defined. Mark them static. This helps avoiding
the compiler warnings:
cmd/nvedit.c:201:5: warning: no previous prototype for ‘do_env_ask’ [-Wmissing-prototypes]
cmd/nvedit.c:315:5: warning: no previous prototype for ‘do_env_callback’ [-Wmissing-prototypes]
cmd/nvedit.c:384:5: warning: no previous prototype for ‘do_env_flags’ [-Wmissing-prototype ]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
It's really helpful to have the ability to dump BCB block for debugging
A/B logic on the board supported this partition schema.
Command 'bcb ab_dump' prints all fields of bootloader_control struct
including slot_metadata for all presented slots.
Output example:
=====
> board# bcb ab_dump ubi 0#misc
> Read 512 bytes from volume misc to 000000000bf07580
> Read 512 bytes from volume misc to 000000000bf42f40
> Bootloader Control: [misc]
> Active Slot: _a
> Magic Number: 0x42414342
> Version: 1
> Number of Slots: 2
> Recovery Tries Remaining: 0
> CRC: 0x2c8b50bc (Valid)
>
> Slot[0] Metadata:
> - Priority: 15
> - Tries Remaining: 0
> - Successful Boot: 1
> - Verity Corrupted: 0
>
> Slot[1] Metadata:
> - Priority: 14
> - Tries Remaining: 7
> - Successful Boot: 0
> - Verity Corrupted: 0
====
The ab_dump command allows you to display ABC data directly on the
U-Boot console. During an A/B test execution, this test verifies the
accuracy of each field within the ABC data.
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-5-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
In the entire cmd/bcb.c file, the return value of strcmp() is not
directly compared to 0. Therefore, it would be better to maintain this
style in the new do_bcb_ab_select() function as well.
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-4-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To enhance code organization, it is beneficial to consolidate all A/B
BCB management routines into a single super-command.
The 'bcb' command is an excellent candidate for this purpose.
This patch integrates the separate 'ab_select' command into the 'bcb'
group as the 'ab_select' subcommand, maintaining the same parameter list
for consistency.
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-3-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
expo improvements
binman support for signing FIT images
-----BEGIN PGP SIGNATURE-----
iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmcSwRQRHHNqZ0BjaHJv
bWl1bS5vcmcACgkQfxc6PpAIreYWLgf/dnh+7hFENA/pIp57kiihzLc4sH+XaCiR
A6MDkSnYWFCJpklz2rPPGsyuxEVtNgVtHEpPwA8OPaXitfuyLW/u5woBN6Sdtcvw
Fqvq72IIMIt3BR6pU2uYZ6w/4t0r0/2pdSYG7L77QJjGsFSe35/RbVaGeln//SEk
7/5tnqQ13QbhfazwLWNGT7+8R65NcpSwywxGqMcKWMPLt0CW+DMmon4oBuya20pv
i5uDIp7WWtyxFaCxB3vzKmaXVmX74x9wyWA/K6uWsWt0/9JnEpQh5+IcgKw5ifGF
sz2kVyZgCXilw1itrmO67O98KPfbRSFIQO2gSZ5NnNB4wrIgFXK2KA==
=1pdb
-----END PGP SIGNATURE-----
Merge tag 'dm-pull-17oct24-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
A few new x86 commands and minor improvements
expo improvements
binman support for signing FIT images
Building on 32-bit results in a build failure:
cmd/upl.c:75:51: warning: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 3 has type ‘size_t’
{aka ‘unsigned int’} [-Wformat=]
75 | printf("UPL handoff written to %lx size %lx\n", addr, abuf_size(&buf));
| ~~^ ~~~~~~~~~~~~~~~
| | |
| | size_t {aka unsigned int}
| long unsigned int
| %x
Fixes: 264f4b0b34 ("upl: Add a command")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
The real-time clock is needed for most X86 systems and it is useful to
be able to read from it. Enable the rtc command by default.
Signed-off-by: Simon Glass <sjg@chromium.org>
It is useful to obtain the results of MSR queries as well as to update
MSR registers, so add a command these tasks.
Signed-off-by: Simon Glass <sjg@chromium.org>
do_wget is defined in cmd/net.c.
cmd/net.c is not compiled if CONFIG_CMD_NET=n.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Move do_irqinfo() prototype to a header file, otherwise compiler is not
happy:
arch/x86/lib/interrupts.c:130:5: warning: no previous prototype for ‘do_irqinfo’ [-Wmissing-prototypes]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Add 'struct cmd_tbl;' to irq_func.h]
Signed-off-by: Tom Rini <trini@konsulko.com>