[U-Boot-Users] Ideas on U-Boot configuration with FDT
Timur Tabi
timur at freescale.com
Mon May 21 17:23:34 CEST 2007
Wolfgang Grandegger wrote:
> 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.
If CFG_FDT_ADDR_BY_ENV is *not* defined, should the FDT code then set that variable?
> 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.
I think the FDT blob should *always* be copied to RAM.
>
> 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.
I think I may have changed my mind a bit. I'm not so much concerned about read-only FDT
as I want to automate the process of copying it to RAM.
--
Timur Tabi
Linux Kernel Developer @ Freescale
More information about the U-Boot
mailing list