查看: 1448|回复: 0

tinker board 2s 编译过程

[复制链接]

3

主题

9

回帖

87

积分

注册会员

Rank: 2

积分
87
发表于 2023-10-31 16:39:04 | 显示全部楼层 |阅读模式
(为了高效,请按如下格式提问)

硬件主板型号:tinker board 2s
固件名称/系统版本:Android 11
自编的或固件下载地址:
Log日志: (可以导出,用TXT附件上传)

问题描述及复现步骤:
2023年10月22日 周日

报错1:

/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

collect2: error: ld returned 1 exit status

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




解决办法:

diff --git a/u-boot/scripts/dtc/dtc-parser.tab.c_shipped b/u-boot/scripts/dtc/dtc-parser.tab.c_shipped

index aea514fa69..e70924a8ce 100644

--- a/u-boot/scripts/dtc/dtc-parser.tab.c_shipped

+++ b/u-boot/scripts/dtc/dtc-parser.tab.c_shipped

@@ -1202,7 +1202,7 @@ int yychar;

/* The semantic value of the lookahead symbol.  */

YYSTYPE yylval;

/* Location data for the lookahead symbol.  */

-YYLTYPE yylloc

+extern YYLTYPE yylloc

# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL

   =  1, 1, 1, 1

# endif






报错2

Error: arch/arm/dts/.rk3036-sdk.dtb.pre.tmp:77.1-10 syntax error

FATAL ERROR: Unable to parse input tree

  DTC     arch/arm/dts/rk3288-veyron-minnie.dtb

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3036-sdk.dtb] Error 1

make[2]: *** Waiting for unfinished jobs....

  DTC     arch/arm/dts/rk3288-vyasa.dtb

arch/arm/dts/rk3126-evb.dtb: Warning (reg_format): "reg" property in /syscon@20008000/usb2-phy@17c has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)

arch/arm/dts/rk3126-evb.dtb: Warning (avoid_default_addr_size): Relying on default #address-cells value for /syscon@20008000/usb2-phy@17c

arch/arm/dts/rk3126-evb.dtb: Warning (avoid_default_addr_size): Relying on default #size-cells value for /syscon@20008000/usb2-phy@17c

arch/arm/dts/rk3128-evb.dtb: Warning (reg_format): "reg" property in /syscon@20008000/usb2-phy@17c has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)

arch/arm/dts/rk3128-evb.dtb: Warning (avoid_default_addr_size): Relying on default #address-cells value for /syscon@20008000/usb2-phy@17c

arch/arm/dts/rk3128-evb.dtb: Warning (avoid_default_addr_size): Relying on default #size-cells value for /syscon@20008000/usb2-phy@17c

Error: arch/arm/dts/.rk3188-radxarock.dtb.pre.tmp:383.1-10 syntax error

FATAL ERROR: Unable to parse input tree

start=$(/home/yxl/tinker_Board_2s_Android11/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm u-boot | grep __rel_dyn_start | cut -f 1 -d ' '); end=$(/home/yxl/tinker_Board_2s_Android11/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm u-boot | grep __rel_dyn_end | cut -f 1 -d ' '); tools/relocate-rela u-boot-nodtb.bin 0x00200000 $start $end

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3188-radxarock.dtb] Error 1

make[1]: *** [dts/Makefile:101: arch-dtbs] Error 2

make: *** [Makefile:882: dts/dt.dtb] Error 2

make: *** Waiting for unfinished jobs....

Build uboot failed!



-----------------------------

Error: arch/arm/dts/.rk3328-evb.dtb.pre.tmp:301.1-10 syntax error

FATAL ERROR: Unable to parse input tree

Error: arch/arm/dts/.rk3368-sheep.dtb.pre.tmp:288.1-10 syntax error

FATAL ERROR: Unable to parse input tree

Error: arch/arm/dts/.rk3368-lion.dtb.pre.tmp:196.1-10 syntax error

FATAL ERROR: Unable to parse input tree

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3328-evb.dtb] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3368-lion.dtb] Error 1

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3368-sheep.dtb] Error 1

Error: arch/arm/dts/.rk3368-px5-evb.dtb.pre.tmp:335.1-10 syntax error

FATAL ERROR: Unable to parse input tree

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3368-px5-evb.dtb] Error 1

Error: arch/arm/dts/.rk3368-geekbox.dtb.pre.tmp:320.1-10 syntax error

FATAL ERROR: Unable to parse input tree

make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3368-geekbox.dtb] Error 1

make[1]: *** [dts/Makefile:101: arch-dtbs] Error 2

make: *** [Makefile:882: dts/dt.dtb] Error 2

Build uboot failed!




解决办法:

1. vi  u-boot/Makefile 添加 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)   位置的话理论上讲只要是没有if判断影响执行这句语句的位置都可以;

2. vi u-boot/arch/arm/dts/Makefile  CONFIG_ARCH_ROCKCHIP内把报错的dtb删掉;一般就是rk3036-sdk.dtb、rk3188-radxarock.dtb、rk3368-lion.dtb、rk3368-sheep.dtb、rk3368-geekbox.dtb、rk3368-px5-evb.dtb,我记得还有1~2个报错的dtb文件,请根据错误自行删除;

3. vi u-boot/scripts/dtc/dtc-lexer.l  搜索yylloc  把-YYLTYPE yylloc 整行删掉;

4.vi u-boot/scripts/dtc/dtc-lexer.lex.c_shipped 搜索yylloc 把-YYLTYPE yylloc 整行删掉;

报错3:

awk: line 2: function strtonum never defined




解决办法:

sudo apt-get install gawk

报错4:

error, forbidden warning

报错5:

/bin/sh: 1: lz4c: not found




报错4解决办法:

1、makefile文件的KBUILD_CFLAGS增加-w

diff --git a/kernel/Makefile b/kernel/Makefile

index 357bb313ad..44b1f794e5 100644

--- a/kernel/Makefile

+++ b/kernel/Makefile

@@ -463,6 +463,7 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \

                   -fno-strict-aliasing -fno-common -fshort-wchar \

                   -Werror-implicit-function-declaration \

                   -Werror=return-type -Wno-format-security \

+                  -w \

                   -std=gnu89

KBUILD_CPPFLAGS := -D__KERNEL__

KBUILD_AFLAGS_KERNEL :=




2、gcc-wrapper.py中注释掉interpret_warning(line)即可

kernel\msm-4.9\scripts\gcc-wrapper.py

proc = subprocess.Popen(args, stderr=subprocess.PIPE)

        for line in proc.stderr:

            print >> sys.stderr, line,

            #interpret_warning(line) #注释掉这行






报错5解决办法:

sudo apt-get install liblz4-tool

报错6

error: hardware/rockchip/librga/Android.bp:18:1: module "gen_rga_api_version": module source path "hardware/rockchip/librga/.git" does not exist

error: hardware/rockchip/libmpimmz/Android.bp:7:1: module "gen_mmz_version": module source path "hardware/rockchip/libmpimmz/.git" does not exist




解决办法

由repo仓管理切换为单git仓管理,进行编译报错,删除对应.git即可


这是我编译过程的遇到的问题 已编译成功


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|风火轮WIKI|手机版|小黑屋|深圳风火轮团队 ( 粤ICP备17095099号 )

GMT+8, 2024-6-25 20:44 , Processed in 0.048959 second(s), 19 queries .

快速回复 返回顶部 返回列表
 
【客服1】 商务合作 15289193
【客服2】 业务洽谈 13257599
【客服3】 售前咨询 510313198
【邮箱】
smartfire@smartfire.cn