Commit graph

433 commits

Author SHA1 Message Date
Simon Glass
b279f5170a bdinfo: Show the RAM top and approximate stack pointer
These are useful pieces of information when debugging. The RAM top shows
where U-Boot started allocating memory from, before it relocated. The
stack pointer can be checked to ensure it is in the correct region.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Nikhil M Jain <n-jain1@ti.com>
2023-07-17 17:12:03 +08:00
Peter Robinson
10de125707 disable NFS support by default
While NFS is widely used in data centres, and private
networks it's quite a nuanced usecase for device firmware.
A lot of devices already disable it.

Various network protocols should really be opt in, not opt
out, because they add extra size and are potential attack
vectors from a security PoV. In the NFS case it doesn't
really make sense for a lot of devices like tables, SBCs etc.
It's also something we don't really want for SystemReady-IR
due to security concerns.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-07-14 15:21:07 -04:00
Simon Glass
a0874dc4ac expo: Add a configuration editor
Add a new 'cedit' command which allows editing configuration using an
expo. The configuration items appear as menus on the display.

This is extremely basic, only supporting menus and not providing any way
to load or save the configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14 12:54:51 -04:00
Ying Sun
aadc1a6069 cmd: CONFIG_CMD_SAVES depends on CONFIG_CMD_LOADS
CONFIG_CMD_SAVES is used to enable support for the "saveenv" command
and is only implemented in cmd/load.c
when "#if defined(CONFIG_CMD_LOADS)" is met.

It is recommended to add dependency constraints to its definition.
Prevents "saveenv" command from not being supported
when "CONFIG_CMD_SAVES=y CONFIG_CMD_LOADS=n".

Suggested-by: Yanjie Ren <renyanjie01@gmail.com>
Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-07 16:25:56 -04:00
Marek Vasut
77aed22b48 spl: spl_legacy: Add extra address checks
Check whether the loaded image or entry point does not overlap SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
2023-06-24 13:47:00 -04:00
Simon Glass
d8d40bc392 bootstd: Correct default boot command
The patch to relax flag requirements was not accepted[1], so we still have
to have separate bootcommands depending on CMD_BOOTFLOW_FULL.

The previous attempt at this did not work, since it used the wrong name
for the options.

Fix this and change the message to mention BOOTSTD_FULL since this affects
not just the flags, but all functionality, so is more likely what the user
wants.

Drop the useless condition on CMD_BOOTFLOW_FULL while we are here.

[1] https://patchwork.ozlabs.org/project/uboot/patch/20230329071655.1959513-2-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: a91492b6e9 ("bootstd: Provide a default command")
2023-05-13 09:52:32 -04:00
Simon Glass
0992a90daa acpi: Create a new Kconfig for ACPI
We have several Kconfig options for ACPI, but all relate to specific
functions, such as generating tables and AML code.

Add a new option which controls including basic ACPI library code,
including the lib/acpi directory. This will allow us to add functions
which are available even if table generation is not supported.

Adjust the command to avoid a build error when ACPIGEN is not enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-05-11 10:25:29 +08:00
Ehsan Mohandesi
6de98b60ba net: ipv6: Add support for default gateway discovery.
In IPv6, the default gateway and prefix length are determined by receiving
a router advertisement as defined in -
https://www.rfc-editor.org/rfc/rfc4861.

Add support for sending router solicitation (RS) and processing router
advertisements (RA).

If the RA has prefix info option and following conditions are met, then
gatewayip6 and net_prefix_length of ip6addr env variables are initialized.
These are later consumed by IPv6 code for non-local destination IP.

- "Router Lifetime" != 0
- Prefix is NOT link-local prefix (0xfe80::/10)
- L flag is 1
- "Valid Lifetime" != 0

Timing Parameters:
- MAX_RTR_SOLICITATION_DELAY (0-1s)
- RTR_SOLICITATION_INTERVAL (4s) (min retransmit delay)
- MAX_RTR_SOLICITATIONS (3 RS transmissions)

The functionality is enabled by CONFIG_IPV6_ROUTER_DISCOVERY and invoked
automatically from net_init_loop().

Signed-off-by: Ehsan Mohandesi <emohandesi@linux.microsoft.com>
Tested-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>Reviewed-by:
Tested-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Tested-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Sergei Antonov <saproj@gmail.com>
2023-05-05 17:58:52 -04:00
Sean Edmond
7d0188927b net: dhcp6: pxe: Add DHCP/PXE commands for IPv6
Adds commands to support DHCP and PXE with IPv6.

New configs added:
- CMD_DHCP6
- DHCP6_PXE_CLIENTARCH
- DHCP6_PXE_DHCP_OPTION
- DHCP6_ENTERPRISE_ID

New commands added (when IPv6 is enabled):
- dhcp6
- pxe get -ipv6
- pxe boot -ipv6

Signed-off-by: Sean Edmond <seanedmond@microsoft.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-05-05 17:48:44 -04:00
Simon Glass
a554ee7ede cmd: Add 2048 game
Add the 2048 game, a good demo of ANSI sequences and a way to waste a
little time.

Bring it it from Barebox, modified for code style.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-06 19:10:08 -04:00
Heinrich Schuchardt
fa3f0cbe13 cmd: CONFIG_CMD_SCSI depends on CONFIG_SCSI
Compiling with CONFIG_CMD_SCSI=y, CONFIG_SCSI results in

    cmd/scsi.c:46: undefined reference to `scsi_scan'

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-06 19:10:08 -04:00
Tobias Waldekranz
bb56da117f cmd: blkmap: Add blkmap command
Add a frontend for the blkmap subsystem. In addition to the common
block device operations, this allows users to create and destroy
devices, and map in memory and slices of other block devices.

With that we support two primary use-cases:

- Being able to "distro boot" from a RAM disk. I.e., from an image
  where the kernel is stored in /boot of some filesystem supported
  by U-Boot.

- Accessing filesystems not located on exact partition boundaries,
  e.g. when a filesystem image is wrapped in an FIT image and stored
  in a disk partition.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-05 10:54:47 -04:00
Svyatoslav Ryhel
a57adacf50 cmd: ums: abort mounting by pressing any key
This patch introduses config which allows interrupt run of usb
mass storage with any key. This is especially useful on devices
with limited input capabilities like tablets and smatphones which
have only gpio keys in direct access.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-30 15:09:59 -04:00
Stephen Carlson
59b1c9be01 cmd: pci: Add command to set MPS of all PCIe devices
Enable tuning of the PCI Express MPS (Maximum Payload Size) of
each device. The Maximum Read Request Size is not altered.

The SAFE method uses the largest MPS value supported by all devices in the
system for each device. This method is the same algorithm as used by Linux
pci=pcie_bus_safe.

The PEER2PEER method sets all devices to the minimal (128 byte) MPS, which
allows hot plug of devices later that might only support the minimum size,
and ensures compatibility of DMA between two devices on the bus.

Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com>
2023-03-30 15:09:59 -04:00
Rasmus Villemoes
8311ac5fe0 cmd: introduce 'write' command
It's almost no extra code to hook up a buddy to the 'read' command. In
fact, since the command is passed its own 'struct cmd_tbl', we can use
the exact same callback, and let it figure out for itself whether it
was invoked as "read" or "write".

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17 15:44:01 -04:00
Dzmitry Sankouski
e7ee1fd567 video console: allow font size configuration at runtime
Allow font size configuration at runtime for console_simple.c
driver. This needed for unit testing different fonts.

Configuring is done by `font` command, also used for font
selection in true type console.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-07 15:59:35 +01:00
Heinrich Schuchardt
8925f0ee7e efi_loader: enable eficonfig command by default
The eficonfig command is required to set boot options.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-02-10 13:05:40 +01:00
Heinrich Schuchardt
75d494df01 cmd: CONFIG_CMD_EFICONFIG requires CONFIG_MENU
The eficonfig command invokes functions implemented in common/menu.c like

* menu_default_set()
* menu_get_choice()
* menu_destroy()
* menu_item_add()

Fixes: 87d791423a ("eficonfig: menu-driven addition of UEFI boot option")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-02-10 13:05:39 +01:00
Simon Glass
e158c94883 cmd: Add an option to enable the ini command
This command has no Kconfig option at present, but seems useful enough to
keep around. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-07 14:33:48 -05:00
Linus Walleij
41a29f284c cmd: Add a SEAMA image load command
Add a command to load SEAMA (Seattle Image), a NAND flash
on-flash storage format.

This type of flash image is found in some D-Link routers such
as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L and
DCH-M225, as well as in WD and NEC routers on the ath79
(MIPS), Broadcom BCM53xx, and RAMIPS platforms.

This U-Boot command will read and decode a SEAMA image from
raw NAND flash on any platform. As it is always using big endian
format for the data decoding is always necessary on platforms
such as ARM.

The command is needed to read a SEAMA-encoded boot image on the
D-Link DIR-890L router for boot from NAND flash in an upcoming
port of U-Boot to the Broadcom Northstar (BCM4709, BCM53xx)
architecture.

A basic test and documentation is added as well. The test must
be run on a target with NAND flash support and at least one
resident SEAMA image in flash.

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-02-06 17:10:15 -05:00
Tom Rini
095d909cf1 - jethub j100: add rescue boot from microSD
- move meson sm command to cmd/meson and add efusedump sub-command
 - switch dwc2 otg to DM for G12A, GXL & AXG
 - Add new boards:
  - Odroid Go Ultra
  - Odroid-N2L
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmPY1OsACgkQd9zb2sjI
 SdEo4w//WU0siViTHkco8GH7eZDrRKbsxgMZpmjih2gblDKfxmMPYFFtciXPH3wg
 isBu+qfLFtTIg5oEvwS42G4RzNQPV8HDcpc7Md/3n3GtxF1l/dCo0nvfIi9PsuLB
 x1GYAJ5yphgOC85DB55Gnq7sj7L2/7z6dd/HFGO691+3Bcbq8RH6DDZ0MNZpiiUK
 Ns43u+A6Ydc2/fpX9U7X2wf7CoEk77qWmiN2N1egVIeRsBallPxs/DPNLI2q7AGZ
 OGY+M3lVynRlNJULdgljqvVm1/KjlsVGHRwDAFD7Gl6HhGymxhXJJuNTh+le4ruw
 f5KLpUI9mEEmST6NfKqj+8Ozd3q8c1EHD0baKupIeTaherWi/sD9DpnMli4efrUj
 CkrBPqgxScxauuYAbMjRmKJgICRzNMJAsKX57q8s0TjhWyAfoTKIPWHUpSjAeDRE
 1pWblV0WZWFErMmdHllINFtFYl+XBCi/1qp2t8AYA06DPnBrY2s/eY9pxih0G7nB
 tzNkqWTwMAJ7PYOzDA7mv80n2Q2zjqJV55dzjRRehA3XSuP920qFVMVShSYv28O6
 fh8t84rdqfvFMSnQy6zHaxGEJIwaH9C6aFM8MGak2WLI1EYLIxVi79qf+T3iMbdj
 gkKvt5m4kF7Ul8nB/7Az7nNH1JdHgVRXLIzo+lam4AdYccONvVI=
 =cmt7
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20230131' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- jethub j100: add rescue boot from microSD
- move meson sm command to cmd/meson and add efusedump sub-command
- switch dwc2 otg to DM for G12A, GXL & AXG
- Add new boards:
 - Odroid Go Ultra
 - Odroid-N2L
2023-01-31 10:15:39 -05:00
Tom Rini
448e2b6327 event: Correct dependencies on the EVENT framework
The event framework is just that, a framework. Enabling it by itself
does nothing, so we shouldn't ask the user about it. Reword (and correct
typos) around this the option and help text. This also applies to
DM_EVENT and EVENT_DYNAMIC. Only EVENT_DEBUG and CMD_EVENT should be
visible to the user to select, when EVENT is selected.

With this, it's time to address the larger problems. When functionality
uses events, typically via EVENT_SPY, the appropriate framework then
must be select'd and NOT imply'd. As the functionality will cease to
work (and so, platforms will fail to boot) this is non-optional and
where select is appropriate. Audit the current users of EVENT_SPY to
have a more fine-grained approach to select'ing the framework where
used. Also ensure the current users of event_register and also select
EVENT_DYNAMIC.

Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: Oliver Graute <Oliver.Graute@kococonnector.com>
Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Fixes: 7fe32b3442 ("event: Convert arch_cpu_init_dm() to use events")
Fixes: 42fdcebf85 ("event: Convert misc_init_f() to use events")
Fixes: c5ef202557 ("dm: fix DM_EVENT dependencies")
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-01-18 12:46:13 -05:00
Patrick Delaunay
6762c8dd89 cmd: mtdparts: add SYS_MTDPARTS_RUNTIME dependency on CONFIG_MTDIDS/MTDPARTS_DEFAULT
The two configuration CONFIG_MTDIDS_DEFAULT and CONFIG_MTDPARTS_DEFAULT
are not needed with mtd configuration CONFIG_SYS_MTDPARTS_RUNTIME which
allows the MTDIDS and MTDPARTS to be configured at runtime.

This patch has no defconfig impacts because CONFIG_SYS_MTDPARTS_RUNTIME
is only used by two platforms (stm32mp and igep00x0) which don't define
CONFIG_MTDIDS_DEFAULT or CONFIG_MTDPARTS_DEFAULT.

This patch solves an UBI environment load issue for NAND boot for
stm32mp15 platform. In mtd_uboot.c, when GD_FLG_ENV_READY is not set,
env_get_f() return a EMPTY string, define in default_environment[]
because CONFIG_MTDIDS_DEFAULT="" and CONFIG_MTDPARTS_DEFAULT="",
but a NULL pointer is expected to allow call of board_mtdparts_default.
Without mtdparts, the env partition [CONFIG_ENV_UBI_PART="UBI"] is not
found in env/ubi.c [CONFIG_ENV_IS_IN_UBI].

It is not a problem when env becomes ready, as these empty variables are
removed form U-Boot environment in env_import() / himport_r().

Fixes: a331017c23 ("Complete migration of MTDPARTS_DEFAULT / MTDIDS_DEFAULT, include in environment")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-11 11:54:50 -05:00
Alexey Romanov
311106a1c6 arm/mach-meson: move smc commands in cmd/meson
It is incorrect to keep commands in the arch/ folder.

Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230110105650.54580-3-avromanov@sberdevices.ru
[narmstrong: moved after cmd/sound in index.rst]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-10 15:27:17 +01:00
Tom Rini
cebdfc22da Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-09 11:30:08 -05:00
Michael Walle
20422d6930 cmd: net: wget: fix Kconfig dependency
The wget command uses TCP, but fails to select PROT_TCP in Kconfig.
Instead it selects the non-existing symbol TCP. Fix the typo.

Signed-off-by: Michael Walle <michael@walle.cc>
2022-12-29 09:50:53 -05:00
Tom Rini
60910a3f02 Convert CONFIG_THOR_RESET_OFF to Kconfig
This converts the following to Kconfig:
   CONFIG_THOR_RESET_OFF

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22 10:31:48 -05:00
Viacheslav Mitrofanov
eeb0a2c693 net: ping6: Add ping6 command
Implement ping6 command to ping hosts using IPv6. It works the same way as
an ordinary ping command. There is no ICMP request so it is not possible
to ping our host. This patch adds options in Kconfig and Makefile to
build ping6 command.

Series-changes: 3
- Added structures and functions descriptions
- Added to ping6_receive() return value instead of void

Series-changes: 4
- Fixed structures and functions description style

Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05 12:47:16 -05:00
Ying-Chun Liu (PaulLiu)
cfbae48219 net: Add wget application
This commit adds a simple wget command that can download files
from http server.

The command syntax is
wget ${loadaddr} <path of the file from server>

Signed-off-by: Duncan Hare <DuncanCHare@yahoo.com>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-11-28 13:06:39 -05:00
John Keeping
2fdc4c0c49 cmd: fix dependency for CMD_CLS
It seems this symbol was missed when renaming DM_VIDEO -> VIDEO.  Update
it.

Fixes: b86986c7b3 ("video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO")
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: John Keeping <john@metanate.com>
2022-11-24 16:26:03 -05:00
Tom Rini
2c8d04dd17 Convert CONFIG_SYS_LOADS_BAUD_CHANGE et al to Kconfig
This converts the following to Kconfig:
   CONFIG_SYS_LOADS_BAUD_CHANGE
   CONFIG_LOADS_ECHO

As part of this, we move CMD_SAVES to be after CMD_LOADS as they are
logically related (load or save an s-record format file) and this makes
grouping of CONFIG_SYS_LOADS_BAUD_CHANGE easier.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-10 09:45:54 -05:00
Sughosh Ganu
e68c03be46 FWU: cmd: Add a command to read FWU metadata
Add a command to read the metadata as specified in the FWU
specification and print the fields of the metadata.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-10-31 14:47:33 -04:00
Simon Glass
b86986c7b3 video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO
Now that all the old code is gone, rename this option. Driver model
migration is now complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:07:17 +01:00
Simon Glass
8b1129588c video: Drop CONFIG_LCD
This option is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:07:17 +01:00
Simon Glass
d32eb92e91 video: Drop CONFIG_VIDEO
This option is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:07:17 +01:00
Simon Glass
3f425f9ca7 video: Enable the cls command by default
This is enabled for LCD but not for VIDEO. Enable it since it is useful
to be able to clear the screen and adds very little code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:01:40 +01:00
Simon Glass
f029f90e7d video: Move the console commands to cmd/
Move these commands and the implementation to the cmd/ directory, which is
where most commands are kept.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
[agust: keep vidconsole_position_cursor() in vidconsole uclass]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2022-10-30 19:55:22 +01:00
Samuel Mendoza-Jonas
4b290d4a75 cmd: Add ncsi command
Adds an "ncsi" command to manually start NC-SI configuration.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
2022-10-21 16:04:39 -04:00
Andre Przywara
177040b1eb sunxi: Kconfig: use SoC-wide values for some symbols
Some configuration symbols formerly defined in header files were
recently converted to Kconfig symbols. This moved their value definition
into *every* defconfig file, even though those values are hardly board
choices.
Use the new Kconfig option to define per-SoC default values, in just one
place, which makes the definition in each defconfig file redundant.

We refrain from setting a sunxi specific value for CONFIG_SYS_BOOTM_LEN,
so this defaults to a much better 64MB for uncompressed arm64 kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-18 08:18:30 +01:00
Robert Marko
7f673bb8f5 cmd: add temperature command
Currently, there is no way for users to check the readings from thermal
sensors from U-boot console, only some boards print it during boot.

So, lets add a simple "temperature" command that allows listing thermal
uclass devices and getting their value.

Note that the thermal devices are intenionally probed if list is used as
almost always they will not get probed otherwise and there is no way for
users to manually call probe on a certain device from console.

Assumption is made that temperature is returned in degrees C and not
milidegrees like in Linux as this is what most drivers seem to return.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11 15:40:48 -04:00
Roger Knecht
23c0df6e7c cmd: xxd: add new command
Add xxd command to print file content as hexdump to standard out

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-10-11 15:40:48 -04:00
Roger Knecht
690a1d6948 cmd: cat: add new command
Add cat command to print file content to standard out

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-10-11 15:40:48 -04:00
Heinrich Schuchardt
c6db606dbb cmd: CMD_CLS should not depend on video
The cls command works fine on the serial console. There is no reason to
let it depend on the availability of video.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-10 16:34:25 +02:00
Tom Rini
e9a1ff9724 Merge branch 'master' into next
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-19 16:07:12 -04:00
Simon Glass
003357cc48 cmd: Drop use of HAVE_BLOCK_DEVICE
This condition is not needed for these commands, since BLK is enabled for
all boards which use block devices and commands are not available in SPL,
so even if SPL_BLK is not enabled, it doesn't affect commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16 11:05:00 -04:00
Pali Rohár
1b3e68203c xyz-modem: Allow to configure initial timeout for loadx and loady
Now when loadx and loady commands could be aborted / cancelled by CTRL+C,
allow to configure timeout for initial x/y-modem packet via env variable
$loadxy_timeout and by default use value from new compile-time config
option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means
infinite timeout. Default value is 90s which is the value used before this
change for loadx command.

Other load commands loadb and loads already waits infinitely. Same behavior
for loadx and loady commands can be achieved by setting $loadxy_timeout or
CONFIG_CMD_LOADXY_TIMEOUT to 0.

Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15 09:55:30 -04:00
Tom Rini
1520af3f84 Pull request for efi next
UEFI:
 
 Implement a command eficonfig to maintain Load Options and boot order via
 menus.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmMh/kQACgkQxIHbvCwF
 GsSYVhAAlhyCiAQudBJtrOyAA0HDPMio/Fx9F3YV1Laay//6+xHhEh5H94fMr7jP
 BHOrpE+IDKQTiQ8X3FpJpm3FzgQBzu0s4gQ+8fCKwkXCkaPTtWhs3s5SdHN0TWmv
 qGlNbuPdoU+4i7PeBWw87EvOCzh4+snn+l3t+npMxUlZJInGy+6xj0irnSEXTvXV
 lpDRw2UDq3/smAS8tAcR+zriTH5o1Lx+0qPIO9Hw8BSDHOcvZD+S9d6cd6j+M+Wz
 rWk1Bshol6anIZWS5Gnx14ddKF8SQcSiPsDXg2Uj2DvFg7lWepKxAbDJD5CVF9R9
 aEu6THCurc+769A/IHAS9M0EDNnWoUGFSxe0JuEHdYVuGj30RRfzSaciKkNxsxUZ
 UGvDnQ+zdRoj6bTVi4Zf8SeZUTm/04lWMoIF05uhZFDiwxidbMowoNsk9FeKria/
 4vXybfj/IhRwbiAhOUqyDjGuoLj8iVeOAyzin4FnDvBwdshIkSsB+4y1sX1aQv02
 HQbP6WXkiYoYNkw5i9E9ZChioxkzMrn2za3GxWhkTBMJArDw6xSuHMdQsgwWWoqU
 fCKjwe+D96lHq5cKt3DmGTvGxQtx9ckSJGK5r+US5y1udzotjOKc1jqMkMvS3Jyg
 ureTj0wvLYSx+/UirVAZ4IDviDMBVEar79VS2xi+SYBMLeQPy3I=
 =P89S
 -----END PGP SIGNATURE-----

Merge tag 'efi-next-2022-09-14' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request for efi next

UEFI:

Implement a command eficonfig to maintain Load Options and boot order via
menus.
2022-09-14 12:31:44 -04:00
Masahisa Kojima
87d791423a eficonfig: menu-driven addition of UEFI boot option
This commit add the "eficonfig" command.
The "eficonfig" command implements the menu-driven UEFI boot option
maintenance feature. This commit implements the addition of
new boot option. User can select the block device volume having
efi_simple_file_system_protocol and select the file corresponding
to the Boot#### variable. User can also enter the description and
optional_data of the BOOT#### variable in utf8.

This commit adds "include/efi_config.h", it contains the common
definition to be used from other menus such as UEFI Secure Boot
key management.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2022-09-14 08:43:31 +02:00
Stefan Roese
1f865ee0ba cyclic: Add 'cyclic list' and 'cyclic demo' commands
This patch adds the cyclic command, which currently only supports the
'list' subcommand, to list all currently registered cyclic functions.
Here an example:

=> cyclic list
function: cyclic_demo, cpu-time: 7010 us, frequency: 99.80 times/s
function: cyclic_demo2, cpu-time: 1 us, frequency: 1.13 times/s

As you can see, the cpu-time is accounted, so that cyclic functions
that take too long might be discovered. Additionally the frequency is
logged.

The 'cyclic demo' commands registers the cyclic_demo() function to
be executed all 'cycletime_ms' milliseconds. The only thing this
function does is delaying by 'delay_us' microseconds.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-13 16:01:44 -04:00
Heinrich Schuchardt
651031ef7c cmd: correct short text for tftpboot
The command's name is a misnomer.
The command loads a file but does not run (boot) it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-09 16:07:54 +02:00