Problem in creating dtb file using dtc (FATAL ERROR: Unable to parse input tree)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem in creating dtb file using dtc (FATAL ERROR: Unable to parse input tree)

13,014 Views
nagireddychitta
Contributor III

Dear All,

I am trying to create dtb file using the below command  "dtc -I dts -O dtb -o ls1021a-twr.dtb ls1021a-twr.dts" and i see the below errors

Error: ls1021a-twr.dts:10.1-2 syntax error

FATAL ERROR: Unable to parse input tree

I then checked dtsi and dts files and do not see anything obvious as they are the default files as part of SDK.

Had anyone seen this issue in the forum pls?

--Nagi

4 Replies

804 Views
Harvey021
NXP TechSupport
NXP TechSupport

@paul_walker123 Plese raise a new case along with which product you expect to build. 

 

Best regards

Harvey

0 Kudos

5,095 Views
nagireddychitta
Contributor III

Hi,

I could resolve one problem with #include syntax. It seems i need to give /include/ instead of #include while include any files.

Now the issue is with #defines which are in my C header files.

I am still getting the same error when i try to generate the dtb file with these C header files included from .dtsi file.

Is there any different syntax for #define macros as well?

Anyone pls?

Regards,

Nagi

5,095 Views
Pavel
NXP Employee
NXP Employee

It looks like it is happens since this .dts file contains “#include” directives.

The simplest way is the following. Use bitbake commands for kernel, filesystem and dtb file building. For example, use the following command:

bitbake fsl-image-minimal

Generate dts file from dtb file using the following commands:

dtc -I dtb -O dts -o ls1021a-twr.dts ls1021a-twr.dtb

Change the .dts file.

Generate dtb file from dts file using the following commands:

dtc -I dts -O dtb -o ls1021a-twr.dtb ls1021a-twr.dts


Have a great day,
Pavel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

843 Views
paul_walker123
Contributor II

Quick Question: Where we are supposed to run the bitbake command : 'bitbake fsl-image-minimal' . Any particular file location?

@Pavel @Harvey021 @Tia_Lan 

0 Kudos