* linux-yocto custom device tree in overlay
@ 2014-05-07 15:33 Andreas Galauner
2014-05-07 19:37 ` Bruce Ashfield
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Galauner @ 2014-05-07 15:33 UTC (permalink / raw)
To: yocto
Hi Yocto Community,
I'm currently trying to build a custom image for a beaglebone black for
which I need to enable the can-controllers on the SoC. I managed to
create an overlay which already deals with building a few tools for CAN
communication, I created a kernel config snippet for linux-yocto to
enable CAN-support in the kernel and it already works with a USB
transceiver.
Now I need to modify the device tree for the board to enable the SoC
controllers. How do I put the device tree into my overlay? I tried
several ways, but the kernel buildsystem doesn't seem to find the dts
file to be compiled.
That definitely doesn't work:
> SRC_URI += "file://can.cfg \
> file://am335x-boneblack-cansniff.dts"
> KERNEL_DEVICETREE = "am335x-boneblack-cansniff.dtb"
Any ideas? Google wasn't too fruitful either.
With non-yocto kernels I always put the device tree into the whole path
like 'git/arch/arm/boot/dts/mydevicetree.dts' but that also doesn't
seem to work on linux-yocto because it uses another layout in its
working directory.
I'd rather not want to create my own git repo for linux-yocto like I did
for another project where I needed the same.
Thanks for your help,
- Andy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-yocto custom device tree in overlay
2014-05-07 15:33 linux-yocto custom device tree in overlay Andreas Galauner
@ 2014-05-07 19:37 ` Bruce Ashfield
2014-05-08 13:48 ` Andreas Galauner
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2014-05-07 19:37 UTC (permalink / raw)
To: Andreas Galauner, yocto
On 14-05-07 11:33 AM, Andreas Galauner wrote:
> Hi Yocto Community,
>
> I'm currently trying to build a custom image for a beaglebone black for
> which I need to enable the can-controllers on the SoC. I managed to
> create an overlay which already deals with building a few tools for CAN
> communication, I created a kernel config snippet for linux-yocto to
> enable CAN-support in the kernel and it already works with a USB
> transceiver.
>
> Now I need to modify the device tree for the board to enable the SoC
> controllers. How do I put the device tree into my overlay? I tried
> several ways, but the kernel buildsystem doesn't seem to find the dts
> file to be compiled.
>
> That definitely doesn't work:
>> SRC_URI += "file://can.cfg \
>> file://am335x-boneblack-cansniff.dts"
>> KERNEL_DEVICETREE = "am335x-boneblack-cansniff.dtb"
>
> Any ideas? Google wasn't too fruitful either.
> With non-yocto kernels I always put the device tree into the whole path
> like 'git/arch/arm/boot/dts/mydevicetree.dts' but that also doesn't
> seem to work on linux-yocto because it uses another layout in its
> working directory.
I use device trees all the time with linux-yocto based kernels, and
what you have above is fundamentally correct, except (as you noted)
the dts is going only be in ${WORKDIR} and not somewhere the kernel
build can find it.
So you can either patch it into the kernel, or do a bbappend with
that copies it into the source tree
(linux/arch/arm/boot/dts/mydevicetree.dts).
Cheers,
Bruce
>
> I'd rather not want to create my own git repo for linux-yocto like I did
> for another project where I needed the same.
>
> Thanks for your help,
> - Andy
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-yocto custom device tree in overlay
2014-05-07 19:37 ` Bruce Ashfield
@ 2014-05-08 13:48 ` Andreas Galauner
2014-05-08 15:17 ` Bruce Ashfield
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Galauner @ 2014-05-08 13:48 UTC (permalink / raw)
To: Bruce Ashfield, yocto
On 07/05/14 21:37, Bruce Ashfield wrote:
> So you can either patch it into the kernel, or do a bbappend with
> that copies it into the source tree
> (linux/arch/arm/boot/dts/mydevicetree.dts).
Thx! That worked fine.
For reference, this is what I added:
> do_install_prepend() {
> cp ${WORKDIR}/*.dts ${WORKDIR}/linux/arch/${ARCH}/boot/dts/
> }
Cheers,
- Andy
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-yocto custom device tree in overlay
2014-05-08 13:48 ` Andreas Galauner
@ 2014-05-08 15:17 ` Bruce Ashfield
2016-07-18 16:39 ` adnan
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2014-05-08 15:17 UTC (permalink / raw)
To: Andreas Galauner, yocto
On 14-05-08 09:48 AM, Andreas Galauner wrote:
> On 07/05/14 21:37, Bruce Ashfield wrote:
>> So you can either patch it into the kernel, or do a bbappend with
>> that copies it into the source tree
>> (linux/arch/arm/boot/dts/mydevicetree.dts).
>
> Thx! That worked fine.
Glad to hear!
Bruce
>
> For reference, this is what I added:
>> do_install_prepend() {
>> cp ${WORKDIR}/*.dts ${WORKDIR}/linux/arch/${ARCH}/boot/dts/
>> }
>
> Cheers,
> - Andy
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: linux-yocto custom device tree in overlay
2014-05-08 15:17 ` Bruce Ashfield
@ 2016-07-18 16:39 ` adnan
0 siblings, 0 replies; 5+ messages in thread
From: adnan @ 2016-07-18 16:39 UTC (permalink / raw)
To: yocto
Bruce Ashfield <bruce.ashfield@...> writes:
>
> On 14-05-08 09:48 AM, Andreas Galauner wrote:
> > On 07/05/14 21:37, Bruce Ashfield wrote:
> >> So you can either patch it into the kernel, or do a bbappend with
> >> that copies it into the source tree
> >> (linux/arch/arm/boot/dts/mydevicetree.dts).
> >
> > Thx! That worked fine.
>
> Glad to hear!
>
> Bruce
>
> >
> > For reference, this is what I added:
> >> do_install_prepend() {
> >> cp ${WORKDIR}/*.dts ${WORKDIR}/linux/arch/${ARCH}/boot/dts/
> >> }
> >
> > Cheers,
> > - Andy
> >
>
Hi,
I am running into the same problem. Editing the existing dts files in
the kernel source directory does not help. After some time, the files
are restored again.
I added my own dts file which is located at a different location but the
method you mentioned is not clear to me. Could you please specify where
did you add this? In which file?
Thanks in advance.
Adnan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-18 18:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 15:33 linux-yocto custom device tree in overlay Andreas Galauner
2014-05-07 19:37 ` Bruce Ashfield
2014-05-08 13:48 ` Andreas Galauner
2014-05-08 15:17 ` Bruce Ashfield
2016-07-18 16:39 ` adnan
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.