Message ID | 1889937.G0aEoS4ujg@neptun.jupiter.dom |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | [U-Boot] BugFix: PXE Boot fails on old arm kernel with initrd without FDT | expand |
On Mon, Oct 30, 2017 at 02:37:17PM +0100, Sven Glodowski wrote: > Hello, > > PXE/Extlinux boot fails on old Kernel which requires initrd but doesn't have FDT! > > sysboot loads initrd loaded into RAM, but system boots without initrd and hangs. > > Kernel: > Linux odroid 3.8.13.30 #1 SMP PREEMPT Wed Feb 1 20:17:12 CET 2017 armv7l armv7l armv7l GNU/Linux > > Looking into [master]u-boot/cmd/pxe.c, > function label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) > > Number of boot parameter initializing with 2 > 622: int bootm_argc = 2; > > Before calling boot_m / boot_z, > number of boot parameters updated only if FTD is used! > > 783 if (!bootm_argv[3]) > 784 bootm_argv[3] = getenv("fdt_addr"); > 785 > 786 if (bootm_argv[3]) { > 787 if (!bootm_argv[2]) > 788 bootm_argv[2] = "-"; > 789 bootm_argc = 4; > > Applying this patch, Number of boot parameters set to 3 if initrd loaded before. > This looks like a reasonable bugfix, thanks. But first, you forgot your Signed-off-by line. And second, can you please condense your commit message a bit? Thanks!
--- a/u-boot/cmd/pxe.c.orig 2017-10-30 11:53:20.470526920 +0100 +++ b/u-boot/cmd/pxe.c 2017-10-30 11:56:43.526036397 +0100 @@ -780,6 +780,9 @@ static int label_boot(cmd_tbl_t *cmdtp, } } + if (bootm_argv[2]) + bootm_argc = 3; + if (!bootm_argv[3]) bootm_argv[3] = env_get("fdt_addr");