<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> </div>

<div>
<div>Hello Chan,</div>

<div> </div>

<div>haven't tried to build dtb myselfe yet but maybe this helps:</div>

<div> </div>

<div>https://bootlin.com/pub/conferences/2013/elce/petazzoni-device-tree-dummies/petazzoni-device-tree-dummies.pdf</div>

<div>https://www.youtube.com/watch?v=m_NyYEBxfn8</div>

<div>https://bootlin.com/blog/device-tree-101-webinar-slides-and-videos/</div>

<div>
<div> </div>

<div>Martin</div>

<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 23. Februar 2021 um 09:37 Uhr<br/>
<b>Von:</b> ckim@etri.re.kr<br/>
<b>An:</b> kernelnewbies@kernelnewbies.org<br/>
<b>Betreff:</b> How to make .dtb from .dts file (how to set include path for #include .. ?)</div>

<div name="quoted-content"><!--p.MsoNormal, li.MsoNormal, div.MsoNormal {
        margin: 0.0cm;
        text-align: justify;
        font-size: 10.0pt;
        font-family: "Malgun Gothic";
}
a:link, span.MsoHyperlink {
        color: rgb(5,99,193);
        text-decoration: underline;
}
a:visited, span.MsoHyperlinkFollowed {
        color: rgb(149,79,114);
        text-decoration: underline;
}
span.EmailStyle17 {
        font-family: "Malgun Gothic";
        color: windowtext;
}
*.MsoChpDefault {
        font-family: "Malgun Gothic";
}
div.WordSection1 {
        page: WordSection1;
}
-->
<div>
<div class="WordSection1">
<p class="MsoNormal"><span>Hello all,</span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal"><span>In linux kernel source, there are many .dts files (device tree source)</span></p>

<p class="MsoNormal"><span>For example there is a file ./arch/arm64/boot/dts/arm/juno.dts.</span></p>

<p class="MsoNormal"><span>To tried to make juno.dtb from juno.dts but I don’t know how to do it.</span></p>

<p class="MsoNormal"><span>(by the way, once I did make for the kernel build, junno.dtb file seems to be generated in the same directory)</span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal"><span>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)</span></p>

<p class="MsoNormal" style="text-indent: 10.0pt;"><span>$ dtc -I dts -O dtb -o juno.dtb arch/arm64/boot/dts/arm/juno.dts</span></p>

<p class="MsoNormal" style="text-indent: 10.0pt;"><span>Error: arch/arm64/boot/dts/arm/juno.dts:11.1-9 syntax error</span></p>

<p class="MsoNormal" style="text-indent: 10.0pt;"><span>FATAL ERROR: Unable to parse input tree</span></p>

<p class="MsoNormal"><span>The dtc program cannot process the line below in the .dts file.(line 11)</span></p>

<p class="MsoNormal" style="text-indent: 10.0pt;"><span>#include <dt-bindings/interrupt-controller/arm-gic.h></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal"><span>I don’t know how I should let the preprocessing kick in.</span></p>

<p class="MsoNormal"><span>I tried (because there is include/dt-bindings/interrupt-controller/arm-gic.h)</span></p>

<p class="MsoNormal"><span>  $ dtc -i include -I dts -O dtb -o juno.dtb arch/arm64/boot/dts/arm/juno.dts</span></p>

<p class="MsoNormal"><span>But it doesn’t work.</span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal"><span>How can I use dtc program to make juno.dtb?</span></p>

<p class="MsoNormal"><span>Or if I have to use Makefile, what is the command?</span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal"><span>Thanks, </span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal"><span>Chan Kim</span></p>
</div>
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org <a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></div>
</div>
</div>
</div>
</div></div></body></html>