diff --git a/Makefile b/Makefile index 00639ae59535ee9cbebf08681878e654d471bbf8..c4520e813d625c30c90a5846eb7a75ea6548cc4f 100644 --- a/Makefile +++ b/Makefile @@ -189,12 +189,14 @@ _UBOOT_GIT := $(UBOOT_GIT) _UBOOT_SRC ?= u-boot UBOOT_SRC ?= $(_UBOOT_SRC) +# could switch to other kernel fork for example openEuler +KERNEL_FORK = linux #KERNEL_GIT ?= https://github.com/tinyclub/linux-stable.git #KERNEL_GIT ?= https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git KERNEL_GIT ?= https://kernel.source.codeaurora.cn/pub/scm/linux/kernel/git/stable/linux.git #KERNEL_GIT ?= git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git _KERNEL_GIT := $(KERNEL_GIT) -_KERNEL_SRC ?= linux-stable +_KERNEL_SRC ?= $(KERNEL_FORK)-stable KERNEL_SRC ?= $(_KERNEL_SRC) # Use faster mirror instead of git://git.buildroot.net/buildroot.git @@ -205,7 +207,6 @@ _ROOT_SRC ?= buildroot ROOT_SRC ?= $(_ROOT_SRC) _LINUX=$(LINUX) -KERNEL_ABS_SRC := $(TOP_SRC)/$(KERNEL_SRC) ROOT_ABS_SRC := $(TOP_SRC)/$(ROOT_SRC) UBOOT_ABS_SRC := $(TOP_SRC)/$(UBOOT_SRC) QEMU_ABS_SRC := $(TOP_SRC)/$(QEMU_SRC) @@ -339,6 +340,9 @@ endif # Customize kernel git repo and local dir $(eval $(call __vs,KERNEL_SRC,LINUX)) $(eval $(call __vs,KERNEL_GIT,LINUX)) +$(eval $(call __vs,KERNEL_SRC,KERNEL_FORK)) +$(eval $(call __vs,KERNEL_GIT,KERNEL_FORK)) +KERNEL_ABS_SRC := $(TOP_SRC)/$(KERNEL_SRC) $(eval $(call __vs,DTS,LINUX)) $(eval $(call __vs,DTB,LINUX)) diff --git a/boards/aarch64/virt/Makefile b/boards/aarch64/virt/Makefile index 7cb9420f639636f3fdb082fd11c3a8a2cb07ab90..d26325d4730e33c0d3a4cde35541311030ed3f6f 100644 --- a/boards/aarch64/virt/Makefile +++ b/boards/aarch64/virt/Makefile @@ -19,6 +19,9 @@ CCORI[UBOOT_v2019.10,OS_focal] = internal LINUX ?= v5.1 BUILDROOT?= 2019.11.1 +# git repos for other kernel fork +KERNEL_GIT[KERNEL_FORK_openEuler] := https://gitee.com/openeuler/kernel.git + NETDEV_LIST := virtio NETDEV ?= virtio diff --git a/boards/x86_64/pc/Makefile b/boards/x86_64/pc/Makefile index 2f568bf047ec7d714c321d1495023a30cb0cd91d..c91100576cf25cc78b57efc2f94d087e5d61850a 100644 --- a/boards/x86_64/pc/Makefile +++ b/boards/x86_64/pc/Makefile @@ -9,6 +9,9 @@ MEM ?= 128M SMP ?= 4 LINUX ?= v5.1 +# git repos for other kernel fork +KERNEL_GIT[KERNEL_FORK_openEuler] := https://gitee.com/openeuler/kernel.git + GCC = 9 GCC[LINUX_v3.2] = 4.8 GCC[LINUX_v2.6.12.6] = 4.8