From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tuomas Tynkkynen Date: Mon, 15 Oct 2018 04:01:06 +0300 Subject: [U-Boot] [PATCH 2/2] ARM: qemu-arm: define fdt_addr_r In-Reply-To: <20181012050757.6925-2-takahiro.akashi@linaro.org> References: <20181012050757.6925-1-takahiro.akashi@linaro.org> <20181012050757.6925-2-takahiro.akashi@linaro.org> Message-ID: <20181015040106.78c6f7a2@thinkpad> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Takahiro, On Fri, 12 Oct 2018 14:07:57 +0900 AKASHI Takahiro wrote: > This variable, fdt_addr_t, is missing in the current qemu-arm.h while > it seems to be mandatory, at least, to run distro_bootcmd as expected. > So just add its definition. A size of 1MB would be enough. > In what way is this required for distro_bootcmd to work? At least in the past I've tested qemu_arm64_defconfig and EFI boot with the Fedora netinst image and it has worked fine in stock U-Boot. Note that these '-machine virt' based targets are slightly different from real hardware in the sense that instead of loading a .dtb file provided by the OS, the device tree is provided by QEMU. In the hunk below you can see "fdt_addr=0x40000000\0" providing the address of the QEMU-provided device tree which the distro scripts should be using. I guess in principle having ${fdt_addr_r} set as well shouldn't hurt and might be used for testing/unusual purposes. Glancing at cmd/pxe.c, there is a problem though, in that if ${fdt_addr_r} were defined, a PXE file using the FDTDIR directive would attempt loading a dtb file named "-qemu-arm.dtb" instead of falling back to using ${fdt_addr}. That bug would need to be fixed first before applying this patch. > Signed-off-by: AKASHI Takahiro > --- > include/configs/qemu-arm.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h > index 91fb8d47edf8..0e66f946dde5 100644 > --- a/include/configs/qemu-arm.h > +++ b/include/configs/qemu-arm.h > @@ -55,6 +55,7 @@ > "fdt_high=0xffffffff\0" \ > "initrd_high=0xffffffff\0" \ > "fdt_addr=0x40000000\0" \ > + "fdt_addr_r=0x40100000\0" \ > "scriptaddr=0x40200000\0" \ > "pxefile_addr_r=0x40300000\0" \ > "kernel_addr_r=0x40400000\0" \