* embedding dtb file into kernel
@ 2015-02-13 17:41 K Richard Pixley
2015-02-14 10:29 ` christophe leroy
2015-02-15 13:44 ` Stefano Babic
0 siblings, 2 replies; 10+ messages in thread
From: K Richard Pixley @ 2015-02-13 17:41 UTC (permalink / raw)
To: linuxppc-dev
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-13 17:41 embedding dtb file into kernel K Richard Pixley
@ 2015-02-14 10:29 ` christophe leroy
2015-02-15 13:44 ` Stefano Babic
1 sibling, 0 replies; 10+ messages in thread
From: christophe leroy @ 2015-02-14 10:29 UTC (permalink / raw)
To: K Richard Pixley, linuxppc-dev
Le 13/02/2015 18:41, K Richard Pixley a écrit :
> 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.
>
Hi,
The device tree (DTB file) is not supposed to be embedded into the
kernel but loaded independently by the boot loader (for instance Uboot).
Then a pointer to the device tree is handed over by Uboot to the kernel
when calling the _start function.
You also have in arch/powerpc/boot/ a facility called cuboot which
allows to create a ppcboot image with kernel and device tree bound together.
Christophe
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
http://www.avast.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-13 17:41 embedding dtb file into kernel K Richard Pixley
2015-02-14 10:29 ` christophe leroy
@ 2015-02-15 13:44 ` Stefano Babic
1 sibling, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2015-02-15 13:44 UTC (permalink / raw)
To: K Richard Pixley, linuxppc-dev
Hi Richard,
On 13/02/2015 18:41, K Richard Pixley wrote:
> 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.
>
Maybe it is worth to take a look at the fitImage, which can embed pretty
much anything (including DTB).
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-12 19:33 K Richard Pixley
2015-02-12 22:01 ` Tim Bird
@ 2015-02-13 13:31 ` Sam Protsenko
1 sibling, 0 replies; 10+ messages in thread
From: Sam Protsenko @ 2015-02-13 13:31 UTC (permalink / raw)
To: K Richard Pixley; +Cc: linux-embedded
On Thu, Feb 12, 2015 at 9:33 PM, K Richard Pixley
<rpixley@graphitesystems.com> wrote:
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
> the body of a message to majordomo@vger.kernel.org
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-13 6:10 ` Rob Landley
@ 2015-02-13 6:15 ` Hugh Blemings
0 siblings, 0 replies; 10+ messages in thread
From: Hugh Blemings @ 2015-02-13 6:15 UTC (permalink / raw)
To: Rob Landley, Tim Bird, K Richard Pixley, linux-embedded
On 13/02/2015 17:10, Rob Landley wrote:
> On 02/12/2015 06:56 PM, Tim Bird wrote:
>>
>>
>> On 02/12/2015 02:30 PM, K Richard Pixley wrote:
>>> On 2/12/15 14:01 , Tim Bird wrote:
>>>> On 02/12/2015 11:33 AM, K Richard Pixley wrote:
>>>>> 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
>>>
>>> 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
>
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-13 0:56 ` Tim Bird
@ 2015-02-13 6:10 ` Rob Landley
2015-02-13 6:15 ` Hugh Blemings
0 siblings, 1 reply; 10+ messages in thread
From: Rob Landley @ 2015-02-13 6:10 UTC (permalink / raw)
To: Tim Bird, K Richard Pixley, linux-embedded
On 02/12/2015 06:56 PM, Tim Bird wrote:
>
>
> On 02/12/2015 02:30 PM, K Richard Pixley wrote:
>> On 2/12/15 14:01 , Tim Bird wrote:
>>> On 02/12/2015 11:33 AM, K Richard Pixley wrote:
>>>> 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
>>
>> 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
It's probably somewhere in:
https://www.kernel.org/doc/Documentation/devicetree/booting-without-of.txt
Rob
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-12 22:30 ` K Richard Pixley
@ 2015-02-13 0:56 ` Tim Bird
2015-02-13 6:10 ` Rob Landley
0 siblings, 1 reply; 10+ messages in thread
From: Tim Bird @ 2015-02-13 0:56 UTC (permalink / raw)
To: K Richard Pixley, linux-embedded
On 02/12/2015 02:30 PM, K Richard Pixley wrote:
> On 2/12/15 14:01 , Tim Bird wrote:
>> On 02/12/2015 11:33 AM, K Richard Pixley wrote:
>>> 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
>
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-12 22:01 ` Tim Bird
@ 2015-02-12 22:30 ` K Richard Pixley
2015-02-13 0:56 ` Tim Bird
0 siblings, 1 reply; 10+ messages in thread
From: K Richard Pixley @ 2015-02-12 22:30 UTC (permalink / raw)
To: Tim Bird, linux-embedded
On 2/12/15 14:01 , Tim Bird wrote:
> On 02/12/2015 11:33 AM, K Richard Pixley wrote:
>> 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
Thanks!
How do I tell the kernel where to find that dtb? Is there a relevant
config option?
--rich
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: embedding dtb file into kernel
2015-02-12 19:33 K Richard Pixley
@ 2015-02-12 22:01 ` Tim Bird
2015-02-12 22:30 ` K Richard Pixley
2015-02-13 13:31 ` Sam Protsenko
1 sibling, 1 reply; 10+ messages in thread
From: Tim Bird @ 2015-02-12 22:01 UTC (permalink / raw)
To: K Richard Pixley, linux-embedded
On 02/12/2015 11:33 AM, K Richard Pixley wrote:
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* embedding dtb file into kernel
@ 2015-02-12 19:33 K Richard Pixley
2015-02-12 22:01 ` Tim Bird
2015-02-13 13:31 ` Sam Protsenko
0 siblings, 2 replies; 10+ messages in thread
From: K Richard Pixley @ 2015-02-12 19:33 UTC (permalink / raw)
To: linux-embedded
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-02-15 13:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 17:41 embedding dtb file into kernel K Richard Pixley
2015-02-14 10:29 ` christophe leroy
2015-02-15 13:44 ` Stefano Babic
-- strict thread matches above, loose matches on Subject: below --
2015-02-12 19:33 K Richard Pixley
2015-02-12 22:01 ` Tim Bird
2015-02-12 22:30 ` K Richard Pixley
2015-02-13 0:56 ` Tim Bird
2015-02-13 6:10 ` Rob Landley
2015-02-13 6:15 ` Hugh Blemings
2015-02-13 13:31 ` Sam Protsenko
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.