From 43ee87aabf17e51d35a5d82848a4052e60f2c7bb Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 3 Dec 2012 13:17:21 -0600 Subject: pxe: try bootz if bootm fails to find a valid image Standard pxelinux servers will typically use a zImage rather than u-boot image format, so fallback to bootz if bootm fails. Signed-off-by: Rob Herring [tushar.behera@linaro.org: Cherry-picked to current tracking branch] Signed-off-by: Tushar Behera --- common/cmd_pxe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index 9f1c14d2d..346eb61a6 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -711,10 +711,11 @@ static int label_boot(struct pxe_label *label) if (bootm_argv[3]) bootm_argc = 4; + do_bootm(NULL, 0, bootm_argc, bootm_argv); + #ifdef CONFIG_CMD_BOOTZ + /* Try booting a zImage if do_bootm returns */ do_bootz(NULL, 0, bootm_argc, bootm_argv); -#else - do_bootm(NULL, 0, bootm_argc, bootm_argv); #endif return 1; } -- cgit v1.2.3