embedding dtb file into kernel
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
Thank you in advance.
--rich
Quoted 11 lines · K Richard Pixley
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
The normal method is just to cat the two files together, like so:
$ cat zImage <filename>.dtb > zImage_w_dtb
See https://community.freescale.com/thread/315543 for one example, on ARM. I'm not sure what the status is for appended DTBs on powerpc, but it's easy enough you can just try it and see what happens.
-- Tim
Quoted 12 lines · Tim Bird
Quoted 11 lines · K Richard Pixley
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
Quoted 7 lines
The normal method is just to cat the two files together, like so:
$ cat zImage <filename>.dtb > zImage_w_dtbSee https://community.freescale.com/thread/315543 for one example, on ARM. I'm not sure what the status is for appended DTBs on powerpc, but it's easy enough you can just try it and see what happens.
-- Tim
Thanks!
How do I tell the kernel where to find that dtb? Is there a relevant config option?
--rich
Quoted 21 lines · K Richard Pixley
Quoted 12 lines · Tim Bird
Quoted 11 lines · K Richard Pixley
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
Quoted 7 lines
The normal method is just to cat the two files together, like so:
$ cat zImage <filename>.dtb > zImage_w_dtbSee https://community.freescale.com/thread/315543 for one example, on ARM. I'm not sure what the status is for appended DTBs on powerpc, but it's easy enough you can just try it and see what happens.
-- Tim
Quoted 4 lines
Thanks!
How do I tell the kernel where to find that dtb? Is there a relevant config option?
Usually you make the dtb from sources in the kernel. I don't know how it works on powerpc, but on arm, the .dts files are located in arch/arm/boot/dts, and you would make the dtb for the corresponding "foo.dts" source
by typing:
$ make foo.dtb
-- Tim
Quoted 29 lines · Tim Bird
Quoted 21 lines · K Richard Pixley
Quoted 12 lines · Tim Bird
Quoted 11 lines · K Richard Pixley
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
Quoted 7 lines
The normal method is just to cat the two files together, like so:
$ cat zImage <filename>.dtb > zImage_w_dtbSee https://community.freescale.com/thread/315543 for one example, on ARM. I'm not sure what the status is for appended DTBs on powerpc, but it's easy enough you can just try it and see what happens.
-- TimQuoted 4 lines
Thanks!
How do I tell the kernel where to find that dtb? Is there a relevant config option?
Quoted 6 lines
Usually you make the dtb from sources in the kernel. I don't know how it works on powerpc, but on arm, the .dts files are located in
arch/arm/boot/dts, and you would make the dtb for the corresponding "foo.dts" source
by typing:$ make foo.dtb
It's probably somewhere in:
https://www.kernel.org/doc/Documentation/devicetree/booting-without-of.txt
Rob
Quoted 37 lines · Rob Landley
Quoted 29 lines · Tim Bird
Quoted 21 lines · K Richard Pixley
Quoted 12 lines · Tim Bird
Quoted 11 lines · K Richard Pixley
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
Quoted 7 lines
The normal method is just to cat the two files together, like so:
$ cat zImage <filename>.dtb > zImage_w_dtbSee https://community.freescale.com/thread/315543 for one example, on ARM. I'm not sure what the status is for appended DTBs on powerpc, but it's easy enough you can just try it and see what happens.
-- TimQuoted 4 lines
Thanks!
How do I tell the kernel where to find that dtb? Is there a relevant config option?
Quoted 6 lines
Usually you make the dtb from sources in the kernel. I don't know how it works on powerpc, but on arm, the .dts files are located in
arch/arm/boot/dts, and you would make the dtb for the corresponding "foo.dts" source
by typing:$ make foo.dtb
Quoted 3 lines
It's probably somewhere in:
https://www.kernel.org/doc/Documentation/devicetree/booting-without-of.txt
Worth pointing out the folk over in linuxppc-dev are usually pretty friendly, may be able to help out with this too. https://lists.ozlabs.org/listinfo/linuxppc-dev
Cheers,
Hugh
Quoted 12 lines · K Richard Pixley
I'm having trouble figuring out how to embed a dtb file into my kernel. I'm thinking that there should be a standard, architecture independent facility for this akin to initramfs, yes?
Could someone please either point me to the standard facility, relevant doc, a currently building board that uses the standard facility, or outline what needs to be done to do this with a new board?
If it matters, (I can't think why it would), I'm working with powerpc on a 3.10 kernel. But if there are better facilities in other versions I'd appreciate hearing about that too.
Quoted 7 lines
Thank you in advance.
--rich
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Look into Documentation/powerpc/bootwrapper.txt.
It reveals that there is "wrapper" script which does the trick and this script should be used
via Makefile. Both "wrapper" script and Makefile resides in arch/powerpc/boot/ directory.
I think you can figure out how to use it properly from that documentation.