[U-Boot] Support of device-tree for PowerPC platform: Query

Bin Meng bmeng.cn at gmail.com
Thu Jun 28 05:53:54 UTC 2018


Hi  Prabhakar,

On Thu, Jun 28, 2018 at 6:05 AM, Simon Glass <sjg at chromium.org> wrote:
> Hi,
>
> On 27 June 2018 at 08:06, York Sun <york.sun at nxp.com> wrote:
>>
>> +Simon
>>
>> On 06/27/2018 01:05 AM, Prabhakar Kushwaha wrote:
>> > Hi All,
>> >
>> > We are trying to add support of device-tree for PowerPC platforms. As per our analysis following 2 options can be used.
>> >
>> > a) CONFIG_OF_SEPARATE
>> > b) CONFIG_OF_EMBED
>> >
>> > In PowerPC platforms, reset_vector is always expected at the **last** address of flash.
>> > U-boot binary has reset_vector at last followed by __bss sections(not present in binary) and must be programmed in such a way that reset_vecrot lie at **last** address of flash.
>> >
>> > Hence dtb cannot be appended at last of  u-boot binary.
>> >
>> > So there looks to be following 2 possible solutions
>> > a) Use CONFIG_OF_SEPARATE and append dtb at start of u-boot binary.  This require change in flash map because u-boot start address needs to shifted (due to reset_vector requirements).
>> >      Exiting offset of env and fman ucode also needs shifting. This approach requires modification in almost all existing PowerPC platform to adhere to new **modified** flash map.
>> >
>> > b) Use CONFIG_OF_EMBED and embed dtb inside u-boot. This way no change in exiting flash map. But its usage is being discouraged as per doc/README.fdt-control.
>> >
>>
>> Clearly putting dtb at the very end doesn't work, neither last 4KB. I
>> think we either use CONFIG_OF_EMBED (many boards use this way), or try
>> "fdtcontroladdr".
>
>
> I discourage CONFIG_OF_EMBED - it is a debug feature. I'm not sure if
> you have other options though.
>

Agree.

> Can the DT perhaps go before U-Boot in the flash? We would need a way
> to find it though.
>

I don't see any issue that DT go after U-Boot in the flash. x86 does
this way, and its reset vector is also the last address of flash.

> With binman it is possible to put the DT anyway and have a symbol
> defined to its address. Would that help?

Regards,
Bin


More information about the U-Boot mailing list