diff mbox series

boot: pxe_utils: Do not use fdtcontroladdr for FIT Image format

Message ID 20220527143725.131742-1-narmstrong@baylibre.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series boot: pxe_utils: Do not use fdtcontroladdr for FIT Image format | expand

Commit Message

Neil Armstrong May 27, 2022, 2:37 p.m. UTC
When patch [1] introduced "fdtcontroladdr" fallback in order to use
built-in DT when no DT in provided in PXE config, it broke FIT image
boot where the DT from the FIT configuration was used.

This disables the "fdtcontroladdr" fallback when the provided
image is from the FIT image type.

[1] d5ba6188dfbf ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")

Fixes: d5ba6188dfbf ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
Cc: Tom Rini <trini@konsulko.com>
Cc: Peter Hoyes <peter.hoyes@arm.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 boot/pxe_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini June 3, 2022, 3:15 p.m. UTC | #1
On Fri, May 27, 2022 at 04:37:25PM +0200, Neil Armstrong wrote:

> When patch [1] introduced "fdtcontroladdr" fallback in order to use
> built-in DT when no DT in provided in PXE config, it broke FIT image
> boot where the DT from the FIT configuration was used.
> 
> This disables the "fdtcontroladdr" fallback when the provided
> image is from the FIT image type.
> 
> [1] d5ba6188dfbf ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
> 
> Fixes: d5ba6188dfbf ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Peter Hoyes <peter.hoyes@arm.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

As-is, this breaks some of the VPL tests in CI:
https://source.denx.de/u-boot/u-boot/-/jobs/443412 and
https://u-boot.readthedocs.io/en/latest/develop/py_testing.html gives an
overview on how to run the pytests outside of CI and
https://u-boot.readthedocs.io/en/latest/develop/ci_testing.html is how
to get a CI run done automatically.  In this case, I think
you could even get away with running sandbox, and the test itself,
manually at the prompt.
diff mbox series

Patch

diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index b08aee9896..5eb328c86b 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -725,7 +725,7 @@  static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
 	if (!bootm_argv[3])
 		bootm_argv[3] = env_get("fdt_addr");
 
-	if (!bootm_argv[3])
+	if (genimg_get_format(buf) != IMAGE_FORMAT_FIT && !bootm_argv[3])
 		bootm_argv[3] = env_get("fdtcontroladdr");
 
 	if (bootm_argv[3]) {