xieyangly 发表于 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) ####

HOSTCCscripts/basic/fixdep
HOSTCCscripts/basic/bin2c
HOSTCCscripts/kconfig/conf.o
HOSTCCscripts/kconfig/zconf.tab.o
HOSTLDscripts/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
HOSTCCscripts/kallsyms
HOSTCCscripts/pnmtologo
HOSTCCscripts/sortextable
HOSTCCscripts/genksyms/genksyms.o
CHK   include/generated/utsrelease.h
HOSTCCscripts/genksyms/parse.tab.o
HOSTCCscripts/genksyms/lex.lex.o
HOSTCCscripts/dtc/dtc.o
HOSTCCscripts/dtc/flattree.o
HOSTCCscripts/dtc/fstree.o
CC      scripts/mod/empty.o
HOSTCCscripts/dtc/data.o
HOSTCCscripts/selinux/genheaders/genheaders
HOSTCCscripts/mod/mk_elfconfig
HOSTCCscripts/selinux/mdp/mdp
HOSTCCscripts/dtc/livetree.o
CC      kernel/bounds.s
CC      scripts/mod/devicetable-offsets.s
CHK   include/generated/timeconst.h
HOSTCCscripts/dtc/treesource.o
HOSTCCscripts/dtc/srcpos.o
HOSTCCscripts/dtc/checks.o
MKELF   scripts/mod/elfconfig.h
CHK   scripts/mod/devicetable-offsets.h
HOSTCCscripts/dtc/util.o
HOSTCCscripts/mod/sumversion.o
HOSTCCscripts/dtc/dtc-lexer.lex.o
CHK   include/generated/bounds.h
CC      arch/arm64/kernel/asm-offsets.s
HOSTCCscripts/mod/modpost.o
HOSTCCscripts/dtc/dtc-parser.tab.o
HOSTCCscripts/mod/file2alias.o
HOSTLDscripts/genksyms/genksyms
HOSTLDscripts/dtc/dtc
CHK   include/generated/asm-offsets.h
CALL    scripts/checksyscalls.sh
HOSTLDscripts/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: *** Error 1
arch/arm64/Makefile:122: recipe for target 'rockchip/ok3399.dtb' failed
make: *** Error 2
make: *** Waiting for unfinished jobs....

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

Build kernel failed!


倔强的土坷垃 发表于 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 302019 pwm.h

xieyangly 发表于 2021-2-21 09:44:16

应该是头文件搜索路径有问题,如果我使用相对路径指定特定的头文件就不报这个错。但是其他的头文件引用报错

倔强的土坷垃 发表于 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 目录

xieyangly 发表于 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系统编译没有通过。下边贴上解压文件的结尾部分日志和编译系统结尾部分的日志。完整日志参见附件


ExtractingOK3399-android7-source/abi
ExtractingOK3399-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.jar2>&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: *** Error 1

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

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

倔强的土坷垃 发表于 2021-2-21 13:50:17

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

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

xieyangly 发表于 2021-3-3 07:30:22

倔强的土坷垃 发表于 2021-2-21 13:50
通过我们的销售给您发了解决办法

通过你给的方法,问题已解决
页: [1]
查看完整版本: 按照安卓手册的指导,安卓系统编译出错