public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] BUG: bootz/bootm command mandates a fdt blob
@ 2014-11-20 15:16 Suriyan Ramasami
  2014-11-20 16:04 ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Suriyan Ramasami @ 2014-11-20 15:16 UTC (permalink / raw)
  To: u-boot

Hello Simon,
     This mail is addressed to you as the FDT support was added by
you. I am not sure who else to address it to.

      I find that if CONFIG_OF_LIBFDT is defined then the user is
forced to provide a FDT blob. In most of the cases it makes sense.
However, this removes the ability to boot older linux (non FDT).
    For example, I was looking at the Hardkernel Odroid kernels for
the U2/U3, and they are 3.8 based. Of course newer kernels 3.17 work.
For users to use the same boot loader for 3.8 and for 3.17, they
cannot use the mainline uboot.

    I was wondering if teh third argument to bootz/bootm etc could
also take the route of initrd (optional if - is specified) could be
implemented.

   The fix seems to be trivial (or so I think), in file
common/image-fdt.c, but wanted to know your comments on this. Also the
command help (for bootz etc) states that if the 3rd argument is not
passed, then the bd_info struct is passed, and I do not see it being
passed in the code anywhere. In the absence of the third parameter, it
just gives a "No fdt found" message.

diff --git a/common/image-fdt.c b/common/image-fdt.c
index a39ae1b..e685700 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -243,7 +243,10 @@ int boot_get_fdt(int flag, int argc, char * const argv[], u

        if (argc > 2)
                select = argv[2];
-       if (select || genimg_has_config(images)) {
+       if (select && strcmp(select, "-") ==  0) {
+               debug("## Skipping fdt\n");
+               return 0;
+       } else if (select || genimg_has_config(images)) {
 #if defined(CONFIG_FIT)
                if (select) {
                        /*

Regards
- Suriyan

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-20 19:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 15:16 [U-Boot] BUG: bootz/bootm command mandates a fdt blob Suriyan Ramasami
2014-11-20 16:04 ` Hans de Goede
2014-11-20 16:38   ` Simon Glass
2014-11-20 19:41     ` Suriyan Ramasami
2014-11-20 19:48       ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox