All of lore.kernel.org
 help / color / mirror / Atom feed
* dts and dtb files
@ 2014-01-16  0:22 Niklas Molin
  2014-01-16 12:52 ` Mats Kärrman
  2014-01-16 21:04 ` Alex J Lennon
  0 siblings, 2 replies; 9+ messages in thread
From: Niklas Molin @ 2014-01-16  0:22 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Hi.

I'm trying to figure out how the dts/dtsi and dtb files works, when
compiling for the sabreSD board.
Where can I find more info about this?

When I checked in the imx6dlsabresd.conf, it pointed to some dtb (e.g.
imx6dl-sabresd.dtb) files (which seems to be some kind of binary files).
If I want to modify (enable/disable ports etc.) in my project, is it ht
edts and dtsi files I should use then.
Does these file have to be compiled in some way, to be included in the
sabresd project?

Thanks,
Niklas

[-- Attachment #2: Type: text/html, Size: 647 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-16  0:22 dts and dtb files Niklas Molin
@ 2014-01-16 12:52 ` Mats Kärrman
       [not found]   ` <CAKQdxxbpQkm3mFi_v9mSpx-LjbNSQaRpCAiHFmwXOU2PBp40CQ@mail.gmail.com>
  2014-01-16 21:04 ` Alex J Lennon
  1 sibling, 1 reply; 9+ messages in thread
From: Mats Kärrman @ 2014-01-16 12:52 UTC (permalink / raw)
  To: Niklas Molin, meta-freescale@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]

Hi Niklas,

Read here for more info on DTB's:

http://www.devicetree.org/Device_Tree_Usage
Linux source: Documentation/devicetree/usage-model.txt

To change something you need to either patch the existing dts files or (better) create a new one. The new one could include the existing one and just add its modifications.

The DTB is compiled as a part of building the kernel. You could add an additional DTB to the build by appending something like:

KERNEL_DEVICETREE += "my-precious.dtb"

to a recipe or conf file.
Then you need to change the U-Boot environment to select this dtb instead of the default one.

BR // Mats


________________________________
From: meta-freescale-bounces@yoctoproject.org [meta-freescale-bounces@yoctoproject.org] on behalf of Niklas Molin [niklas.p.molin@gmail.com]
Sent: Thursday, January 16, 2014 1:22 AM
To: meta-freescale@yoctoproject.org
Subject: [meta-freescale] dts and dtb files

Hi.

I'm trying to figure out how the dts/dtsi and dtb files works, when compiling for the sabreSD board.
Where can I find more info about this?

When I checked in the imx6dlsabresd.conf, it pointed to some dtb (e.g. imx6dl-sabresd.dtb) files (which seems to be some kind of binary files).
If I want to modify (enable/disable ports etc.) in my project, is it ht edts and dtsi files I should use then.
Does these file have to be compiled in some way, to be included in the sabresd project?

Thanks,
Niklas

[-- Attachment #2: Type: text/html, Size: 2296 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-16  0:22 dts and dtb files Niklas Molin
  2014-01-16 12:52 ` Mats Kärrman
@ 2014-01-16 21:04 ` Alex J Lennon
  2014-01-16 22:05   ` Bob Cochran
  1 sibling, 1 reply; 9+ messages in thread
From: Alex J Lennon @ 2014-01-16 21:04 UTC (permalink / raw)
  To: niklas.p.molin; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 2338 bytes --]

Hi Niklas,

On 16/01/2014 00:22, Niklas Molin wrote:
> Hi.
>
> I'm trying to figure out how the dts/dtsi and dtb files works, when
> compiling for the sabreSD board.
> Where can I find more info about this?
>

It appears to be a bit of a black art.

The ePAPR document helped me a lot (seems to need a login now but I
believe it's the one I was referencing when I last looked at this)

https://www.power.org/documentation/epapr-version-1-1/

There was a presentation at ELCE 2013 which I also found useful. Device
Tree seems to be a bit of a work in progress,

http://www.youtube.com/watch?v=m_NyYEBxfn8&list=PLbzoR-pLrL6oxnDyb7IvnNOOBur7z_8tE&index=18

Hope this helps, Cheers,

Alex

> When I checked in the imx6dlsabresd.conf, it pointed to some dtb (e.g.
> imx6dl-sabresd.dtb) files (which seems to be some kind of binary files).
> If I want to modify (enable/disable ports etc.) in my project, is it
> ht edts and dtsi files I should use then.
> Does these file have to be compiled in some way, to be included in the
> sabresd project?
>
> Thanks,
> Niklas
>
>
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale

-- 

Dynamic Devices Ltd <http://www.dynamicdevices.co.uk/>

Alex J Lennon / Director
1 Queensway, Liverpool L22 4RA

mobile: +44 (0)7956 668178

Linkedin <http://www.linkedin.com/in/alexjlennon> Skype
<skype:alexjlennon?add>

This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended
recipient(s). Any unauthorized disclosure, dissemination, distribution,
copying or the taking of any action in reliance on the information
herein is prohibited. E-mails are not secure and cannot be guaranteed to
be error free as they can be intercepted, amended, or contain viruses.
Anyone who communicates with us by e-mail is deemed to have accepted
these risks. Company Name is not responsible for errors or omissions in
this message and denies any responsibility for any damage arising from
the use of e-mail. Any opinion and other statement contained in this
message and any attachment are solely those of the author and do not
necessarily represent those of the company.


[-- Attachment #2.1: Type: text/html, Size: 5630 bytes --]

[-- Attachment #2.2: ddlogo-4.png --]
[-- Type: image/png, Size: 3997 bytes --]

[-- Attachment #2.3: linkedin.png --]
[-- Type: image/png, Size: 631 bytes --]

[-- Attachment #2.4: skype.png --]
[-- Type: image/png, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-16 21:04 ` Alex J Lennon
@ 2014-01-16 22:05   ` Bob Cochran
  0 siblings, 0 replies; 9+ messages in thread
From: Bob Cochran @ 2014-01-16 22:05 UTC (permalink / raw)
  To: Alex J Lennon, niklas.p.molin; +Cc: meta-freescale

On 01/16/2014 04:04 PM, Alex J Lennon wrote:
> Hi Niklas,
>
> On 16/01/2014 00:22, Niklas Molin wrote:
>> Hi.
>>
>> I'm trying to figure out how the dts/dtsi and dtb files works, when
>> compiling for the sabreSD board.
>> Where can I find more info about this?
>>
>
> It appears to be a bit of a black art.


When creating a new dts file, keep in mind that you may want to leave 
out certain board-level components that you won't be using (at first). 
For example, I have boards that have non utilized FLASH, so I left out 
the descriptions until I had time to get them right.  Otherwise, the 
kernel wouldn't boot properly.

Good luck.




>
> The ePAPR document helped me a lot (seems to need a login now but I
> believe it's the one I was referencing when I last looked at this)
>
> https://www.power.org/documentation/epapr-version-1-1/
>
> There was a presentation at ELCE 2013 which I also found useful. Device
> Tree seems to be a bit of a work in progress,
>
> http://www.youtube.com/watch?v=m_NyYEBxfn8&list=PLbzoR-pLrL6oxnDyb7IvnNOOBur7z_8tE&index=18
>
> Hope this helps, Cheers,
>
> Alex
>
>> When I checked in the imx6dlsabresd.conf, it pointed to some dtb (e.g.
>> imx6dl-sabresd.dtb) files (which seems to be some kind of binary files).
>> If I want to modify (enable/disable ports etc.) in my project, is it
>> ht edts and dtsi files I should use then.
>> Does these file have to be compiled in some way, to be included in the
>> sabresd project?
>>
>> Thanks,
>> Niklas
>>
>>
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>
> --
>
> Dynamic Devices Ltd <http://www.dynamicdevices.co.uk/>
>
> Alex J Lennon / Director
> 1 Queensway, Liverpool L22 4RA
>
> mobile: +44 (0)7956 668178
>
> Linkedin <http://www.linkedin.com/in/alexjlennon> Skype
> <skype:alexjlennon?add>
>
> This e-mail message may contain confidential or legally privileged
> information and is intended only for the use of the intended
> recipient(s). Any unauthorized disclosure, dissemination, distribution,
> copying or the taking of any action in reliance on the information
> herein is prohibited. E-mails are not secure and cannot be guaranteed to
> be error free as they can be intercepted, amended, or contain viruses.
> Anyone who communicates with us by e-mail is deemed to have accepted
> these risks. Company Name is not responsible for errors or omissions in
> this message and denies any responsibility for any damage arising from
> the use of e-mail. Any opinion and other statement contained in this
> message and any attachment are solely those of the author and do not
> necessarily represent those of the company.
>
>
>
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
       [not found]   ` <CAKQdxxbpQkm3mFi_v9mSpx-LjbNSQaRpCAiHFmwXOU2PBp40CQ@mail.gmail.com>
@ 2014-01-20  8:15     ` Mats Kärrman
  2014-01-23  7:48       ` Niklas Molin
  0 siblings, 1 reply; 9+ messages in thread
From: Mats Kärrman @ 2014-01-20  8:15 UTC (permalink / raw)
  To: Niklas Molin; +Cc: meta-freescale@yoctoproject.org

Hi Niclas,

(Please keep the list on cc)

At Friday, January 17, 2014 11:12 PM, Niklas Molin [niklas.p.molin@gmail.com] wrote:
> So in my .conf file (machine config) I have the KERNEL_DEVICETREE, which points to some .dtb files.
> Will these .dtb files be generated by "compiling" the dts/dtsi files?
> If so, where do setup the path to where these dts/dtsi files are located.
> Right now when I look in my Sabresd directory I have dts/dtsi files in following paths:
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/image/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/package/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/packages-split/kernel-dev/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/git/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/sysroot-destdir/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/
> From which directory is it "compiling" the dts/dtsi files?

The .dtb is built as part of the Linux kernel build, not the
linux-libc-headers. On my machine I find the .dts source files at:
./build/tmp/work/${MACHINE}-poky-linux-gnueabi/linux-imx/3.10.9-r0/git/arch/arm/boot/dts

You need to make a patch for the linux kernel source or otherwise
copy your .dts file to this directory before do_install.
The .dtb files listed in your machine conf are compiled from .dts
files with the same name. The compiler is called "dtc" and is a
tool built as part of the linux kernel build (see .../git/scripts/dtc).
You can run the tool with "--help" for more info. A good feature
is that you can run it backwards, producing a .dts from your .dtb
so you can make sure you've got all your changes right.

BR // Mats


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-20  8:15     ` Mats Kärrman
@ 2014-01-23  7:48       ` Niklas Molin
  2014-01-23  7:57         ` zhenhua.luo
  2014-01-23  8:01         ` Mats Kärrman
  0 siblings, 2 replies; 9+ messages in thread
From: Niklas Molin @ 2014-01-23  7:48 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 2714 bytes --]

Hi.

I just wanted to check if there is a way to compile the dts files with
bitbake?
I can see that my dtsi -file is updated in the directory where I have my
dtb file.
But the dtb file is not updated when I run bitbake.
So do I have to manually compile the dts file or is there some way to do it
via bitbake?

Thanks,
Niklas


On Mon, Jan 20, 2014 at 12:15 AM, Mats Kärrman <Mats.Karrman@tritech.se>wrote:

> Hi Niclas,
>
> (Please keep the list on cc)
>
> At Friday, January 17, 2014 11:12 PM, Niklas Molin [
> niklas.p.molin@gmail.com] wrote:
> > So in my .conf file (machine config) I have the KERNEL_DEVICETREE, which
> points to some .dtb files.
> > Will these .dtb files be generated by "compiling" the dts/dtsi files?
> > If so, where do setup the path to where these dts/dtsi files are located.
> > Right now when I look in my Sabresd directory I have dts/dtsi files in
> following paths:
> >
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/image/usr/src/kernel/arch/arm/boot/dts/
> >
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/package/usr/src/kernel/arch/arm/boot/dts/
> >
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/packages-split/kernel-dev/usr/src/kernel/arch/arm/boot/dts/
> >
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/git/arch/arm/boot/dts/
> >
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/sysroot-destdir/usr/src/kernel/arch/arm/boot/dts/
> >
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/
> > From which directory is it "compiling" the dts/dtsi files?
>
> The .dtb is built as part of the Linux kernel build, not the
> linux-libc-headers. On my machine I find the .dts source files at:
>
> ./build/tmp/work/${MACHINE}-poky-linux-gnueabi/linux-imx/3.10.9-r0/git/arch/arm/boot/dts
>
> You need to make a patch for the linux kernel source or otherwise
> copy your .dts file to this directory before do_install.
> The .dtb files listed in your machine conf are compiled from .dts
> files with the same name. The compiler is called "dtc" and is a
> tool built as part of the linux kernel build (see .../git/scripts/dtc).
> You can run the tool with "--help" for more info. A good feature
> is that you can run it backwards, producing a .dts from your .dtb
> so you can make sure you've got all your changes right.
>
> BR // Mats
>

[-- Attachment #2: Type: text/html, Size: 3270 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-23  7:48       ` Niklas Molin
@ 2014-01-23  7:57         ` zhenhua.luo
  2014-01-23  8:01         ` Mats Kärrman
  1 sibling, 0 replies; 9+ messages in thread
From: zhenhua.luo @ 2014-01-23  7:57 UTC (permalink / raw)
  To: Niklas Molin; +Cc: meta-freescale@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]

Does "bitbake -C install virtual/kernel" work for your case?


Best Regards,

Zhenhua

From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-bounces@yoctoproject.org] On Behalf Of Niklas Molin
Sent: Thursday, January 23, 2014 3:48 PM
To: meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] dts and dtb files

Hi.

I just wanted to check if there is a way to compile the dts files with bitbake?
I can see that my dtsi -file is updated in the directory where I have my dtb file.
But the dtb file is not updated when I run bitbake.
So do I have to manually compile the dts file or is there some way to do it via bitbake?

Thanks,
Niklas

On Mon, Jan 20, 2014 at 12:15 AM, Mats Kärrman <Mats.Karrman@tritech.se<mailto:Mats.Karrman@tritech.se>> wrote:
Hi Niclas,

(Please keep the list on cc)

At Friday, January 17, 2014 11:12 PM, Niklas Molin [niklas.p.molin@gmail.com<mailto:niklas.p.molin@gmail.com>] wrote:
> So in my .conf file (machine config) I have the KERNEL_DEVICETREE, which points to some .dtb files.
> Will these .dtb files be generated by "compiling" the dts/dtsi files?
> If so, where do setup the path to where these dts/dtsi files are located.
> Right now when I look in my Sabresd directory I have dts/dtsi files in following paths:
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/image/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/package/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/packages-split/kernel-dev/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/git/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/linux-imx/3.10.9-r0/sysroot-destdir/usr/src/kernel/arch/arm/boot/dts/
> cortexa9hf-vfp-neon-poky-linux-gnueabi/linux-libc-headers/3.10-r0/linux-3.10/arch/arm/boot/dts/
> From which directory is it "compiling" the dts/dtsi files?
The .dtb is built as part of the Linux kernel build, not the
linux-libc-headers. On my machine I find the .dts source files at:
./build/tmp/work/${MACHINE}-poky-linux-gnueabi/linux-imx/3.10.9-r0/git/arch/arm/boot/dts

You need to make a patch for the linux kernel source or otherwise
copy your .dts file to this directory before do_install.
The .dtb files listed in your machine conf are compiled from .dts
files with the same name. The compiler is called "dtc" and is a
tool built as part of the linux kernel build (see .../git/scripts/dtc).
You can run the tool with "--help" for more info. A good feature
is that you can run it backwards, producing a .dts from your .dtb
so you can make sure you've got all your changes right.

BR // Mats


[-- Attachment #2: Type: text/html, Size: 7147 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-23  7:48       ` Niklas Molin
  2014-01-23  7:57         ` zhenhua.luo
@ 2014-01-23  8:01         ` Mats Kärrman
  2014-01-28 22:28           ` Niklas Molin
  1 sibling, 1 reply; 9+ messages in thread
From: Mats Kärrman @ 2014-01-23  8:01 UTC (permalink / raw)
  To: Niklas Molin, meta-freescale@yoctoproject.org

On Thursday, January 23, 2014 8:48 AM, Niklas Molin [niklas.p.molin@gmail.com] wrote:
> I just wanted to check if there is a way to compile the dts files with bitbake?
> I can see that my dtsi -file is updated in the directory where I have my dtb file.
> But the dtb file is not updated when I run bitbake.
> So do I have to manually compile the dts file or is there some way to do it via bitbake?

If you added the .dtb to KERNEL_DEVICETREE it will be built as a part of
the install step of the linux-imx build. If you somehow change the source and
want to rebuild the .dtb you can do:

bitbake linux-imx -c install -f

however, as this takes some time, it might be faster to just open a shell in
the dts folder and run the dtc manually from there.

BR // Mats


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dts and dtb files
  2014-01-23  8:01         ` Mats Kärrman
@ 2014-01-28 22:28           ` Niklas Molin
  0 siblings, 0 replies; 9+ messages in thread
From: Niklas Molin @ 2014-01-28 22:28 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

Hi Mats and Zhenhua.

Seems like both commands worked for what I wanted, now I managed to see the
.dtb files be updated.

Best regards,
Niklas


On Thu, Jan 23, 2014 at 12:01 AM, Mats Kärrman <Mats.Karrman@tritech.se>wrote:

> On Thursday, January 23, 2014 8:48 AM, Niklas Molin [
> niklas.p.molin@gmail.com] wrote:
> > I just wanted to check if there is a way to compile the dts files with
> bitbake?
> > I can see that my dtsi -file is updated in the directory where I have my
> dtb file.
> > But the dtb file is not updated when I run bitbake.
> > So do I have to manually compile the dts file or is there some way to do
> it via bitbake?
>
> If you added the .dtb to KERNEL_DEVICETREE it will be built as a part of
> the install step of the linux-imx build. If you somehow change the source
> and
> want to rebuild the .dtb you can do:
>
> bitbake linux-imx -c install -f
>
> however, as this takes some time, it might be faster to just open a shell
> in
> the dts folder and run the dtc manually from there.
>
> BR // Mats
>

[-- Attachment #2: Type: text/html, Size: 1511 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-28 22:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16  0:22 dts and dtb files Niklas Molin
2014-01-16 12:52 ` Mats Kärrman
     [not found]   ` <CAKQdxxbpQkm3mFi_v9mSpx-LjbNSQaRpCAiHFmwXOU2PBp40CQ@mail.gmail.com>
2014-01-20  8:15     ` Mats Kärrman
2014-01-23  7:48       ` Niklas Molin
2014-01-23  7:57         ` zhenhua.luo
2014-01-23  8:01         ` Mats Kärrman
2014-01-28 22:28           ` Niklas Molin
2014-01-16 21:04 ` Alex J Lennon
2014-01-16 22:05   ` Bob Cochran

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.