如何修改交叉编译工具链

vim  kernel/Makefile

ifeq ($(ARCH),arm64)
ifneq ($(wildcard ../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9),)
CROSS_COMPILE   ?= ../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
endif
endif
ifeq ($(ARCH),arm)
ifneq ($(wildcard ../prebuilts/gcc/linux-x86/arm/gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi),)
CROSS_COMPILE   ?= ../prebuilts/gcc/linux-x86/arm/gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi/bin/arm-eabi-
endif
endif
CROSS_COMPILE   ?= $(CONFIG_CROSS_COMPILE:"%"=%)

我的SDK 交叉编译工具链有

guomingbao@qytech-02:~/RV1108Linux-SDk$ ll prebuilts/gcc/linux-x86/arm/

drwxrwxr-x 4 guomingbao guomingbao 4096 Jul 22 14:51 ./
drwxrwxr-x 3 guomingbao guomingbao 4096 Jul 22 14:51 ../
drwxrwxr-x 8 guomingbao guomingbao 4096 Jul 22 14:51 arm-eabi-4.6/
drwxrwxr-x 8 guomingbao guomingbao 4096 Jul 22 14:52 gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi/

 所以如果需要修改只需要更改:

ifeq ($(ARCH),arm)
ifneq ($(wildcard ../prebuilts/gcc/linux-x86/arm/gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi),)
CROSS_COMPILE   ?= ../prebuilts/gcc/linux-x86/arm/gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi/bin/arm-eabi-
endif

你可能感兴趣的:(Linux,学习)