如何修复vmlinux.o错误和交叉编译错误

时间:2019-03-25 12:29:33

标签: android linux kernel cross-compiling

我是内核中的菜鸟。首先,我的问题是关于交叉编译。当我尝试export CROSS_COMPILE时遇到错误:

export CROSS_COMPILE=/root/Downloads/android-ndk-r20-beta1/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-eabi-
export ARCH=arm
make clean
/root/Desktop/kek/android_kernel_lge_g3-lineage-16.0/scripts/gcc-version.sh: line 25: /root/Downloads/android-ndk-r20-beta1/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-eabi-gcc: No such file or directory

第二个错误是vmlinux编译时错误。

make -no-pie

然后错误

ld: cannot find arch/x86/kernel/head_64.o: No such file or directory
ld: cannot find arch/x86/kernel/head64.o: No such file or directory
ld: cannot find arch/x86/kernel/head.o: No such file or directory
ld: cannot find arch/x86/kernel/init_task.o
ld: cannot find init/built-in.o 
make: *** [Makefile:938: vmlinux.o] Error 1  `

我的内核是https://github.com/LineageOS/android_kernel_lge_g3,配置是defconfig

0 个答案:

没有答案