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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

14,627 次查看
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 回复数

2,417 次查看
Harvey021
NXP TechSupport
NXP TechSupport

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

 

Best regards

Harvey

0 项奖励
回复

6,708 次查看
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

6,708 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

2,456 次查看
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 项奖励
回复