[U-Boot-Users] Can U-boot Autodetect arch/ppcversusarch/powerpc from info in the uImage?
joakim.tjernlund at transmode.se
Sun Dec 9 18:32:59 CET 2007
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: den 9 december 2007 16:01
> To: joakim.tjernlund at transmode.se
> Cc: Jerry Van Baren; u-boot-users at lists.sourceforge.net;
> 'Darcy Watkins'
> Subject: Re: [U-Boot-Users] Can U-boot Autodetect
> arch/ppcversusarch/powerpc from info in the uImage?
> In message
> <1197205927.937.51.camel at gentoo-jocke.transmode.se> you wrote:
> > Made a new patch with Jerrys comments addressed. Also renamed
> > DEFAULT_OF_TREE to CFG_OF_TREE. OK?
> I still object against this modification.
> > +#ifdef CFG_OF_TREE
> > + char *of_flat_tree = CFG_OF_TREE;
> > +#else
> > char *of_flat_tree = NULL;
> > +#endif
> > ulong of_data = 0;
> > #endif
> I hereby NAK this patch for 3 reasons:
> 1) The patch does not solve a problem. Instead of harwiring the
> address, you can just pass it as argument to the bootm command
> which seems more straightforward to me
It is not a hardwired address, it is a function call which returns an address to
the OF tree of your choise. You can define it to an address too if you like.
> 2) The patch causes confusion. Documented behaviour is that "bootm"
> with one or two arguments (kernel address, or kernel plus ramdisk
> addresses) will boot a non-OF enabled kernel. With this patch,
> "bootm" will behave different on systems where the CFG_OF_TREE has
> been silected - which is usually not known to and cannot be
> checked by the end user, thus causing confusion.
> 3) With the patch applied and CFG_OF_TREE defined, there is no way to
> boot a non-OF kernel, thus breaking backward compatibility.
hmm, backwards compatibility. Current u-boot breaks backwards compatibility
with older u-boots that didn't require an OF tree to be passed as an argument to
bootm. Dunno when that happened but 1.1.4 has
extern const unsigned char oftree_dtb;
extern const unsigned int oftree_dtb_len;
That needs to be defined in board code and holds the OF tree.
The CFG_OF_TREE(or some variation there of) is the only way I can
think of to support uppgrade of the older boards in the field in a
easy and non error prone way.
More information about the U-Boot