[U-Boot-Users] using a flat device tree to drive u-boot config

Wolfgang Grandegger wg at grandegger.com
Tue Jul 29 10:41:32 CEST 2008


André Schwarz wrote:
> Ben Warren schrieb:
>> On Mon, Jul 28, 2008 at 10:43 AM, Scott Wood <scottwood at freescale.com> wrote:
>>> Ben Warren wrote:
>>>> On Mon, Jul 28, 2008 at 10:32 AM, Scott Wood <scottwood at freescale.com>
>>>> wrote:
>>>>> I find a device tree much easier to figure out than a tangled mess of
>>>>> header
>>>>> files, #defines, and #ifdefs...
>>>> In many ways, yes.  But are you an average Joe or a Linux kernel
>>>> propellerhead?
>>> Is u-boot work normally done by average Joes, and does the average Joe
>>> really find the preprocessor mess more intuitive than a "propellerhead"?
>>>
>> You know what I mean.  Some people like yourself do this for a living,
>> and are involved day-to-day in its specification.  Of course it's
>> intuitive to you.  For most people, getting U-boot going is one stage
>> in the development process of software for an embedded device.  They
>> work on it for a few weeks or months, then on something completely
>> different.  A few months or years later, they come back to it.
> 
> You're absolutely right - just have a look at the vast lists of 
> maintainers/contributors ... they are "average Joes" like myself. 
> Realizing 2-3 projects each year should be possible without having to 
> re-learn from scratch.
> 
>>> While we're at it, let's re-write u-boot in Visual Basic. :-)
>> Uh, yeah.  I like the idea of a central repo for hardware info, and
>> the device tree concept is good.  My point is that the syntax, while
>> concise and exact, can be intimidating.  Just look at the amount of
>> traffic on the mailing lists of people that don't understand what all
>> the fields mean when specifying IRQs etc.  Anything we can do to make
>> it less so for noobies is a good thing for everybody.
>>
> 
> Please keep in mind that WDenk is always watching if code is slowing 
> things down or increasing size significantly. Improving things is very 
> good - but not at the cost of size and/or speed. Configuring a board 
> using a dtb usually needs far more code being present than needed.
> After all it's a bootloader and not another pseudo OS.
> 
> But don't get me wrong ! The device tree is a very nice and usefuly 
> thing ... for an OS.

There are customer request for a dynamically configurable U-Boot and the 
FDT is the right tool to provide the functionality. It has its price but 
U-Boot using a FDT blob for booting would also save some fixup code 
(required to boot Linux) and furthermore it would resolves some 
dependencies between hardcoded U-Boot and FDT defined addresses and ranges.

Wolfgang.




More information about the U-Boot mailing list