我尝试从谷歌官方文件中构建安卓内核,使用官方
build.sh
从头开始,但得到的错误信息如下。
VDSOSYM include/generated/vdso-offsets.h
LDS arch/arm64/kernel/vdso32/vdso.lds
VDSOC32 arch/arm64/kernel/vdso32/vgettimeofday.o
VDSOA32 arch/arm64/kernel/vdso32/sigreturn.o
HOSTCC arch/arm64/kernel/vdso32/../../../arm/vdso/vdsomunge
clang-5.0: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
VDSOL32 arch/arm64/kernel/vdso32/vdso.so.raw
/..//bin/ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386pep i386pe elf64bpf
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/home/tonki/aosp/newkernel/private/msm-google/arch/arm64/kernel/vdso32/Makefile:138: arch/arm64/kernel/vdso32/vdso.so.raw] Error 1
make[2]: *** [arch/arm64/Makefile:242: vdso_prepare] Error 2
make[1]: *** [Makefile:152: sub-make] Error 2
make: *** [Makefile:24: __sub-make] Error 2
我看了一下arch/arm64/kernel/vdso32/Makefile
文件,发现这一行
CC_ARM32 := $(CC) $(CLANG_TARGET_ARM32)
,它用clang --target=arm-linux-androideabi
来链接vdso32.raw图像,但用/usr/bin/ld
来链接。
我的操作系统是Arch Linux发行版,没有gcc-arm-linux-androideabi
的官方软件包,我可以用pacman像Ubuntu的apt工具来安装。
分支。AOSP kernel/android-msm-crosshatch-4.9-pie-qpr2。
Device: Pixel 3XL.
Kernel-config: official b1c1_defconfig(arch/arm64/configs/b1c1_defconfig)。
问题。我怎样才能解决这个问题?我在这里没有想法,谢谢