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>
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>
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>
Increase rng-seed size to make Linux happy and initialize rng pool instantly.
Linux 5.19+ requires 32 bytes of entropy to initialize random pool, but u-boot
currently provides only 8 bytes.
Linux 5.18 and probably some versions before it used to require 64 bytes.
Bump min value to 64 bytes to be on a safe side.
Boot with 8 byte rng-seed (Linux 6.11):
# dmesg | grep crng
[ 12.089286] random: crng init done
Boot with 32 byte rng-seed (Linux 6.11):
# dmesg | grep crng
[ 0.000000] random: crng init done
Linux source references:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.19#n551https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.18#n236
Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Fixes: d2048bafae ("rockchip: board: Add board_rng_seed() for all Rockchip devices")
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.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>
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>
Fixed a variable that was incorrect during the calculation of fileblks.
Signed-off-by: Ken Kurematsu <k.kurematsu@nskint.co.jp>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which
is long superseded by binman, drop SPL_FIT_SOURCE support as there
are no more users.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
This adds TCPM framework in preparation for fusb302 support, which can
handle USB power delivery messages. This is needed to solve issues with
devices, that are running from a USB-C port supporting USB-PD, but not
having a battery.
Such a device currently boots to the kernel without interacting with
the power-supply at all. If there are no USB-PD message replies within
5 seconds, the power-supply assumes the peripheral is not capable of
USB-PD. It usually takes more than 5 seconds for the system to reach
the kernel and probe the I2C based fusb302 chip driver. Thus the
system always runs into this state. The power-supply's solution to
fix this error state is a hard reset, which involves removing the
power from VBUS. Boards without a battery (or huge capacitors) will
reset at this point resulting in a boot loop.
This imports the TCPM framework from the kernel. The porting has
originally been done by Rockchip using hardware timers and the Linux
kernel's TCPM code from some years ago.
I had a look at upgrading to the latest TCPM kernel code, but that
beast became a lot more complex due to adding more USB-C features.
I believe these features are not needed in U-Boot and with multiple
kthreads and hrtimers being involved it is non-trivial to port them.
Instead I worked on stripping down features from the Rockchip port
to an even more basic level. Also the TCPM code has been reworked
to avoid complete use of any timers (Rockchip used SoC specific
hardware timers + IRQ to implement delayed work mechanism). Instead
the delayed state changes are handled directly from the poll loop.
Note, that (in contrast to the original Rockchip port) the state
machine has the same hard reset quirk, that the kernel has - i.e.
it avoids disabling the CC pin resistors for devices that are not
self-powered. Without that quirk, the Radxa Rock 5B will not just
end up doing a machine reset when a hard reset is triggered, but will
not even recover, because the CPU will loose power and the FUSB302
will keep this state because of leak voltage arriving through the RX
serial pin (assuming a serial adapter is connected).
This also includes a 'tcpm' command, which can be used to get
information about the current state and the negotiated voltage
and current.
Co-developed-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Tested-by: Soeren Moch <smoch@web.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
:hile we had hoped to be able to remove these options finally, it was
missed that zynq still requires these currently.
This reverts commit 5b9261fb0b and
commit 099b6df556.
Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
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>
The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which
is long superseded by binman, drop SPL_FIT_SOURCE support as there
are no more users.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
We have previously added logic to allow a "fallback" option to be
specified in the extlinux configuration. Provide a command that allows
us to set this as the preferred default option when booting.
Combined with the bootcount functionality, this allows the "altbootcmd"
to provide a means of falling back to a previously known good state
after a failed update. For example, if "bootcmd" is set to:
bootflow scan -lb
We would set "altbootcmd" to:
bootmeth set extlinux fallback 1; bootflow scan -lb
Causing the boot process to boot from the fallback option.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Replace CONFIG_USB_USB_GADGET by CONFIG_USB_GADGET_DOWNLOAD.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
The mmc erase command currently requires blk# and cnt parameters
which can be obtained using the part start and part size commands
if the entire partition needs to be erased.
Simplify the use of the mmc erase command by allowing the partition
name to be specified directly.
Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Currently uclass index is used for bind/unbind which ignores alias
sequence numbering. Use device sequence number instead as it's
the number explicitly set in the DT.
Also update documentation to use sequence number.
Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Currently uclass index is shown in DM tree dump which ignores alias
sequence numbering. The result could be confusing since these 2 numbers
could be different. Show device sequence number instead as it's more
meaningful.
Also update documentation to use sequence number.
Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
The UT_TESTF_ macros read as 'unit test test flags' which is not right.
Rename to UTF ('unit test flags').
This has the benefit of being shorter, which helps keep UNIT_TEST()
declarations on a single line.
Give the enum a name and reference it from the UNIT_TEST() macros while
we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
current env_set_default_vars() doesn't delete
var that are not in the imported env. hashtable
removes vars that are not in the imported
env but present in the current env only if H_NOCLEAR
flag is not set.
This change is to avoid passing H_NOCLEAR flag if
specific vars are passed to env_set_default_vars()
Without this change:
Marvell>> env default boot_mode
Marvell>>
With the change:
Marvell>> env default boot_mode
WARNING: 'boot_mode' not in imported env, deleting it!
Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Add a 'upl' command to work with Universal Payload features. For now it
only supports reading and writing a handoff structure.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add documentation for the 'cpu' command, taking NXP i.MX 8M Plus
as a example.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Before adding more files, move the bootstd docs into a new directory,
with an index.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Before 9d0750064e (doc: Move external FIT docs into the main body), the
FIT property data-size was not a mandatory property and still it is not
expected to be set alongside the data property.
Move the data-size property to the "Conditionally mandatory property"
section, where it actually belongs.
Signed-off-by: Sam Povilus <sam.povilus@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
The Examples section should be on the second heading level.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Before 9d0750064e (doc: Move external FIT docs into the main body), the
FIT property data-size was not a mandatory property and still it is not
expected to be set alongside the data property.
Move the data-size property to the "Conditionally mandatory property"
section, where it actually belongs.
Signed-off-by: Bastian Germann <bage@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Now that am335x_evm boots OK on the Beaglebone black, drop the latter
and update the docs to cover the change.
Also add a few updates about 'make fit' and drop the note about the
security review, as U-Boot's verified boot has had quite extensive
review now.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
We currently only describe the process to enable measured boot using
bootm. Describe the UEFI requirements as well which predate bootm.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fix a trivial typo in the bootmeth documentation.
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Stderr was missing from the initial description and example.
As I understand the env command documentation the subcommand style is
preferred, though the old format is still fully supported.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Reviewed-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This adds details that I would have liked to have readily available,
in particular how to activate the network interface before enabling
netconsole, and how to integrate netconsole so you can use the U-Boot
prompt.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Reviewed-by: Tony Dinh <mibodhi@gmail.com>
If 'env print -e' is invoked without variable name, all UEFI variables are
listed.
Describe that 'env print -e' requires CONFIG_HEXDUMP=y to print content of
UEFI variables.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>