* [PATCH] kernel-fitimage: Allow DTB file relocation at boot time
@ 2018-06-15 16:18 Mihai Serban
2018-06-15 17:57 ` Alex Kiernan
0 siblings, 1 reply; 3+ messages in thread
From: Mihai Serban @ 2018-06-15 16:18 UTC (permalink / raw)
To: openembedded-core
Use UBOOT_DTB_LOADADDRESS and UBOOT_DTB_ENTRYPOINT variables to instruct
U-Boot where to place the selected DTB file when booting the system.
Without these settings U-Boot uses the relative offset where DTB resides
inside the loading address of the FIT image.
Signed-off-by: Mihai Serban <mihai.serban@gmail.com>
---
meta/classes/kernel-fitimage.bbclass | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 50a91e199069..981d11f19f8d 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -134,6 +134,15 @@ EOF
fitimage_emit_section_dtb() {
dtb_csum="sha1"
+ dtb_loadline=""
+ dtb_entryline=""
+
+ if [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
+ dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
+ fi
+ if [ -n "${UBOOT_DTB_ENTRYPOINT}" ]; then
+ dtb_entryline="entry = <${UBOOT_DTB_ENTRYPOINT}>;"
+ fi
cat << EOF >> ${1}
fdt@${2} {
@@ -142,6 +151,8 @@ fitimage_emit_section_dtb() {
type = "flat_dt";
arch = "${UBOOT_ARCH}";
compression = "none";
+ ${dtb_loadline}
+ ${dtb_entryline}
hash@1 {
algo = "${dtb_csum}";
};
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel-fitimage: Allow DTB file relocation at boot time
2018-06-15 16:18 [PATCH] kernel-fitimage: Allow DTB file relocation at boot time Mihai Serban
@ 2018-06-15 17:57 ` Alex Kiernan
2018-06-15 19:42 ` Mihai Serban
0 siblings, 1 reply; 3+ messages in thread
From: Alex Kiernan @ 2018-06-15 17:57 UTC (permalink / raw)
To: mihai.serban; +Cc: openembedded-core
On Fri, Jun 15, 2018 at 5:19 PM Mihai Serban <mihai.serban@gmail.com> wrote:
>
> Use UBOOT_DTB_LOADADDRESS and UBOOT_DTB_ENTRYPOINT variables to instruct
> U-Boot where to place the selected DTB file when booting the system.
> Without these settings U-Boot uses the relative offset where DTB resides
> inside the loading address of the FIT image.
>
> Signed-off-by: Mihai Serban <mihai.serban@gmail.com>
I've a similar patch I've been sitting on for a while, which also
deals with the case where you want DTB overlays, but I don't have the
entry line - what's the use for that in a DTB inside a FIT image?
I'll get what I've got posted up.
> ---
> meta/classes/kernel-fitimage.bbclass | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index 50a91e199069..981d11f19f8d 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -134,6 +134,15 @@ EOF
> fitimage_emit_section_dtb() {
>
> dtb_csum="sha1"
> + dtb_loadline=""
> + dtb_entryline=""
> +
> + if [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
> + dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
> + fi
> + if [ -n "${UBOOT_DTB_ENTRYPOINT}" ]; then
> + dtb_entryline="entry = <${UBOOT_DTB_ENTRYPOINT}>;"
> + fi
>
> cat << EOF >> ${1}
> fdt@${2} {
> @@ -142,6 +151,8 @@ fitimage_emit_section_dtb() {
> type = "flat_dt";
> arch = "${UBOOT_ARCH}";
> compression = "none";
> + ${dtb_loadline}
> + ${dtb_entryline}
> hash@1 {
> algo = "${dtb_csum}";
> };
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Alex Kiernan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel-fitimage: Allow DTB file relocation at boot time
2018-06-15 17:57 ` Alex Kiernan
@ 2018-06-15 19:42 ` Mihai Serban
0 siblings, 0 replies; 3+ messages in thread
From: Mihai Serban @ 2018-06-15 19:42 UTC (permalink / raw)
To: alex.kiernan; +Cc: openembedded-core
On Fri, Jun 15, 2018 at 8:58 PM Alex Kiernan <alex.kiernan@gmail.com> wrote:
>
> On Fri, Jun 15, 2018 at 5:19 PM Mihai Serban <mihai.serban@gmail.com> wrote:
> >
> > Use UBOOT_DTB_LOADADDRESS and UBOOT_DTB_ENTRYPOINT variables to instruct
> > U-Boot where to place the selected DTB file when booting the system.
> > Without these settings U-Boot uses the relative offset where DTB resides
> > inside the loading address of the FIT image.
> >
> > Signed-off-by: Mihai Serban <mihai.serban@gmail.com>
>
> I've a similar patch I've been sitting on for a while, which also
> deals with the case where you want DTB overlays, but I don't have the
> entry line - what's the use for that in a DTB inside a FIT image?
Thanks for pointing this out. Entry is not used for DTB, I'll send v2.
>
> I'll get what I've got posted up.
>
> > ---
> > meta/classes/kernel-fitimage.bbclass | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> > index 50a91e199069..981d11f19f8d 100644
> > --- a/meta/classes/kernel-fitimage.bbclass
> > +++ b/meta/classes/kernel-fitimage.bbclass
> > @@ -134,6 +134,15 @@ EOF
> > fitimage_emit_section_dtb() {
> >
> > dtb_csum="sha1"
> > + dtb_loadline=""
> > + dtb_entryline=""
> > +
> > + if [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
> > + dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
> > + fi
> > + if [ -n "${UBOOT_DTB_ENTRYPOINT}" ]; then
> > + dtb_entryline="entry = <${UBOOT_DTB_ENTRYPOINT}>;"
> > + fi
> >
> > cat << EOF >> ${1}
> > fdt@${2} {
> > @@ -142,6 +151,8 @@ fitimage_emit_section_dtb() {
> > type = "flat_dt";
> > arch = "${UBOOT_ARCH}";
> > compression = "none";
> > + ${dtb_loadline}
> > + ${dtb_entryline}
> > hash@1 {
> > algo = "${dtb_csum}";
> > };
> > --
> > 2.17.1
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> Alex Kiernan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-15 19:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-15 16:18 [PATCH] kernel-fitimage: Allow DTB file relocation at boot time Mihai Serban
2018-06-15 17:57 ` Alex Kiernan
2018-06-15 19:42 ` Mihai Serban
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.