summaryrefslogtreecommitdiff
path: root/boot/pxe_utils.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-01-06 08:14:28 -0500
committerTom Rini <trini@konsulko.com>2023-01-06 08:14:28 -0500
commitbd7fbd58b757263cec86d9915da168ce347a7e08 (patch)
tree4cd8bfce0938f9173b0b2a896ab929b336479a90 /boot/pxe_utils.c
parent8d6cbf5e6bc4e10e38b954763fa025caed517cc2 (diff)
parent5404dfcc4dbb56a9b255e08b67b46d1181565e6f (diff)
Merge branch '2023-01-06-further-regression-fixes'
- Bring in a number of important regression fixes for among others, uniphier, PXE booting, socrates, imx7d-pico, rockchip video and rzg2_beacon as well as making the python version warning fix more portable.
Diffstat (limited to 'boot/pxe_utils.c')
-rw-r--r--boot/pxe_utils.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 96528aa14c0..099aa2f4bc7 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -616,7 +616,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
* Scenario 2: If there is an fdt_addr specified, pass it along to
* bootm, and adjust argc appropriately.
*
- * Scenario 3: fdt blob is not available.
+ * Scenario 3: If there is an fdtcontroladdr specified, pass it along to
+ * bootm, and adjust argc appropriately, unless the image type is fitImage.
+ *
+ * Scenario 4: fdt blob is not available.
*/
bootm_argv[3] = env_get("fdt_addr_r");
@@ -721,14 +724,18 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
if (!bootm_argv[3])
bootm_argv[3] = env_get("fdt_addr");
+ kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
+ buf = map_sysmem(kernel_addr_r, 0);
+
+ if (!bootm_argv[3] && genimg_get_format(buf) != IMAGE_FORMAT_FIT)
+ bootm_argv[3] = env_get("fdtcontroladdr");
+
if (bootm_argv[3]) {
if (!bootm_argv[2])
bootm_argv[2] = "-";
bootm_argc = 4;
}
- kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
- buf = map_sysmem(kernel_addr_r, 0);
/* Try bootm for legacy and FIT format image */
if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID &&
IS_ENABLED(CONFIG_CMD_BOOTM))