Skip to contentSkip to conversation

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

PATCH In review Neil Armstrong 2 participants 2 messages May 27, 2022 – Jun 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 boot: pxe_utils: Do not use fdtcontroladdr for FIT Image format

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 <[email protected]>
Cc Peter Hoyes <[email protected]>
---
 boot/pxe_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
boot/pxe_utils.c +1 -1
index b08aee9896..5eb328c86b 100644
@@ -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]) {
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Neil Armstrong

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.

Quoted 6 lines

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

Fixes d5ba6188dfbf ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
Cc Tom Rini <[email protected]>
Cc Peter Hoyes <[email protected]>

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.

Signature · 1 line
Tom