[U-Boot-Users] Ideas on U-Boot configuration with FDT
Wolfgang Grandegger
wg at grandegger.com
Sun May 20 10:36:05 CEST 2007
Jerry Van Baren wrote:
> Timur Tabi wrote:
>> Jerry Van Baren wrote:
>>
>>> Yes, that is what "fdt addr" does today, it tells the u-boot innards
>>> where the blob is (sets/changes the blob location). The user can
>>> download a new blob and switch to using it via the "fdt addr" command.
>>
>> By "change", I thought you meant that "fdt addr" would actually move
>> the device tree, since that's technically changing the address.
>> Perhaps you meant "set the address"?
>
> Yes.
>
>>> The user can use the "fdt addr" command to set/change the location of
>>> the blob. Moving blobs is not out of scope, it is what "fdt move" does.
>>
>> How is "fdt move" different than cp.b followed by another "fdt addr"?
>
> Conceptually the same thing but easier: you don't have to know (guess)
> the blob size because fdt_open_into() gets the size from the source blob.
Summing up, brainstorming a bit more, here are my revised ideas:
The following definitions control the FDT usage in U-Boot:
CFG_FDT_ADDR_FLASH:
If defined, "fdt" is set to that address at compile time. The
FDT can be used from the early beginning of the boot.
CFG_FDT_ADDR_BY_ENV:
If defined, the env variable "fdtaddr" is looked up early in the
boot and "fdt" is set accordingly. This allows to hold more than
one blob in FLASH and select one via env setting. This would
allow for _one_ combination of images of U-Boot + Linux + Blobs
for a _set_ of boards.
CFG_FDT_ADDR_RAM:
If defined, the blob is moved to RAM after relocation for
further preparation or for performance reasons. "fdt" is re-set
accordingly. The blob is then ready and in place for booting
Linux. If CFG_FDT_ADDR_RAM is set to 0, the blob will be copied
to a default location, e.g. before the initrd location.
A board-specific checkboad function is called as early as possible to
verify the FDT.
This should also make Timur happy, as he has the choice, e.g. read the
FDT solely from FLASH. With this scheme, I also do not see the real need
for fdt commands to manipulate the blob in RAM. Read-only support would
be a nice to have for debugging, though.
Please comment.
Wolfgang.
More information about the U-Boot
mailing list