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.9
= .179
10 LINUX_VERSION-4.14
= .121
11 LINUX_VERSION-4.19
= .45
13 LINUX_KERNEL_HASH-4.9
.179 = 532e4b7b0103806dad9124fd09d15d19594eca08e7f900e94ff805d3b4171ee3
14 LINUX_KERNEL_HASH-4.14
.121 = 2eecd6825a0998c8b6dd686cd4cd76e9f0d195bbace89f0b82495cc11ddb2884
15 LINUX_KERNEL_HASH-4.19
.45 = eb31e62fbb30aaeedb892cecdd8ac9746d42cbbef2ef2356f9ca8e13514b9d2b
17 remove_uri_prefix
=$(subst git
://,,$(subst http
://,,$(subst https
://,,$(1))))
18 sanitize_uri
=$(call qstrip
,$(subst @
,_
,$(subst :,_
,$(subst .
,_
,$(subst -,_
,$(subst /,_
,$(1)))))))
20 ifneq ($(call qstrip
,$(CONFIG_KERNEL_GIT_CLONE_URI
)),)
21 LINUX_VERSION
:=$(call sanitize_uri
,$(call remove_uri_prefix
,$(CONFIG_KERNEL_GIT_CLONE_URI
)))
22 ifeq ($(call qstrip
,$(CONFIG_KERNEL_GIT_REF
)),)
23 CONFIG_KERNEL_GIT_REF
:=HEAD
25 LINUX_VERSION
:=$(LINUX_VERSION
)-$(call sanitize_uri
,$(CONFIG_KERNEL_GIT_REF
))
28 LINUX_VERSION
:=$(KERNEL_PATCHVER
)$(strip $(LINUX_VERSION-
$(KERNEL_PATCHVER
)))
30 ifdef KERNEL_TESTING_PATCHVER
31 LINUX_TESTING_VERSION
:=$(KERNEL_TESTING_PATCHVER
)$(strip $(LINUX_VERSION-
$(KERNEL_TESTING_PATCHVER
)))
35 split_version
=$(subst .
, ,$(1))
36 merge_version
=$(subst $(space
),.
,$(1))
37 KERNEL_BASE
=$(firstword $(subst -, ,$(LINUX_VERSION
)))
38 KERNEL
=$(call merge_version
,$(wordlist
1,2,$(call split_version
,$(KERNEL_BASE
))))
39 KERNEL_PATCHVER ?
= $(KERNEL
)
41 # disable the md5sum check for unknown kernel versions
42 LINUX_KERNEL_HASH
:=$(LINUX_KERNEL_HASH-
$(strip $(LINUX_VERSION
)))