X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fkernel-version.mk;h=7020862105829c3c2279bf60a4e9041129964d0f;hb=3061e5a99b19ad9cab51213a068122b826063780;hp=91422a3287612ff50e96652ec9f33b49eaa3689e;hpb=32d7ff5645f2c0bb7c0c696a113dd8aaed0244c4;p=librecmc%2Flibrecmc.git diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 91422a3287..7020862105 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -2,13 +2,31 @@ LINUX_RELEASE?=1 -LINUX_VERSION-4.4 = .159 +ifdef CONFIG_TESTING_KERNEL + KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) +endif + +LINUX_VERSION-4.14 = .140 + +LINUX_KERNEL_HASH-4.14.140 = dd0113acab0acbe70b27f891d4f772ee405706db8082b60b9d21a06e7f1fa730 -LINUX_KERNEL_HASH-4.4.159 = d464fea1f888ada3a55c3aea1c05ba9fd2d4edd7ffb152369faace18a285998b +remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) +sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) +ifneq ($(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),) + LINUX_VERSION:=$(call sanitize_uri,$(call remove_uri_prefix,$(CONFIG_KERNEL_GIT_CLONE_URI))) + ifeq ($(call qstrip,$(CONFIG_KERNEL_GIT_REF)),) + CONFIG_KERNEL_GIT_REF:=HEAD + endif + LINUX_VERSION:=$(LINUX_VERSION)-$(call sanitize_uri,$(CONFIG_KERNEL_GIT_REF)) +else ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) endif +ifdef KERNEL_TESTING_PATCHVER + LINUX_TESTING_VERSION:=$(KERNEL_TESTING_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_TESTING_PATCHVER))) +endif +endif split_version=$(subst ., ,$(1)) merge_version=$(subst $(space),.,$(1))