Single device tree blob between linux and u-boot
Cédric Le Goater
clg at kaod.org
Fri Oct 14 07:58:32 AEDT 2016
On 10/13/2016 09:37 PM, Rick Altherr wrote:
> I've been working on signed kernel images which depends on building
> FIT images that include the kernel, initrd, and dtb. The kernel_fitimage
> branch of my tree (https://github.com/kc8apf/openbmc) will build an
> unsigned FIT image by including the dtb specified in the machine config
> (usually from the kernel). There are also provisions in there for u-boot
> being built in two stages so a control dtb that includes the public signing
> keys can be combined into the final u-boot binary. From how that is structure,
> I suspect Maxim is right that there will be some differences between u-boot's
> dtb and linux's dtb. That shouldn't be an issue as the u-boot dtb gets built
> into the u-boot image while the kernel dtb is loaded from the FIT image.
No it shouldn't be too problematic.
let's get going and see what a first draft would look like. We would need
a first driver using a very minimal u-boot dtb to start with and I suppose
it will be the I2C one. Could you build a uboot tree with both so we can
experiment ?
We need to make sure that a new uboot boots an old image also.
Thanks,
C.
> Rick
>
> On Thu, Oct 13, 2016 at 11:41 AM, Maxim Sloyko <maxims at google.com <mailto:maxims at google.com>> wrote:
>
>
>
> On Thu, Oct 13, 2016 at 11:20 AM, Xo Wang <xow at google.com <mailto:xow at google.com>> wrote:
>
> Hi folks,
>
> I saw Cedric had mentioned "...you can use the linux compiled [dtb]
> and dd it at the end of the u-boot
> partition..."
>
> To provide the device tree to u-boot, should we do what Cedric said
> and also pass the address of the DTB from U-Boot to Linux? According
> to these slides:
>
> https://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf <https://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf>
>
> U-Boot can pass the DTB address to Linux in r2 (p. 6) with the right
> bootm command parameters.
>
> This means we can have U-Boot and Linux use the same DTB binary (I
> prefer built in Linux) rather than each source tree building one.
>
>
> This introduces the dependency of U-Boot on Linux. Do we plan to keep this dependency forever? This may be fine with OpenBMC, but what about mainline U-Boot and Linux?
> Also, are we sure that they are 100% compatible? IIRC Peter was saying that in practice you need two different device trees for U-Boot and Linux.
>
>
>
> Then we can remove the CONFIG_ARM_APPENDED_DTB option in our Linux
> build that is described as a legacy "compatibility" mechanism. We also
> avoid having an extra copy of the DTSs in U-Boot source and avoid
> duplicate DTBs in our image.
>
> Thoughts?
>
> cheers
> xo
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org <mailto:openbmc at lists.ozlabs.org>
> https://lists.ozlabs.org/listinfo/openbmc <https://lists.ozlabs.org/listinfo/openbmc>
>
>
>
>
> --
> *M*axim *S*loyko
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org <mailto:openbmc at lists.ozlabs.org>
> https://lists.ozlabs.org/listinfo/openbmc <https://lists.ozlabs.org/listinfo/openbmc>
>
>
>
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>
More information about the openbmc
mailing list