クロスコンパイルツールチェーンの変更方法

1180 ワード

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