cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jackfrye11
Explorer
Explorer
4,146 Views
Registered: ‎10-19-2017

Cannot Make Device Tree Compiler

Jump to solution

I have the PetaLinux repo on my server. I am trying to use make to build the dtc executable referenced here

http://www.wiki.xilinx.com/Build+Device+Tree+Blob

 

in order to build dts into dtb so I can use that in my PetaLinux build to configure peripherals in the PS.

 

I cd into <Linux-xlnx-master>/scripts/dtc

and try the make command but I get:

make: *** No rule to make target `/dtc-parser.tab.h', needed by `/dtc-lexer.lex.o'.  Stop.

 

Do I need to build the entire kernel to get the dtc to build or am I just looking in the wrong place? I believe I did do a whole compile of the project yesterday and it took the better part of an afternoon, so I would like to try to avoid doing that again.

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions
imgignacio
Explorer
Explorer
5,106 Views
Registered: ‎11-24-2013

Hi @jackfrye11,

 

 

the dtc compiler and the kernel are different things. I'm afraid you are looking on the wrong place. The information to build the dtc can be found here: http://www.wiki.xilinx.com/Build+Device+Tree+Compiler+%28DTC%29.

 

You have to download this repo (https://git.kernel.org/pub/scm/utils/dtc/dtc.git) to make the dtc.

 

Anyway, there is an easier way if you are using Ubuntu: you can download a package with dtc:

sudo apt-get install device-tree-compiler

And then you will be able to execute "dtc" on your terminal emulator.

 

Regards,

Ignacio

 

View solution in original post

0 Kudos
3 Replies
imgignacio
Explorer
Explorer
5,107 Views
Registered: ‎11-24-2013

Hi @jackfrye11,

 

 

the dtc compiler and the kernel are different things. I'm afraid you are looking on the wrong place. The information to build the dtc can be found here: http://www.wiki.xilinx.com/Build+Device+Tree+Compiler+%28DTC%29.

 

You have to download this repo (https://git.kernel.org/pub/scm/utils/dtc/dtc.git) to make the dtc.

 

Anyway, there is an easier way if you are using Ubuntu: you can download a package with dtc:

sudo apt-get install device-tree-compiler

And then you will be able to execute "dtc" on your terminal emulator.

 

Regards,

Ignacio

 

View solution in original post

0 Kudos
jackfrye11
Explorer
Explorer
4,065 Views
Registered: ‎10-19-2017

$: <path>/dtc-1.4.5/dtc -I dts -O dtb -o <path>/test-tree.dtb <path>/project10172017p1e2016.4/petaproject/components/plnx_workspace/device-tree-generation/plx_arm-system.dts


Error: <path>/project10172017p1e2016.4/petaproject/components/plnx_workspace/device-tree-generation/plx_arm-system.dts:2.1-31 syntax error

 

How do you invoke the device tree compiler?

0 Kudos
imgignacio
Explorer
Explorer
4,047 Views
Registered: ‎11-24-2013

Hallo @jackfrye11,

 

what you wrote is correct, but dtc is complaining about a sintax error on the dts file. If you are on a Petalinux project, the dts to compile is normally called "system-top" and it includes all other files.

 

Regards

Ignacio

0 Kudos