嵌入式爱好者

查看: 18109|回复: 6

[Android] 按照安卓手册的指导,安卓系统编译出错

[复制链接]

1

主题

4

帖子

12

积分

RK3399通行证

扫一扫,手机访问本帖
发表于 2021-2-16 18:27:37 | 显示全部楼层 |阅读模式
实体机其上部署的docker。

日志如下:

root@993c600bdb31:~/workspace/rk3399/OK3399-android7-source# ./build-rk3399-all.sh -u
will build update.img
Start build kernel
  CLEAN   .
  CLEAN   .tmp_versions

#### make completed successfully (4 seconds) ####

  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

#### make completed successfully (1 seconds) ####

scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/genksyms/genksyms.o
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/dtc/livetree.o
  CC      kernel/bounds.s
  CC      scripts/mod/devicetable-offsets.s
  CHK     include/generated/timeconst.h
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  MKELF   scripts/mod/elfconfig.h
  CHK     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  CHK     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/genksyms/genksyms
  HOSTLD  scripts/dtc/dtc
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  HOSTLD  scripts/mod/modpost
  DTC     arch/arm64/boot/dts/rockchip/ok3399.dtb
arch/arm64/boot/dts/rockchip/ok3399.dts:45:33: fatal error: dt-bindings/pwm/pwm.h: No such file or directory
#include "dt-bindings/pwm/pwm.h"
                                 ^
compilation terminated.
scripts/Makefile.lib:314: recipe for target 'arch/arm64/boot/dts/rockchip/ok3399.dtb' failed
make[1]: *** [arch/arm64/boot/dts/rockchip/ok3399.dtb] Error 1
arch/arm64/Makefile:122: recipe for target 'rockchip/ok3399.dtb' failed
make: *** [rockchip/ok3399.dtb] Error 2
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (3 seconds) ####

Build kernel failed!


回复

使用道具 举报

0

主题

123

帖子

214

积分

发表于 2021-2-21 08:32:11 | 显示全部楼层
报错信息显示找不到pwm.h这个头文件,可以看看对应的路劲下是否有此文件,并查看其权限是否正常以及是否能正常打开编辑。
OK3399-android7-source/kernel/include/dt-bindings/pwm$ls -l
-rw-r--r-- 1 forlinx forlinx 355 Dec 30  2019 pwm.h
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

12

积分

RK3399通行证

 楼主| 发表于 2021-2-21 09:44:16 | 显示全部楼层
应该是头文件搜索路径有问题,如果我使用相对路径指定特定的头文件就不报这个错。但是其他的头文件引用报错
点评回复 支持 反对

使用道具 举报

0

主题

123

帖子

214

积分

发表于 2021-2-21 10:55:07 | 显示全部楼层
Android7.1.2 系统的源码包 OK3399-android7-source.7z.00*(共 5 个分卷压缩包)位于 OK3399-C (Android)用户资料\Android\源码目录下。将它拷贝到 ubuntu /work/目录;
首先解压 Android 源码,解压命令如下:
$ cd /work/
$7za x OK3399-android7-source.7z.001 -r -o./ -y
解压到最后会报 Sub items Errors: 1,该信息不影响正常编译,可忽略。


2.3.2 编译 Android 文件系统
OK3399 平台 android 系统编译部分支持全部编译和部分编译两种方式,全部编译时将自动编译所
有内容并打包成可以直接用于烧写的镜像。部分编译主要用于产品开发阶段,可以单独编译 u-boot、linux
内核设备树或者 android 系统。
1. 配置编译环境
进入该目录,执行以下命令:
$ cd /work/OK3399-android7-source
$ source build/envsetup.sh
$ lunch rk3399_all-userdebug
2. 全部编译
$ ./build-rk3399-all.sh -u
由于 android 系统过于庞大,编译时间略长,请耐心等待编译完成,编译完成的镜像位于:
rockdev/Image-rk3399_all 目录

点评

重新解压了,内核编译通过了。但是android系统编译没有通过 Extracting OK3399-android7-source/abi Extracting OK3399-android7-source Sub items Errors: 1 root@993c600bdb31:~/workspace/rk3399# ls  详情 回复 发表于 2021-2-21 13:24
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

12

积分

RK3399通行证

 楼主| 发表于 2021-2-21 13:24:18 | 显示全部楼层
本帖最后由 xieyangly 于 2021-2-21 13:27 编辑
倔强的土坷垃 发表于 2021-2-21 10:55
Android7.1.2 系统的源码包 OK3399-android7-source.7z.00*(共 5 个分卷压缩包)位于 OK3399-C (Android ...

重新解压了,内核编译通过了。但是android系统编译没有通过。下边贴上解压文件的结尾部分日志和编译系统结尾部分的日志。完整日志参见附件


Extracting  OK3399-android7-source/abi
Extracting  OK3399-android7-source

Sub items Errors: 1

。。。。。。。。。

[ 16% 5007/31026] Ensure Jack server is installed and started
FAILED: /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tool                      s/jack-server-4.8.ALPHA.jar  2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\"                       prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/                      tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools                      /jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/ja                      ck-3.36.CANDIDATE.jar 3.36.CANDIDATE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.                      7.BETA.jar 4.7.BETA || exit 47 )"
Jack server already installed in "/root/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -                      cp /root/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
No Jack server running. Try 'jack-admin start-server'
No Jack server running. Try 'jack-admin start-server'
[ 16% 5007/31026] target Prebuilt: webview (out/target/product/rk3399_all/obj/APPS/webview_intermediates/package.apk)
Archive:  out/target/product/rk3399_all/obj/APPS/webview_intermediates/package.apk
  inflating: out/target/product/rk3399_all/obj/APPS/webview_intermediates/uncompressedlibs/lib/arm64-v8a/libwebviewchromium.s                      o
  inflating: out/target/product/rk3399_all/obj/APPS/webview_intermediates/uncompressedlibs/lib/armeabi-v7a/libwebviewchromium                      .so
deleting: lib/arm64-v8a/libwebviewchromium.so
deleting: lib/armeabi-v7a/libwebviewchromium.so
  adding: lib/arm64-v8a/libwebviewchromium.so (stored 0%)
  adding: lib/armeabi-v7a/libwebviewchromium.so (stored 0%)
[ 16% 5007/31026] target Prebuilt: rkmcapp-armeabi-v7a-debug_...obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/package.apk)
Archive:  out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/package.apk
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libXBMC_addon-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libxbmpeg2.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libRKvcodec_mpi-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libImageLib-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libRKCodec-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libsmbclient.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libgif.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libdvdnav-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libplist.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libexif-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      librkmc.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libXBMC_pvr-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      lib_imagingft.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libXBMC_codec-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      librtmp.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libxbmpeg2convert.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libnfs.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libKODI_guilib-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libass.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libKODI_audioengine-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libdvdcss-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      lib_imagingmath.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libbluray.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libxbvorbis.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libcpluff-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      lib_imaging.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libxbvorbisfile.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libxbogg.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libKODI_adsp-arm.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libshairplay.so
  inflating: out/target/product/rk3399_all/obj/APPS/rkmcapp-armeabi-v7a-debug_intermediates/uncompressedlibs/lib/armeabi-v7a/                      libcurl.so
deleting: lib/armeabi-v7a/libXBMC_addon-arm.so
deleting: lib/armeabi-v7a/libxbmpeg2.so
deleting: lib/armeabi-v7a/libRKvcodec_mpi-arm.so
deleting: lib/armeabi-v7a/libImageLib-arm.so
deleting: lib/armeabi-v7a/libRKCodec-arm.so
deleting: lib/armeabi-v7a/libsmbclient.so
deleting: lib/armeabi-v7a/libgif.so
deleting: lib/armeabi-v7a/libdvdnav-arm.so
deleting: lib/armeabi-v7a/libplist.so
deleting: lib/armeabi-v7a/libexif-arm.so
deleting: lib/armeabi-v7a/librkmc.so
deleting: lib/armeabi-v7a/libXBMC_pvr-arm.so
deleting: lib/armeabi-v7a/lib_imagingft.so
deleting: lib/armeabi-v7a/libXBMC_codec-arm.so
deleting: lib/armeabi-v7a/librtmp.so
deleting: lib/armeabi-v7a/libxbmpeg2convert.so
deleting: lib/armeabi-v7a/libnfs.so
deleting: lib/armeabi-v7a/libKODI_guilib-arm.so
deleting: lib/armeabi-v7a/libass.so
deleting: lib/armeabi-v7a/libKODI_audioengine-arm.so
deleting: lib/armeabi-v7a/libdvdcss-arm.so
deleting: lib/armeabi-v7a/lib_imagingmath.so
deleting: lib/armeabi-v7a/libbluray.so
deleting: lib/armeabi-v7a/libxbvorbis.so
deleting: lib/armeabi-v7a/libcpluff-arm.so
deleting: lib/armeabi-v7a/lib_imaging.so
deleting: lib/armeabi-v7a/libxbvorbisfile.so
deleting: lib/armeabi-v7a/libxbogg.so
deleting: lib/armeabi-v7a/libKODI_adsp-arm.so
deleting: lib/armeabi-v7a/libshairplay.so
deleting: lib/armeabi-v7a/libcurl.so
  adding: lib/armeabi-v7a/libImageLib-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libKODI_adsp-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libKODI_audioengine-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libKODI_guilib-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libRKCodec-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libRKvcodec_mpi-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libXBMC_addon-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libXBMC_codec-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libXBMC_pvr-arm.so (stored 0%)
  adding: lib/armeabi-v7a/lib_imaging.so (stored 0%)
  adding: lib/armeabi-v7a/lib_imagingft.so (stored 0%)
  adding: lib/armeabi-v7a/lib_imagingmath.so (stored 0%)
  adding: lib/armeabi-v7a/libass.so (stored 0%)
  adding: lib/armeabi-v7a/libbluray.so (stored 0%)
  adding: lib/armeabi-v7a/libcpluff-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libcurl.so (stored 0%)
  adding: lib/armeabi-v7a/libdvdcss-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libdvdnav-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libexif-arm.so (stored 0%)
  adding: lib/armeabi-v7a/libgif.so (stored 0%)
  adding: lib/armeabi-v7a/libnfs.so (stored 0%)
  adding: lib/armeabi-v7a/libplist.so (stored 0%)
  adding: lib/armeabi-v7a/librkmc.so (stored 0%)
  adding: lib/armeabi-v7a/librtmp.so (stored 0%)
  adding: lib/armeabi-v7a/libshairplay.so (stored 0%)
  adding: lib/armeabi-v7a/libsmbclient.so (stored 0%)
  adding: lib/armeabi-v7a/libxbmpeg2.so (stored 0%)
  adding: lib/armeabi-v7a/libxbmpeg2convert.so (stored 0%)
  adding: lib/armeabi-v7a/libxbogg.so (stored 0%)
  adding: lib/armeabi-v7a/libxbvorbis.so (stored 0%)
  adding: lib/armeabi-v7a/libxbvorbisfile.so (stored 0%)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (10:00 (mm:ss)) ####

Build android failed!
root@993c600bdb31:~/workspace/rk3399/OK3399-android7-source#

android编译日志.zip

112.23 KB, 下载次数: 0, 下载积分: 贡献 1

点评

通过我们的销售给您发了解决办法  详情 回复 发表于 2021-2-21 13:50
点评回复 支持 反对

使用道具 举报

0

主题

123

帖子

214

积分

发表于 2021-2-21 13:50:17 | 显示全部楼层
xieyangly 发表于 2021-2-21 13:24
重新解压了,内核编译通过了。但是android系统编译没有通过。下边贴上解压文件的结尾部分日志和编译系统 ...

通过我们的销售给您发了解决办法

点评

通过你给的方法,问题已解决  详情 回复 发表于 2021-3-3 07:30
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

12

积分

RK3399通行证

 楼主| 发表于 2021-3-3 07:30:22 | 显示全部楼层
倔强的土坷垃 发表于 2021-2-21 13:50
通过我们的销售给您发了解决办法

通过你给的方法,问题已解决
点评回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-22 04:04

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表