如何在执行 make file_defconfig Android 内核时更改路径?

How do I change the path while executing make file_defconfig Android kernel?

在以下几行之后:

export CROSS_COMPILE=/home/yourusername/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-

make clean && make mrproper

make maker.defconfig 给我这个错误:

Can't find default configuration "arch/x86/configs/filename_defconfig".

它在 x86/configs/filename_defconfig 而不是 arm/configs/filename_defconfig 中搜索。如何更改路径?

您只是缺少一个 export:

export ARCH=arm //Or whatever architecture you're compiling for
export CROSS_COMPILE=/home/yourusername/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
make clean && make mrproper

请注意,您只是以这种方式清理内核构建,要实际编译它,请用这些命令替换 make 命令(您仍然需要导出):

make <target config file>
make -j<number of cores you wish to use for compilation>

您也可以将 export 行直接添加到 make 命令中,如下所示:

make ARCH=arm CROSS_COMPILE=/home/yourusername/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- <make target>