这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 国产MCU » RK3308uboot编译到后面提示dtc文件语法错误是怎么回事

共2条 1/1 1 跳转至

RK3308uboot编译到后面提示dtc文件语法错误是怎么回事

工程师
2023-10-22 19:07:23     打赏

1.jpg

问题描述及复现步骤:

python2 .repo/repo/repo sync -l
python2 .repo/repo/repo sync -c --no-clone-bundle --no-tags
python2 .repo/repo/repo start firefly --all

[ljn@ljn-manjaro build_repo2022]$ ./build.sh roc-rk3308b-cc-plus-buildroot.mk
processing option: roc-rk3308b-cc-plus-buildroot.mk
switching to board: /data/ljn/Sources/Linux_SDK_R3308Y/build_repo2022/device/rockchip/rk3308/roc-rk3308b-cc-plus-buildroot.mk

[ljn@ljn-manjaro build_repo2022]$ ./build.sh uboot
processing option: uboot
============Start building uboot============
TARGET_UBOOT_CONFIG=firefly-rk3308-debug-uart4

make for firefly-rk3308-debug-uart4_defconfig by -j8
HOSTCC  scripts/basic/fixdep
HOSTCC  scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC  scripts/kconfig/zconf.tab.o
HOSTLD  scripts/kconfig/conf

configuration written to .config
scripts/kconfig/conf  --silentoldconfig Kconfig
CHK     include/config.h
UPD     include/config.h
CFG     u-boot.cfg
GEN     include/autoconf.mk.dep
CFG     spl/u-boot.cfg
CFG     tpl/u-boot.cfg
GEN     include/autoconf.mk
GEN     spl/include/autoconf.mk
GEN     tpl/include/autoconf.mk
CHK     include/config/uboot.release
CHK     include/generated/timestamp_autogenerated.h
UPD     include/generated/timestamp_autogenerated.h
HOSTCC  scripts/dtc/dtc.o
HOSTCC  scripts/dtc/flattree.o
HOSTCC  scripts/dtc/fstree.o
HOSTCC  scripts/dtc/data.o
HOSTCC  scripts/dtc/livetree.o
HOSTCC  scripts/dtc/treesource.o
HOSTCC  scripts/dtc/srcpos.o
HOSTCC  scripts/dtc/checks.o
HOSTCC  scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC  scripts/dtc/dtc-lexer.lex.o
HOSTCC  scripts/dtc/dtc-parser.tab.o
CHK     include/config.h
CFG     u-boot.cfg
UPD     include/config/uboot.release
CHK     include/generated/version_autogenerated.h
UPD     include/generated/version_autogenerated.h
CC      lib/asm-offsets.s
CC      arch/arm/lib/asm-offsets.s
CHK     include/generated/asm-offsets.h
UPD     include/generated/asm-offsets.h
HOSTLD  scripts/dtc/dtc
CHK     include/generated/generic-asm-offsets.h
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
UPD     include/generated/generic-asm-offsets.h
collect2: error: ld returned 1 exit status
LDS     u-boot.lds
make[2]: *** [scripts/Makefile.host:108: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:425: scripts/dtc] Error 2
make: *** [Makefile:491: scripts] Error 2
make: *** Waiting for unfinished jobs....
ERROR: Running build_uboot failed!
ERROR: exit code 2 from line 523:
./make.sh RK_UBOOT_DEFCONFIG UBOOT_COMPILE_COMMANDS

把dtc-parser.tab.c_shipped文件里面的yylloc注释掉,能编译通过。但uboot编译到后面又报错,提示dtc文件语法错误:
DTC     arch/arm/dts/rk3126-evb.dtb
DTC     arch/arm/dts/rk3188-radxarock.dtb
DTC     arch/arm/dts/rk3128-evb.dtb
DTC     arch/arm/dts/rk3288-evb.dtb
Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3036-sdk.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
Error: arch/arm/dts/.rk3188-radxarock.dtb.pre.tmp:383.1-10 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3188-radxarock.dtb] Error 1
make[1]: *** [dts/Makefile:72: arch-dtbs] Error 2
make: *** [Makefile:880: dts/dt.dtb] Error 2
make: *** Waiting for unfinished jobs....
ERROR: Running build_uboot failed!
ERROR: exit code 2 from line 523:

./make.sh $RK_UBOOT_DEFCONFIG $UBOOT_COMPILE_COMMANDS

这些dtc文件,使用系统自带的dtc命令,也会报错。




关键词: RK3308     uboot     dtc    

助工
2023-10-22 19:07:43     打赏
2楼

建议用ubuntu18系统进行编译


共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]