char *fdtfilefree = NULL;
if (label->fdt) {
- fdtfile = label->fdt;
+ if (IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS)) {
+ if (strcmp("-", label->fdt))
+ fdtfile = label->fdt;
+ } else {
+ fdtfile = label->fdt;
+ }
} else if (label->fdtdir) {
char *f1, *f2, *f3, *f4, *slash;
zboot_argc = 5;
}
- if (!bootm_argv[3])
- bootm_argv[3] = env_get("fdt_addr");
+ if (!bootm_argv[3]) {
+ if (IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS)) {
+ if (strcmp("-", label->fdt))
+ bootm_argv[3] = env_get("fdt_addr");
+ } else {
+ 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] && genimg_get_format(buf) != IMAGE_FORMAT_FIT) {
+ if (IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS)) {
+ if (strcmp("-", label->fdt))
+ bootm_argv[3] = env_get("fdtcontroladdr");
+ } else {
+ bootm_argv[3] = env_get("fdtcontroladdr");
+ }
+ }
if (bootm_argv[3]) {
if (!bootm_argv[2])
* Does not document the fdtdir option, which automatically selects the DTB to
pass to the kernel.
+* If no fdt/fdtdir is provided, the U-Boot will pass its own currently used
+ device tree.
+
+* If ``-`` is passed as fdt argument and ``CONFIG_SUPPORT_PASSING_ATAGS`` is
+ enabled, then no device tree will be used (legacy booting / pre-dtb kernel).
+
See also doc/README.pxe under 'pxe file format'.
One example extlinux.conf generated by the Fedora installer is::