diff --git a/.gitignore b/.gitignore index 6cc3cfb99..5ca55b21c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,7 @@ Module.symvers modules.order +compile_commands.json -output/ \ No newline at end of file +.cache/ +output/ diff --git a/Makefile b/Makefile index ca710d2dd..5b9b35d6d 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,11 @@ # Path information #******************************************************************************* LOCAL_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) -KERNEL_DIR ?= $(realpath $(LOCAL_DIR)/../../../linux_5.10) + +# SDK directories +SDK_TOP ?= $(HOME)/Source/15-SG200x/01-MilkDuo/02-Project/SDK_SG200x_V2.0.0 +KERNEL_DIR ?= $(SDK_TOP)/linux_5.10/build/sg2000_milkv_duos_glibc_arm64_sd +TOOLCHAIN_DIR ?= $(SDK_TOP)/host-tools/gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin # Subdirectory @@ -19,25 +23,32 @@ INSTALL_DIR ?= $(LOCAL_DIR)/__install #$(info Output directoty : $(OUTPUT_DIR)) #$(info Install directoty: $(INSTALL_DIR)) +export KERNEL_DIR #******************************************************************************* # Variables #******************************************************************************* MULTI_CORES ?= $(shell grep -c ^processor /proc/cpuinfo) -SUB_DIRS := spi 01-Debug +SUB_DIRS := \ + spi \ + 01-Debug #******************************************************************************* # Compile configure #******************************************************************************* -ARCH ?= riscv -CROSS_COMPILE ?= riscv64-unknown-linux-musl- +#ARCH ?= riscv +#CROSS_COMPILE ?= riscv64-unknown-linux-musl- +ARCH ?= arm64 +CROSS_COMPILE ?= aarch64-linux-gnu- CC := $(CROSS_COMPILE)gcc LD := $(CROSS_COMPILE)ld AR := $(CROSS_COMPILE)ar STRIP := $(CROSS_COMPILE)strip -export ARCH CROSS_COMPILE +PATH := $(TOOLCHAIN_DIR):$(PATH) + +export ARCH CROSS_COMPILE PATH #******************************************************************************* # Targets #*******************************************************************************