[PATCH v2 69/71] bootstd: Add a little more logging of bootflows

2023-01-07 Thread Simon Glass
Add some logging to aid debugging of problems with bootflows. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 1 + boot/bootflow.c | 4 2 files changed, 5 insertions(+) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index

[PATCH v2 65/71] bootstd: Switch bootdev scanning to use labels

2023-01-07 Thread Simon Glass
At present we set up the bootdev order at the start, then scan the bootdevs one by one. However this approach cannot be used with hunters, since the bootdevs may not exist until the hunter is used. Nor can we just run all the hunters at the start, since that violate's U-Boot's 'lazy init'

[PATCH v2 45/71] bootstd: Rename bootdev checkers

2023-01-07 Thread Simon Glass
These functions return 0 if the check passes, so the names are somewhat confusing. Rename them. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootflow.c | 6 +++--- boot/bootmeth_distro.c | 2 +- boot/bootmeth_efi.c | 2 +- boot/bootmeth_efi_mgr.c | 2 +-

[PATCH v2 70/71] bootstd: Update documentation for new features

2023-01-07 Thread Simon Glass
Document the hunters and the new way that iteration works. Signed-off-by: Simon Glass --- (no changes since v1) doc/develop/bootstd.rst | 219 +- doc/develop/driver-model/nvme.rst | 2 +- doc/usage/cmd/bootdev.rst | 48 ++-

[PATCH v2 64/71] bootstd: Add a hunter for the extension feature

2023-01-07 Thread Simon Glass
This needs to run before any bootdev is used, so add a hunter for it. Signed-off-by: Simon Glass --- (no changes since v1) cmd/extension_board.c | 25 + test/boot/bootdev.c| 37 +++-- test/boot/bootflow.c | 20

[PATCH v2 71/71] rockchip: Convert rockpro64-rk3399 to use standard boot

2023-01-07 Thread Simon Glass
Drop the use of scripts and rely on standard boot for all operation. Signed-off-by: Simon Glass --- Changes in v2: - Rebase to -next include/configs/rk3399_common.h | 5 + include/configs/rockchip-common.h | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH v2 56/71] bootstd: Treat DHCP and PXE as bootdev labels

2023-01-07 Thread Simon Glass
These are associated with the ethernet boot device but do not match its uclass name, so handle them as special cases. Provide a way to pass flags through with the bootdev so that we know how to process it. The flags are checked by the bootmeths, to ensure that only the selected bootmeth is used.

[PATCH v2 53/71] sandbox: Allow SPI flash bootdevs to be disabled for tests

2023-01-07 Thread Simon Glass
Most tests don't want these and they can create a lot of noise. Add a way to disable them. Use that in tests, with a flag provided to enable them for tests that need this feature. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/state.c | 14 ++

[PATCH v2 60/71] bootstd: Allow hunting for a bootdev by label

2023-01-07 Thread Simon Glass
Add a function to hunt for a bootdev label and find the bootdev produced by the hunter (or already present). Add a few extra flags so that we can distinguish between "mmc1", "mmc" and "1" which all need to be handled differently. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 44/71] ata: Don't try to use non-existent ports

2023-01-07 Thread Simon Glass
The controller indicates the number of ports but also has a port map which specifies which ports are actually valid. Make use of this to avoid trying to send commands to an invalid port. This avoids a crash on some controllers. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 37/71] bootstd: Add an IDE bootdev

2023-01-07 Thread Simon Glass
Add a bootdev for IDE so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) configs/sandbox_flattree_defconfig | 8 ++ drivers/block/ide.c| 44 ++ test/boot/bootdev.c| 16

[PATCH v2 54/71] bootstd: Add a SPI flash bootdev

2023-01-07 Thread Simon Glass
Add a bootdev for SPI flash so that these devices can be used with standard boot. It only supports loading a script. Add a special case for the label, since we want to use "spi", not "spi_flash". Enable the new bootdev on sandbox. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 12/71] dm: part: Update test to use mmc2

2023-01-07 Thread Simon Glass
At present this test sets up a partition table on mmc1. But this is used by the bootstd tests, so it is not possible to run those after this test has run, without restarting the Python test harness. This is inconvenient when running tests repeatedly with 'ut dm'. Move the test to use mmc2, which

[PATCH v2 33/71] bootstd: Only scan bootable partitions

2023-01-07 Thread Simon Glass
At present all partitions are scanned, whether marked bootable or not. Use only bootable partitions, defaulting to partition 1 if none is found. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 10 +- include/bootflow.h| 2 ++ test/boot/bootdev.c |

[PATCH v2 38/71] bootstd: Add an NVMe bootdev

2023-01-07 Thread Simon Glass
Add a bootdev for NVMe so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/nvme/nvme-uclass.c | 54 ++ drivers/nvme/nvme.c| 5 test/boot/bootdev.c| 15 ++- 3 files

[PATCH v2 47/71] bootstd: Include the device tree in the bootflow

2023-01-07 Thread Simon Glass
Some bootmeths provide a way to load a device tree as well as the base OS image. Add a way to store this in the bootflow. Update the 'bootflow info' command to show this information. Note that the device tree is not allocated, but instead is stored at an address provided by an environment

[PATCH v2 52/71] bootstd: Add a new bootmeth method to set the bootflow

2023-01-07 Thread Simon Glass
Normally the bootmeth driver reads the bootflow from the bootdev, since it knows the correct way to do it. However it is easier for some bootdevs to handle this themselves. For example, reading from SPI flash is quite different from other devices. Add a way for the bootdev to pass a bootflow to

[PATCH v2 50/71] bootstd: Update docs on bootmeth_try_file() for sandbox

2023-01-07 Thread Simon Glass
Mention that this function is also used with a NULL block devices to access files on the host, when using sandbox. Update the comment on struct bootflow also. Signed-off-by: Simon Glass --- (no changes since v1) include/bootflow.h | 2 +- include/bootmeth.h | 2 +- 2 files changed, 2

[PATCH v2 66/71] bootstd: Allow scanning a single bootdev label

2023-01-07 Thread Simon Glass
We want to support scanning a single label, like 'mmc' or 'usb0'. Add this feature by plumbing the label through to the iterator, setting a flag to indicate that only siblings of the initial device should be used. This means that scanning a bootdev by its name is not supported anymore. That

[PATCH v2 57/71] bootstd: Use hunters when scanning for bootflows

2023-01-07 Thread Simon Glass
Add a flag to control whether hunters are used when scanning for bootflows. Enable it by default and tidy up the flag comments a little. Fow now this has no effect, until a future patch enables this feature. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bootflow.c | 5 -

[PATCH v2 36/71] bootstd: Add a SCSI bootdev

2023-01-07 Thread Simon Glass
Add a bootdev for SCSI so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/scsi/Makefile | 7 + drivers/scsi/scsi.c | 7 - drivers/scsi/scsi_bootdev.c | 62 +

[PATCH v2 68/71] bootstd: Record the bootdevs used during scanning

2023-01-07 Thread Simon Glass
Add a way to record the bootdevs used when scanning for bootflows. This is useful for testing. Enable this only with BOOTSTD_FULL and do the same for the progress reporting. Re-enable and update the affected tests now that we have this feature. For bootdev_test_order_default() there is

[PATCH v2 61/71] bootstd: Allow iterating to the next label in a list

2023-01-07 Thread Simon Glass
Add a function which moves to the next label in a list of labels. This allows processing the boot_targets environment variable. This works using a new label list in the bootflow iterator. The logic to set this up is included in a subsequent commit. Signed-off-by: Simon Glass --- (no changes

[PATCH v2 32/71] part: Add a function to find the first bootable partition

2023-01-07 Thread Simon Glass
If a disk has a bootable partition we are expected to use it to locate the boot files. Add a function to find it. To test this, update mmc1 to have two paritions, fixing up other tests accordingly. Signed-off-by: Simon Glass --- (no changes since v1) disk/part.c | 16

[PATCH v2 51/71] bootstd: Move label parsing into its own function

2023-01-07 Thread Simon Glass
This is complicated enough to merit its own function, particularly as we are about to add to it. Create a new label_to_uclass() function to decode a label. Also update the code to ignore an empty label or one consisting of just a number. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 31/71] bootstd: Add a hunter for ethernet

2023-01-07 Thread Simon Glass
Sometimes ethernet devices are attached to PCI. Since it is quick to scan, add this into the ethernet hunter. Run dhcp to establish the network connection. Drop this from the bootdev since that is not needed now. Update a log message for clarity. Signed-off-by: Simon Glass --- (no changes

[PATCH v2 63/71] extension: Refactor to allow non-command usage

2023-01-07 Thread Simon Glass
The current extension code is designed to be used from commands. We want to add a boot driver which uses it. To help with this, split the code into the command processing and a function which actually does the scan. Really the extension code should be in common/ or use driver model, but this is a

[PATCH v2 58/71] bootstd: Allow hunting for bootdevs of a given priority

2023-01-07 Thread Simon Glass
Add a way to run the hunter function for a particular priority, so that new bootdevs can be found. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 25 + include/bootdev.h | 11 +++ test/boot/bootdev.c | 25

[PATCH v2 43/71] bootstd: Add a virtio bootdev

2023-01-07 Thread Simon Glass
Add a bootdev for virtio so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio-uclass.c | 50 ++ test/boot/bootdev.c| 12 2 files changed, 57 insertions(+), 5

[PATCH v2 35/71] scsi: Remove all children of SCSI devices before rescanning

2023-01-07 Thread Simon Glass
At present this only unbinds block devices of a certain type. But SCSI device can have different types of children, including bootdevs. Unbind all children so tht everything is clean and ready for a new scan. Signed-off-by: Simon Glass --- (no changes since v1) drivers/scsi/scsi.c | 15

[PATCH v2 42/71] virtio: Add a block device

2023-01-07 Thread Simon Glass
The test code for virtio is fairly simplistic and does not actually create a block device. Add a way to specify the device type in the device tree. Add a block device so that we can do more testing. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/test.dts | 6

[PATCH v2 59/71] bootstd: Add a new pre-scan priority for bootdevs

2023-01-07 Thread Simon Glass
We need extensions to be set up before we start trying to boot any of the bootdevs. Add a new priority before all the others for tht sort of thing. Also add a 'none' option, so that the first one is not 0. While we are here, comment enum bootdev_prio_t fully and expand the test for the 'bootdev

[PATCH v2 49/71] bootstd: Set the distro_bootpart env var with scripts

2023-01-07 Thread Simon Glass
This environment variable is supposed to be set so that the script knows which partition holds the script. Set it before invoking the script. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootmeth_script.c | 3 +++ include/bootflow.h | 3 +++ 2 files changed, 6 insertions(+)

[PATCH v2 41/71] virtio: Avoid strange behaviour on removal

2023-01-07 Thread Simon Glass
This device does a check on removal which is better handled in the actual test. Move it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio_sandbox.c | 13 - test/dm/virtio_device.c | 3 +++ 2 files changed, 3 insertions(+), 13 deletions(-) diff

[PATCH v2 48/71] bootstd: Support reading the device tree with EFI

2023-01-07 Thread Simon Glass
With EFI booting the device tree is required but is not actually specified in any way. The normal method is to use a fdtfile environment variable to get the filename, then look for that file on the media. Implement this in the bootmeth. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 55/71] bootstd: Support reading a script from network or SPI flash

2023-01-07 Thread Simon Glass
At present this bootmeth only supports a block device and the sandbox host filesystem. Add support for obtaining the script from a network device. Also implement the set_bootflow() method so that it is easy for other bootdevs (such as enabling SPI flash to support scripts). Signed-off-by: Simon

[PATCH v2 46/71] bootstd: Allow reading an EFI file from the network

2023-01-07 Thread Simon Glass
At present this bootmeth only supports reading from a filesystem. Add support for reading from a network also, using DHCP with autoload. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootmeth_efi.c | 117 +--- 1 file changed, 109

[PATCH v2 67/71] bootstd: Drop the old bootflow_scan_first()

2023-01-07 Thread Simon Glass
This function is not used outside tests. Drop it and rename bootflow_scan_dev() since it is how we start a scan now. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootflow.c | 18 +++--- cmd/bootflow.c | 2 +- include/bootflow.h | 23

[PATCH v2 34/71] scsi: Correct allocation of block-device name

2023-01-07 Thread Simon Glass
This should be allocated so that it does not go out of scope. Fix this and set the log category while we are here. Signed-off-by: Simon Glass --- (no changes since v1) drivers/scsi/scsi.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi.c

[PATCH v2 39/71] virtio: Avoid repeating a long expression

2023-01-07 Thread Simon Glass
Use a local variable to hold this name, to reduce the amount of code that needs to be read. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio-uclass.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/virtio/virtio-uclass.c

[PATCH v2 04/71] lib: Add a function to split a string into substrings

2023-01-07 Thread Simon Glass
Some environment variables provide a space-separated list of strings. It is easier to process these when they are broken out into an array of strings. Add a utility function to handle this. Signed-off-by: Simon Glass --- (no changes since v1) include/vsprintf.h | 24 ++

[PATCH v2 40/71] virtio: Fix returning -ENODEV

2023-01-07 Thread Simon Glass
This has a special meaning in driver model. There is clearly a device, so it does not make sense to return this error code. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 30/71] net: Add a function to run dhcp

2023-01-07 Thread Simon Glass
At present this must be done by executing the command. Also it involves fiddling with the environment to determine the correct autoload behaviour. Ideally it should be possible to run network operations without even having the command line present (CONFIG_CMDLINE). For now, add a function to

[PATCH v2 28/71] bootstd: Add a USB hunter

2023-01-07 Thread Simon Glass
Add a hunter for USB which enumerates the bus to find new bootdevs. Update the tests and speed up bootdev_test_prio() while we are here, by dropping the USB delays. Signed-off-by: Simon Glass --- (no changes since v1) drivers/usb/host/usb_bootdev.c | 12 test/boot/bootdev.c

[PATCH v2 24/71] bootstd: Support running bootdev hunters

2023-01-07 Thread Simon Glass
Add a way to run a bootdev hunter to find bootdevs of a certain type. Add this to the 'bootdev hunt' command. Test for this are added in a later patch, since a useful test needs some hunters to work with. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 61

[PATCH v2 29/71] bootstd: Add an MMC hunter

2023-01-07 Thread Simon Glass
Add a hunter for MMC. This doesn't do anything at present, since MMC is currently set up when U-Boot starts. If MMC moves to lazy init then we can add a hunter function. Signed-off-by: Simon Glass --- (no changes since v1) drivers/mmc/mmc_bootdev.c | 6 ++ test/boot/bootdev.c | 16

[PATCH v2 27/71] test: Add a generic function to skip delays

2023-01-07 Thread Simon Glass
At present this feature is sandbox-specific. For running tests on boards, we need a nop version. Add one. Signed-off-by: Simon Glass --- (no changes since v1) include/test/test.h | 16 1 file changed, 16 insertions(+) diff --git a/include/test/test.h b/include/test/test.h

[PATCH v2 25/71] dm: usb: Drop some dead code

2023-01-07 Thread Simon Glass
Since DM_USB migration is complete this code is not used any more. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/usb/host/usb-uclass.c | 43 --- 1 file changed, 43 deletions(-) diff --git a/drivers/usb/host/usb-uclass.c

[PATCH v2 22/71] efi: Improve logging in efi_disk

2023-01-07 Thread Simon Glass
When this fails it can be time-consuming to debug. Add some debugging to help with this. Also try to return error codes instead of just using -1. Signed-off-by: Simon Glass --- (no changes since v1) lib/efi_loader/efi_disk.c | 30 +- 1 file changed, 21

[PATCH v2 26/71] dm: usb: Mark the device name as alloced when binding

2023-01-07 Thread Simon Glass
Since usb_find_and_bind_driver() allocates the device name it should tell driver about that, to avoid memory leaks. Fix this. Signed-off-by: Simon Glass --- (no changes since v1) drivers/usb/host/usb-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/usb-uclass.c

[PATCH v2 23/71] bootstd: Add the concept of a bootdev hunter

2023-01-07 Thread Simon Glass
Some bootdevs must be enumerated before they appear. For example, USB bootdevs are not visible until USB is enumerated. With standard boot this needs to happen automatically, since we only want to enumerate a bus if it is needed. Add a way to define bootdev 'hunters' which can be used to hunt

[PATCH v2 20/71] lib: Support printing an error string

2023-01-07 Thread Simon Glass
It is often useful to show an error code to give the user a clue as to what went wrong. When error strings are compiled into U-Boot it is possible to show a message as well. But at present it is not very convenient, since code must check if the error strings are present, then obtain the error

[PATCH v2 21/71] event: Correct duplicate log message in event_notify()

2023-01-07 Thread Simon Glass
Use a different one for each call. Signed-off-by: Simon Glass --- (no changes since v1) common/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/event.c b/common/event.c index 231b9e6ffdd..c312556490e 100644 --- a/common/event.c +++ b/common/event.c @@ -123,7

[PATCH v2 19/71] sandbox: Enable the Ethernet bootdev

2023-01-07 Thread Simon Glass
This bootdev is disabled at present since it messes with the tests. Now that there is a way to disable networking at runtime, enable the driver. This allows running tests with it if necessary. Signed-off-by: Simon Glass --- (no changes since v1) configs/sandbox_defconfig | 1 -

[PATCH v2 18/71] sandbox: Allow ethernet bootdevs to be disabled for tests

2023-01-07 Thread Simon Glass
Most tests don't want these and can create a lot of noise. Add a way to disable them. Use that in tests, with a flag provided to enable them for tests that need this feature. Signed-off-by: Simon Glass --- (no changes since v1) include/net.h | 16 include/test/test.h |

[PATCH v2 16/71] bootstd: Add a default method to get bootflows

2023-01-07 Thread Simon Glass
The code in these functions turns out to often be the same. Add a default get_bootflow() function and allow the drivers to select it by setting the method to NULL. This saves a little code space. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 27

[PATCH v2 17/71] sandbox: Allow ethernet to be disabled at runtime

2023-01-07 Thread Simon Glass
For bootstd tests it is seldom useful to have ethernet enabled. Add a way to disable it, so that ethernet operations like tftpboot do nothing. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/state.c | 16 arch/sandbox/include/asm/state.h | 1 +

[PATCH v2 14/71] ide: Drop non-DM code for BLK

2023-01-07 Thread Simon Glass
We require CONFIG_BLK to be enabled now, so this code is unused. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/block/ide.c | 42 +- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/drivers/block/ide.c

[PATCH v2 15/71] dm: mmc: Use bootdev_setup_sibling_blk()

2023-01-07 Thread Simon Glass
At present MMC uses the bootdev_setup_for_dev() function to set up the bootdev. This is because MMC only has one block-device child, so does not need to worry about naming of the bootdev. However this inconsistency with other bootdevs that use block devices is a bit annoying. The only real reason

[PATCH v2 11/71] vbe: sandbox: Drop VBE node in chosen

2023-01-07 Thread Simon Glass
This is not needed anymore since VBE creates the node when it sets up the OS requests. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/sandbox.dtsi | 13 - 1 file changed, 13 deletions(-) diff --git a/arch/sandbox/dts/sandbox.dtsi

[PATCH v2 13/71] dm: test: Correct ordering of DM setup

2023-01-07 Thread Simon Glass
We must call dm_scan_other() after devices from the device tree have been created, since that function behaves differently if there is no bootstd device. Adjust the logic to achieve this. Also fix the bootflow_system() test which was relying on this broken behaviour. Signed-off-by: Simon Glass

[PATCH v2 09/71] sandbox: mmc: Start off with a zeroed file

2023-01-07 Thread Simon Glass
When running multiple tests the mmc emulator calls malloc() to obtain the memory for its disk image. Since the memory is not cleared, it is possible that it happens to contain a partition table. The dm_test_part() test (for one) relies on mmc0 being empty on startup. Zero the memory to ensure

[PATCH v2 08/71] test: Drop duplicate restore of DM state

2023-01-07 Thread Simon Glass
This code is present twice. Fix it so that it is only executed once. Signed-off-by: Simon Glass --- (no changes since v1) test/test-main.c | 4 1 file changed, 4 deletions(-) diff --git a/test/test-main.c b/test/test-main.c index 5931e94a915..9ab090b7b33 100644 --- a/test/test-main.c

[PATCH v2 10/71] vbe: Avoid a build failure when bloblist is not enabled

2023-01-07 Thread Simon Glass
This needs to be able to work (at least partially) without the bloblist active. Add a condition for this. Signed-off-by: Simon Glass --- (no changes since v1) cmd/vbe.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/vbe.c b/cmd/vbe.c index

[PATCH v2 07/71] test: Fix the help for the ut command

2023-01-07 Thread Simon Glass
The font help has an incorrect newline. Fix it. Signed-off-by: Simon Glass Fixes: cdd964e3801 ("test: Tidy up help for ut command") --- (no changes since v1) test/cmd_ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cmd_ut.c b/test/cmd_ut.c index

[PATCH v2 06/71] bootstd: Simplify locating existing bootdevs

2023-01-07 Thread Simon Glass
There is no point in trying to match the alias order for bootdevs, since build_order() either sorts them by priority, uses the boot_targets environment variable or the bootdev-order property. Just use the iterator instead, to simplify the code. Signed-off-by: Simon Glass --- (no changes since

[PATCH v2 05/71] bootstd: Remove special-case code for boot_targets

2023-01-07 Thread Simon Glass
Rather than implement this as its own case in build_order(), process the boot_targets environment variable in the bootstd_get_bootdev_order() function. This allows build_order() to be simplified. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 32

[PATCH v2 03/71] dm: test: Correct assertion in dm_test_part()

2023-01-07 Thread Simon Glass
This obscures the line number. Update the test to avoid make sure that the line which failed is displayed, so it is possible to diagnose the failure. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/part.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff

[PATCH v2 02/71] dm: core: Support sorting devices with dm tree

2023-01-07 Thread Simon Glass
Add a -s flag to sort the top-level devices in order of uclass ID. Signed-off-by: Simon Glass --- (no changes since v1) cmd/dm.c | 10 +-- doc/usage/cmd/dm.rst | 5 +++- drivers/core/dump.c | 65 include/dm/util.h|

[PATCH v2 00/71] bootstd: Allow migration from distro_bootcmd scripts

2023-01-07 Thread Simon Glass
So far, standard boot does not replicate all the of the functionality of the distro_bootcmd scripts. In particular it lacks some bootdevs and some of the bootmeths are incomplete. Also there is currently no internal mechanism to enumerate buses in order to discover bootdevs, e.g. with USB. This

[PATCH v2 01/71] dm: core: Correct ordering of uclasses IDs

2023-01-07 Thread Simon Glass
A few of these are out of order. Fix them. Signed-off-by: Simon Glass --- (no changes since v1) include/dm/uclass-id.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 376f741cc2b..33e43c20db6 100644 ---

Re: [PATCH v2 03/14] tpm: Add a proper Kconfig option for crc8 in SPL

2023-01-07 Thread Simon Glass
On Sat, 7 Jan 2023 at 14:57, Simon Glass wrote: > > The current approach is a bit of a hack and only works for the tpm > subsystem. Add a Kconfig so that crc8 can be enabled in SPL for other > purposes. > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Add an SPL dependency in the

Re: [PATCH 01/14] trace: Use notrace for short

2023-01-07 Thread Simon Glass
The attribute syntax is quite verbose. Use the macro provided for this purpose. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/s5p-common/timer.c | 2 +- arch/arm/mach-exynos/include/mach/cpu.h | 6 +++--- arch/x86/include/asm/global_data.h | 2 +- arch/x86/include/asm/msr.h

Re: [PATCH 02/14] arm: Support trace on armv8

2023-01-07 Thread Simon Glass
Use the notrace attribute so that timer functions can be used when tracing. This is required to avoid infinite loops when recording a trace. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/generic_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Applied to u-boot-dm/next,

Re: [PATCH 08/14] trace: Move trace pointer to data section

2023-01-07 Thread Simon Glass
This can be written before relocation. Move it to the data section, since accessing BSS before relocation is not permitted. Signed-off-by: Simon Glass --- lib/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH 10/14] trace: Adjust flags in proftool

2023-01-07 Thread Simon Glass
The flags in this tool don't match the comments or help. Also the variable names are quite confusing. Update them for consistency. Signed-off-by: Simon Glass --- tools/proftool.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) Applied to u-boot-dm/next,

Re: [PATCH 09/14] mkimage: Add a few more messages for FIT failures

2023-01-07 Thread Simon Glass
Add messages to make it clearer which part of the FIT creation is failing. This can happen when an invalid 'algo' property is provided in the .its file. Signed-off-by: Simon Glass --- tools/fit_image.c | 4 +++- tools/image-host.c | 6 +- 2 files changed, 8 insertions(+), 2 deletions(-)

Re: [PATCH 14/14] Revert "fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ"

2023-01-07 Thread Simon Glass
The fdt_path_offset() function is slow since it must scan the tree. This substantial overhead now applies to all boards. The original code may not be ideal but it is fit for purpose and is only needed on a few boards. Reverting this reduces time to set up driver model by about 30ms. Before

Re: [PATCH 11/14] trace: Update trace-format generator for newer version

2023-01-07 Thread Simon Glass
This now includes flags and the layout has changed slightly in recent versions of Linux. Update the generator accordingly. Signed-off-by: Simon Glass --- tools/proftool.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH 1/1] doc: building documentation

2023-01-07 Thread Simon Glass
Hi Heinrich, On Sat, 7 Jan 2023 at 17:11, Heinrich Schuchardt wrote: > > > > On 1/7/23 23:54, Simon Glass wrote: > > Hi Heinrich, > > > > On Sat, 7 Jan 2023 at 15:16, Heinrich Schuchardt > > wrote: > >> > >> > >> > >> On 1/7/23 19:55, Simon Glass wrote: > >>> Hi Heinrich, > >>> > >>> On Fri, 30

Re: [u-boot][master][PATCH 1/3] pico-imx7d: add support for 2GB memory SoMs

2023-01-07 Thread Szőke Kálmán Benjamin
My last three patches were tested in my company's custom i.MX7D pico SoMs carrier board, it was workd well with 512MB and 1 GB SoM variants in U-boot v2022.10. I have no any 2GB variants but i can trust in Technexion that it was tested in their house, bedore.But it can be better if you take

Re: [PATCH 1/1] doc: building documentation

2023-01-07 Thread Heinrich Schuchardt
On 1/7/23 23:54, Simon Glass wrote: Hi Heinrich, On Sat, 7 Jan 2023 at 15:16, Heinrich Schuchardt wrote: On 1/7/23 19:55, Simon Glass wrote: Hi Heinrich, On Fri, 30 Dec 2022 at 12:08, Heinrich Schuchardt wrote: On 12/30/22 20:02, Simon Glass wrote: Hi, On Fri, 30 Dec 2022 at

[PATCH] efi_loader: fix description of memory functions

2023-01-07 Thread Heinrich Schuchardt
* Add missing function descriptions * Adjust to Sphinx style Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_memory.c | 82 - 1 file changed, 62 insertions(+), 20 deletions(-) diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c

[PATCH 1/1] doc: fix description of u16_strcasecmp()

2023-01-07 Thread Heinrich Schuchardt
Remove non-existent parameter 'n' from function description. Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()") Signed-off-by: Heinrich Schuchardt --- include/charset.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/charset.h b/include/charset.h index 6e79d7152e..44034c71d3

[PATCH] pylibfdt: Allow version normalization to fail

2023-01-07 Thread Tom Rini
In some cases, we might not have the sic portion of setuputils available. Make our import and use of this be done in try/except blocks as this is done to suppress a run-time warning that is otherwise non-fatal. Reported-by: Pali Rohár Fixes: 141659187667 ("pylibfdt: Fix disable version

Re: [PATCH] board: sifive: unmatched: enable booting on a second NVME device

2023-01-07 Thread Heinrich Schuchardt
On 1/7/23 23:32, Aurelien Jarno wrote: The HiFive Unmatched board has a M2 slot for NVME and a PCIe slot that can also be used for NVME. Enable support for a second NVME device, so that software RAID-1 configurations can be supported at the u-boot level. Signed-off-by: Aurelien Jarno ---

Re: Pull request efi-2023-01-rc5-4

2023-01-07 Thread Tom Rini
On Fri, Jan 06, 2023 at 11:48:43PM +0100, Heinrich Schuchardt wrote: > The following changes since commit 9ddcdcc03cc6f0f46895604c589af17fdbdfe8b7: > > Merge tag 'u-boot-stm32-20230106' of > https://gitlab.denx.de/u-boot/custodians/u-boot-stm (2023-01-06 08:16:15 > -0500) > > are available in

Re: [PATCH v3 03/25] bootmenu: Add a few comments

2023-01-07 Thread Simon Glass
Hi Heinrich, On Sat, 7 Jan 2023 at 15:35, Heinrich Schuchardt wrote: > > On 1/7/23 01:13, Simon Glass wrote: > > Hi Heinrich, > > > > On Fri, 6 Jan 2023 at 09:53, Heinrich Schuchardt wrote: > >> > >> On 1/6/23 15:52, Simon Glass wrote: > >>> The behaviour of these two functions is completely

Re: [PATCH 1/1] doc: building documentation

2023-01-07 Thread Simon Glass
Hi Heinrich, On Sat, 7 Jan 2023 at 15:16, Heinrich Schuchardt wrote: > > > > On 1/7/23 19:55, Simon Glass wrote: > > Hi Heinrich, > > > > On Fri, 30 Dec 2022 at 12:08, Heinrich Schuchardt > > wrote: > >> > >> > >> > >> On 12/30/22 20:02, Simon Glass wrote: > >>> Hi, > >>> > >>> On Fri, 30 Dec

Re: [PATCH v4 7/9] video: Use VIDEO_DAMAGE for VIDEO_COPY

2023-01-07 Thread Heinrich Schuchardt
On 1/7/23 01:13, Simon Glass wrote: Hi Alexander, On Tue, 3 Jan 2023 at 14:50, Alexander Graf wrote: CONFIG_VIDEO_COPY implemented a range based copying mechanism: If we range-based print a single character, it will always copy the full range of bytes from the top left corner of the

Re: [PATCH v3 03/25] bootmenu: Add a few comments

2023-01-07 Thread Heinrich Schuchardt
On 1/7/23 01:13, Simon Glass wrote: Hi Heinrich, On Fri, 6 Jan 2023 at 09:53, Heinrich Schuchardt wrote: On 1/6/23 15:52, Simon Glass wrote: The behaviour of these two functions is completely undocumented. Add some notes so the poor, suffering dev can figure out what is going on.

[PATCH] board: sifive: unmatched: enable booting on a second NVME device

2023-01-07 Thread Aurelien Jarno
The HiFive Unmatched board has a M2 slot for NVME and a PCIe slot that can also be used for NVME. Enable support for a second NVME device, so that software RAID-1 configurations can be supported at the u-boot level. Signed-off-by: Aurelien Jarno --- include/configs/sifive-unmatched.h | 1 + 1

Re: [PATCH v3 02/25] cli: Move readline character-processing to a state machine

2023-01-07 Thread Heinrich Schuchardt
On 1/7/23 01:13, Simon Glass wrote: Hi Heinrich, On Fri, 6 Jan 2023 at 08:50, Heinrich Schuchardt wrote: On 1/6/23 15:52, Simon Glass wrote: The current cread_line() function is very long. It handles the escape processing inline. The menu command does similar processing but at the character

Re: [PATCH 1/1] doc: building documentation

2023-01-07 Thread Heinrich Schuchardt
On 1/7/23 19:55, Simon Glass wrote: Hi Heinrich, On Fri, 30 Dec 2022 at 12:08, Heinrich Schuchardt wrote: On 12/30/22 20:02, Simon Glass wrote: Hi, On Fri, 30 Dec 2022 at 12:31, Heinrich Schuchardt wrote: On 12/30/22 19:12, Tom Rini wrote: On Fri, Dec 30, 2022 at 11:51:15AM

Re: [PATCH v8 06/13] binman: Support new op-tee binary format

2023-01-07 Thread Jerome Forissier
On 1/7/23 19:55, Simon Glass wrote: > Hi Jerome, > > On Thu, 22 Dec 2022 at 15:20, Jerome Forissier > wrote: >> >> >> >> On 12/22/22 21:23, Simon Glass wrote: >>> (dropping the two bounces from cc) >>> >>> On Thu, 22 Dec 2022 at 13:18, Simon Glass wrote: Hi Jerome, On

Re: [PATCH] Revert "common/memsize.c: Fix get_effective_memsize() to check for overflow"

2023-01-07 Thread Pali Rohár
On Saturday 07 January 2023 12:46:07 Tom Rini wrote: > On Sat, Jan 07, 2023 at 06:44:40PM +0100, Pali Rohár wrote: > > On Saturday 07 January 2023 12:40:00 Tom Rini wrote: > > > On Sat, Jan 07, 2023 at 06:38:58PM +0100, Pali Rohár wrote: > > > > On Saturday 07 January 2023 12:32:12 Tom Rini wrote:

[PATCH v2 13/14] rockchip: Enable bootstage on rockpro64

2023-01-07 Thread Simon Glass
This board is useful for benchmarking overall U-Boot performance. Enable the bootstage feature so we get a report. Since this returns to the boot rom before finishing executing board_init_r() in SPL, add a few bootstage calls so that we can collect timing from TPL. For the stash region, use a

[PATCH v2 03/14] tpm: Add a proper Kconfig option for crc8 in SPL

2023-01-07 Thread Simon Glass
The current approach is a bit of a hack and only works for the tpm subsystem. Add a Kconfig so that crc8 can be enabled in SPL for other purposes. Signed-off-by: Simon Glass --- Changes in v2: - Add an SPL dependency in the Kconfig lib/Kconfig | 18 ++ lib/Makefile | 3 ++-

[PATCH] common/memsize.c: Check for overflow in get_effective_memsize() only for mpc85xx

2023-01-07 Thread Pali Rohár
This reverts commit 777706bc ("common/memsize.c: Fix get_effective_memsize() to check for overflow") for non-mpc85xx platforms. The changes to this generic function, which is intended to help with 32bit platforms with large amounts of memory has unintended side effects (which in turn lead to

Re: [PATCH v8 06/13] binman: Support new op-tee binary format

2023-01-07 Thread Jerome Forissier
On 1/7/23 19:55, Simon Glass wrote: > Hi Quentin, > > On Mon, 2 Jan 2023 at 10:54, Quentin Schulz > wrote: >> >> Hi Simon, >> >> On 12/22/22 00:07, Simon Glass wrote: >>> OP-TEE has a format with a binary header that can be used instead of the >>> ELF file. With newer versions of OP-TEE this

  1   2   >