1 # Use the default kernel version if the Makefile doesn't override it
5 ifdef CONFIG_TESTING_KERNEL
6 KERNEL_PATCHVER
:=$(KERNEL_TESTING_PATCHVER
)
9 LINUX_VERSION-4.14
= .169
10 LINUX_VERSION-4.19
= .101
12 LINUX_KERNEL_HASH-4.14
.169 = d88ea97993c56b1fa0b0a05061bcde476c6be4fc3bb2de8bd97a8f8ff7278249
13 LINUX_KERNEL_HASH-4.19
.101 = be26156abdb38ac0576a34a235ef456bb8ca67fbbe56fc6649b8d069159f8bc4
15 remove_uri_prefix
=$(subst git
://,,$(subst http
://,,$(subst https
://,,$(1))))
16 sanitize_uri
=$(call qstrip
,$(subst @
,_
,$(subst :,_
,$(subst .
,_
,$(subst -,_
,$(subst /,_
,$(1)))))))
18 ifneq ($(call qstrip
,$(CONFIG_KERNEL_GIT_CLONE_URI
)),)
19 LINUX_VERSION
:=$(call sanitize_uri
,$(call remove_uri_prefix
,$(CONFIG_KERNEL_GIT_CLONE_URI
)))
20 ifeq ($(call qstrip
,$(CONFIG_KERNEL_GIT_REF
)),)
21 CONFIG_KERNEL_GIT_REF
:=HEAD
23 LINUX_VERSION
:=$(LINUX_VERSION
)-$(call sanitize_uri
,$(CONFIG_KERNEL_GIT_REF
))
26 LINUX_VERSION
:=$(KERNEL_PATCHVER
)$(strip $(LINUX_VERSION-
$(KERNEL_PATCHVER
)))
28 ifdef KERNEL_TESTING_PATCHVER
29 LINUX_TESTING_VERSION
:=$(KERNEL_TESTING_PATCHVER
)$(strip $(LINUX_VERSION-
$(KERNEL_TESTING_PATCHVER
)))
33 split_version
=$(subst .
, ,$(1))
34 merge_version
=$(subst $(space
),.
,$(1))
35 KERNEL_BASE
=$(firstword $(subst -, ,$(LINUX_VERSION
)))
36 KERNEL
=$(call merge_version
,$(wordlist
1,2,$(call split_version
,$(KERNEL_BASE
))))
37 KERNEL_PATCHVER ?
= $(KERNEL
)
39 # disable the md5sum check for unknown kernel versions
40 LINUX_KERNEL_HASH
:=$(LINUX_KERNEL_HASH-
$(strip $(LINUX_VERSION
)))