[U-Boot-Users] idea: fdt_checkboard
wg at grandegger.com
Fri May 18 08:48:33 CEST 2007
Jerry Van Baren wrote:
> Timur Tabi wrote:
>> What do you think about implementing a board-specific function called
>> "fdt_checkboard()"? On platforms that have this function, it would be
>> called by fdt_open_into(). fdt_checkboard() would scan the device tree
>> and make sure that it's the right tree for this board (e.g. by checking
>> the 'model' or 'compatible' fields), and return an error if it's not.
>> This would be helpful in eliminating the possibility of accidentally
>> using the wrong device tree. It could happen, for instance, if there
>> are multiple device trees for a given board.
> Hi Timur,
> I would rather give hush the ability to read fdt properties so that the
> logic could be scripted rather than being "hardcoded" in a C function.
> This would give some interesting capabilities, like selecting the proper
> fdt out of several in memory.
> Unfortunately I'm spouting off out of ignorance, I don't know at this
> point how much effort it would take to give hush the ability to test fdt
Such scripting capabilities might be nice to have but first we need
something more basic. We should also keep in mind that the FDT will be
used to configure U-Boot from the early beginning. In this context a
board specific "fdt_checkboard" function would make sense, but I prefer
that it's already called when an address is assigned to the blob.
More information about the U-Boot