arch/arm/dts/.fsl-imx8mq-evk.dtb.pre.tmp:618.1-10 syntax error

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

arch/arm/dts/.fsl-imx8mq-evk.dtb.pre.tmp:618.1-10 syntax error

1,740 次查看
tachyontechnologiesahm
Contributor I

I have been trying to build the android for iWave board designed with iMX8MM on top of it. While compiling the android for the EVK there is no error reported on the device tree compilation in uboot. But while compiling for the specific board getting below error.

 

Error: arch/arm/dts/.fsl-imx8mq-evk.dtb.pre.tmp:618.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[3]: *** [scripts/Makefile.lib:329: arch/arm/dts/fsl-imx8mq-evk.dtb] Error 1
make[3]: *** Waiting for unfinished jobs....
Error: arch/arm/dts/.fsl-imx8mq-ddr4-arm2.dtb.pre.tmp:512.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[3]: *** [scripts/Makefile.lib:329: arch/arm/dts/fsl-imx8mq-ddr4-arm2.dtb] Error 1
Error: arch/arm/dts/.fsl-imx8mq-ddr3l-arm2.dtb.pre.tmp:562.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[3]: *** [scripts/Makefile.lib:329: arch/arm/dts/fsl-imx8mq-ddr3l-arm2.dtb] Error 1
Error: arch/arm/dts/.fsl-imx8mq-phanbell.dtb.pre.tmp:747.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[3]: *** [scripts/Makefile.lib:329: arch/arm/dts/fsl-imx8mq-phanbell.dtb] Error 1

 

This error comes with out any changes in the mentioned files. I have not modified the source of uboot.

Can someone please help in resolving the issue/ guide where should I look forward to resolve the build issue.

标记 (1)
0 项奖励
回复
3 回复数

824 次查看
craigmcqueenir
Contributor IV

I have encountered this with an old version of U-Boot, v2017.09. I traced it to scripts/Makefile.lib.

 

Fix error generating temporary dts files

    | Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error
    | FATAL ERROR: Unable to parse input tree

It was due to the makefile backslash-escaping the hash character when
outputting a #include line for the generated dts file.

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 8d5ca02c143..41106b0fced 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -308,7 +308,7 @@ quiet_cmd_dtc = DTC     $@
 # Modified for U-Boot
 # Bring in any U-Boot-specific include at the end of the file
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
-       (cat $<; $(if $(u_boot_dtsi),echo '\#include "$(u_boot_dtsi)"')) > $(pre-tmp); \
+       (cat $<; $(if $(u_boot_dtsi),echo '#include "$(u_boot_dtsi)"')) > $(pre-tmp); \
        $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \
        $(DTC) -O dtb -o $@ -b 0 \
                -i $(dir $<) $(DTC_FLAGS) \

 

899 次查看
chillinwithscb
Contributor III

I get the same error. Sadly, no on has provided an answer and I don't have one either. But I'll add what I've learned about the error/condition.

Per: "Error: arch/arm/dts/.fsl-imx8mq-evk.dtb.pre.tmp:618.1-10 syntax error", I found the file, arch/arm/dts/.fsl-imx8mq-evk.dtb.pre.tmp and at line 618 I see:

\#include "fsl-imx8mq-evk-u-boot.dtsi"

I assume 1-10 refers to columns of that line which is : "\#include". That looks suspicious. I think it should not start with a backslash. If I remove the backslash and rebuild, the build fails the same way and the backslash comes back! I assume this file is generated. Gods, this is why I hate this build. An error occurs in a generated file. Changing the offending file has no effect.

Searching the codebase for the file name (.fsl-imx8mq-ddr4-arm2.dtb.pre.tmp) returns four hits – in other tmp (generated?) files. What genius invented this? I call them a genius since they are. Geniuses suck! They invent complex stuff. I want simple stuff.

Googling finds that you can include via “/include/” or “#include”. No mention of “\#include”

IDK whether it’s supposed to be “/include/” or “#include” and IDK how to change it to either.

0 项奖励
回复

873 次查看
chillinwithscb
Contributor III

FYI: I am building for the Audinate eval kit which has an imx8mm.

The fix for this issue, for me, was to use an Ubuntu 18 build host (a docker container). I had been using Ubuntu 24, and another guy got the same errors with Ubuntu 22. Audinate techs told me they use 18. So, I am now using 18 and don't get these errors.

Surely, it's not the version of Ubuntu that directly matters. I assume the issue is with the tools that the build uses. And each Ubuntu release supports a set of tools up to a maximum version for each. So, the tools that Ubuntu 18 allows is what the build needs. I wish I knew which tool(s) and version(s) were that caused the issue. I'll probably never know.

0 项奖励
回复