[U-Boot] CMD_PXE: Ramdisk does not pass to the kernel if FDT image does not specified

Message ID 20180212171958.31384-1-vlaomao@gmail.com
State New
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot] CMD_PXE: Ramdisk does not pass to the kernel if FDT image does not specified
Related show

Commit Message

VlaoMao Feb. 12, 2018, 5:19 p.m.
From: VlaoMao <vlaomao@gmail.com>

---
 cmd/pxe.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/cmd/pxe.c b/cmd/pxe.c
index 7043ad11fd..cf12b780b1 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -783,6 +783,11 @@  static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
 	if (!bootm_argv[3])
 		bootm_argv[3] = env_get("fdt_addr");
 
+	if (bootm_argv[2]) {
+		if(!bootm_argv[3])
+		    bootm_argc = 3;
+	}
+
 	if (bootm_argv[3]) {
 		if (!bootm_argv[2])
 			bootm_argv[2] = "-";