Android系统-Ubuntu21.04编译RK3399_android10问题汇总
Posted 有头发的猿
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android系统-Ubuntu21.04编译RK3399_android10问题汇总相关的知识,希望对你有一定的参考价值。
一.uboot:parser.tab:multiple definition of `yylloc’;
/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
Build uboot failed!
解决办法:
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
或者
diff --git a/u-boot/scripts/dtc/dtc-lexer.l b/u-boot/scripts/dtc/dtc-lexer.l
index fd825ebba6..24af549977 100644
--- a/u-boot/scripts/dtc/dtc-lexer.l
+++ b/u-boot/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
diff --git a/u-boot/scripts/dtc/dtc-lexer.lex.c_shipped b/u-boot/scripts/dtc/dtc-lexer.lex.c_shipped
index 011bb9632f..79952cd3ca 100644
--- a/u-boot/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/u-boot/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -631,7 +631,6 @@ char *yytext;
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
二.kernel:parser.tab:multiple definition of `yylloc’;
/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
LDS arch/arm64/kernel/vdso/vdso.lds
VDSOA arch/arm64/kernel/vdso/gettimeofday.o
VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:99: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:637: scripts/dtc] Error 2
make[1]: *** Waiting for unfinished jobs....
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
VDSOSYM include/generated/vdso-offsets.h
HOSTLD scripts/genksyms/genksyms
HOSTLD scripts/mod/modpost
make: *** [Makefile:1187: scripts] Error 2
#### failed to build some targets (4 seconds) ####
Build kernel failed!
解决办法:
diff --git a/kernel/scripts/dtc/dtc-lexer.l b/kernel/scripts/dtc/dtc-lexer.l
index 615b7ec658..a26c7636c7 100644
--- a/kernel/scripts/dtc/dtc-lexer.l
+++ b/kernel/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,7 @@ LINECOMMENT "//".*\\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
+extern YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
三. uboot:Error: arch/arm/dts/.**.dtb.pre.tmp:291.1-10 syntax error
start=$(/home/soft/workspace/android10/rockchip/rk_1/rk3399_android_10_2020715_74/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/soft/workspace/android10/rockchip/rk_1/rk3399_android_10_2020715_74/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
DTC arch/arm/dts/rk3288-rock2-square.dtb
DTC arch/arm/dts/rk3288-tinker.dtb
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-jerry.dtb
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: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/.rk3368-lion.dtb.pre.tmp:196.1-10 syntax error
FATAL ERROR: Unable to parse input tree
DTC arch/arm/dts/rk3399-puma-ddr1866.dtb
make[2]: *** [scripts/Makefile.lib:319: arch/arm/dts/rk3368-lion.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
Error: arch/arm/dts/.rk3368-sheep.dtb.pre.tmp:288.1-10 syntax error
FATAL ERROR: Unable to parse input tree
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
Error: arch/arm/dts/.rk3328-evb.dtb.pre.tmp:291.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[1]: *** [dts/Makefile:101: arch-dtbs] Error 2
make: *** [Makefile:882: dts/dt.dtb] Error 2
Build uboot failed!
解决办法:
diff --git a/u-boot/arch/arm/dts/Makefile b/u-boot/arch/arm/dts/Makefile
index 594614a2c6..bb22d57db5 100644
--- a/u-boot/arch/arm/dts/Makefile
+++ b/u-boot/arch/arm/dts/Makefile
@@ -28,11 +28,9 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \\
exynos5422-odroidxu3.dtb
dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += \\
- rk3036-sdk.dtb \\
rk3066a-mk808.dtb \\
rk3126-evb.dtb \\
rk3128-evb.dtb \\
- rk3188-radxarock.dtb \\
rk3288-evb.dtb \\
rk3288-fennec.dtb \\
rk3288-firefly.dtb \\
@@ -46,11 +44,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \\
rk3288-veyron-minnie.dtb \\
rk3288-vyasa.dtb \\
rk3308-evb.dtb \\
- rk3328-evb.dtb \\
- rk3368-lion.dtb \\
- rk3368-sheep.dtb \\
- rk3368-geekbox.dtb \\
- rk3368-px5-evb.dtb \\
rk3399-evb.dtb \\
rk3399-firefly.dtb \\
rk3399-puma-ddr1333.dtb \\
以上是关于Android系统-Ubuntu21.04编译RK3399_android10问题汇总的主要内容,如果未能解决你的问题,请参考以下文章
Repo下载编译AOSP源码:基于Ubuntu 21.04,android-12.1.0_r27
Repo下载编译AOSP源码:基于Ubuntu 21.04,android-12.1.0_r27