* How to make .dtb from .dts file (how to set include path for #include .. ?)
@ 2021-02-23 8:37 ckim
2021-02-23 9:28 ` Ahmad Fatoum
2021-02-23 9:34 ` Aw: " Martin Herdeis
0 siblings, 2 replies; 5+ messages in thread
From: ckim @ 2021-02-23 8:37 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 1142 bytes --]
Hello all,
In linux kernel source, there are many .dts files (device tree source)
For example there is a file ./arch/arm64/boot/dts/arm/juno.dts.
To tried to make juno.dtb from juno.dts but I don't know how to do it.
(by the way, once I did make for the kernel build, junno.dtb file seems to
be generated in the same directory)
Just in case I want to make my own .dts and .dtb, I tried compling juno.dts
file. (I had installed dtc on my ubuntu 16.04 machine before)
$ dtc -I dts -O dtb -o juno.dtb arch/arm64/boot/dts/arm/juno.dts
Error: arch/arm64/boot/dts/arm/juno.dts:11.1-9 syntax error
FATAL ERROR: Unable to parse input tree
The dtc program cannot process the line below in the .dts file.(line 11)
#include <dt-bindings/interrupt-controller/arm-gic.h>
I don't know how I should let the preprocessing kick in.
I tried (because there is
include/dt-bindings/interrupt-controller/arm-gic.h)
$ dtc -i include -I dts -O dtb -o juno.dtb
arch/arm64/boot/dts/arm/juno.dts
But it doesn't work.
How can I use dtc program to make juno.dtb?
Or if I have to use Makefile, what is the command?
Thanks,
Chan Kim
[-- Attachment #1.2: Type: text/html, Size: 4501 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to make .dtb from .dts file (how to set include path for #include .. ?)
2021-02-23 8:37 How to make .dtb from .dts file (how to set include path for #include .. ?) ckim
@ 2021-02-23 9:28 ` Ahmad Fatoum
2021-02-24 4:54 ` ckim
2021-02-23 9:34 ` Aw: " Martin Herdeis
1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2021-02-23 9:28 UTC (permalink / raw)
To: ckim, kernelnewbies
Hello Chan,
On 23.02.21 09:37, ckim@etri.re.kr wrote:
> I don't know how I should let the preprocessing kick in.
>
> I tried (because there is
> include/dt-bindings/interrupt-controller/arm-gic.h)
>
> $ dtc -i include -I dts -O dtb -o juno.dtb
> arch/arm64/boot/dts/arm/juno.dts
>
> But it doesn't work.
dtc only handles /include/. #include is expanded by a C preprocessor
that's explicitly run beforehand. Run make V=1 dtbs if you are curious
to see the commands executed.
> How can I use dtc program to make juno.dtb?
>
> Or if I have to use Makefile, what is the command?
What reason for doing this by hand?
Cheers,
Ahmad
>
>
>
> Thanks,
>
>
>
> Chan Kim
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
* Aw: How to make .dtb from .dts file (how to set include path for #include .. ?)
2021-02-23 8:37 How to make .dtb from .dts file (how to set include path for #include .. ?) ckim
2021-02-23 9:28 ` Ahmad Fatoum
@ 2021-02-23 9:34 ` Martin Herdeis
2021-02-24 17:56 ` linux lover
1 sibling, 1 reply; 5+ messages in thread
From: Martin Herdeis @ 2021-02-23 9:34 UTC (permalink / raw)
To: ckim; +Cc: kernelnewbies
[-- Attachment #1: Type: text/html, Size: 4186 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: How to make .dtb from .dts file (how to set include path for #include .. ?)
2021-02-23 9:28 ` Ahmad Fatoum
@ 2021-02-24 4:54 ` ckim
0 siblings, 0 replies; 5+ messages in thread
From: ckim @ 2021-02-24 4:54 UTC (permalink / raw)
To: 'Ahmad Fatoum', kernelnewbies
Hello Ahmad,
Thanks for the kind reply.
I've checked adding a .dts file in the directory and adding it in the
Makefile there, and doing "make dts" at the build top does the job. As you
said, I think I can just do with this method.
Thank you!
Best regards,
Chan
> -----Original Message-----
> From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Sent: Tuesday, February 23, 2021 6:28 PM
> To: ckim@etri.re.kr; kernelnewbies@kernelnewbies.org
> Subject: Re: How to make .dtb from .dts file (how to set include path for
> #include .. ?)
>
> Hello Chan,
>
> On 23.02.21 09:37, ckim@etri.re.kr wrote:
> > I don't know how I should let the preprocessing kick in.
> >
> > I tried (because there is
> > include/dt-bindings/interrupt-controller/arm-gic.h)
> >
> > $ dtc -i include -I dts -O dtb -o juno.dtb
> > arch/arm64/boot/dts/arm/juno.dts
> >
> > But it doesn't work.
>
> dtc only handles /include/. #include is expanded by a C preprocessor
> that's explicitly run beforehand. Run make V=1 dtbs if you are curious to
> see the commands executed.
>
> > How can I use dtc program to make juno.dtb?
> >
> > Or if I have to use Makefile, what is the command?
>
> What reason for doing this by hand?
>
> Cheers,
> Ahmad
>
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Chan Kim
> >
> >
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Aw: How to make .dtb from .dts file (how to set include path for #include .. ?)
2021-02-23 9:34 ` Aw: " Martin Herdeis
@ 2021-02-24 17:56 ` linux lover
0 siblings, 0 replies; 5+ messages in thread
From: linux lover @ 2021-02-24 17:56 UTC (permalink / raw)
To: Martin Herdeis; +Cc: ckim, kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 2304 bytes --]
Sent from my iPhone
> On Feb 23, 2021, at 5:34 PM, Martin Herdeis <martinherdeis@gmx.de> wrote:
>
>
> Hello Chan,
>
> haven't tried to build dtb myselfe yet but maybe this helps:
>
> https://bootlin.com/pub/conferences/2013/elce/petazzoni-device-tree-dummies/petazzoni-device-tree-dummies.pdf
> https://www.youtube.com/watch?v=m_NyYEBxfn8
> https://bootlin.com/blog/device-tree-101-webinar-slides-and-videos/
>
> Martin
> Gesendet: Dienstag, 23. Februar 2021 um 09:37 Uhr
> Von: ckim@etri.re.kr
> An: kernelnewbies@kernelnewbies.org
> Betreff: How to make .dtb from .dts file (how to set include path for #include .. ?)
> Hello all,
>
>
>
> In linux kernel source, there are many .dts files (device tree source)
>
> For example there is a file ./arch/arm64/boot/dts/arm/juno.dts.
>
> To tried to make juno.dtb from juno.dts but I don’t know how to do it.
>
> (by the way, once I did make for the kernel build, junno.dtb file seems to be generated in the same directory)
>
>
>
> Just in case I want to make my own .dts and .dtb, I tried compling juno.dts file. (I had installed dtc on my ubuntu 16.04 machine before)
>
> $ dtc -I dts -O dtb -o juno.dtb arch/arm64/boot/dts/arm/juno.dts
>
> Error: arch/arm64/boot/dts/arm/juno.dts:11.1-9 syntax error
>
> FATAL ERROR: Unable to parse input tree
>
> The dtc program cannot process the line below in the .dts file.(line 11)
>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
>
>
>
> I don’t know how I should let the preprocessing kick in.
>
> I tried (because there is include/dt-bindings/interrupt-controller/arm-gic.h)
>
> $ dtc -i include -I dts -O dtb -o juno.dtb arch/arm64/boot/dts/arm/juno.dts
>
> But it doesn’t work.
>
>
>
> How can I use dtc program to make juno.dtb?
>
> Or if I have to use Makefile, what is the command?
>
>
>
> Thanks,
>
>
>
> Chan Kim
>
> _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
[-- Attachment #1.2: Type: text/html, Size: 5421 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-24 17:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 8:37 How to make .dtb from .dts file (how to set include path for #include .. ?) ckim
2021-02-23 9:28 ` Ahmad Fatoum
2021-02-24 4:54 ` ckim
2021-02-23 9:34 ` Aw: " Martin Herdeis
2021-02-24 17:56 ` linux lover
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.