2017-09-06 19:19:45 +08:00
|
|
|
|
2020-09-22 10:48:37 +08:00
|
|
|
# Use the default kernel version if the Makefile doesn't override it
|
2017-09-06 19:19:45 +08:00
|
|
|
LINUX_RELEASE?=1
|
|
|
|
|
|
2020-03-19 17:40:18 +08:00
|
|
|
ifdef CONFIG_TESTING_KERNEL
|
|
|
|
|
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
|
|
|
|
endif
|
|
|
|
|
|
2021-04-04 20:08:14 +08:00
|
|
|
LINUX_VERSION-4.9 = .264
|
|
|
|
|
LINUX_VERSION-4.14 = .228
|
|
|
|
|
LINUX_VERSION-4.19 = .184
|
2017-09-06 19:19:45 +08:00
|
|
|
|
2021-04-04 20:08:14 +08:00
|
|
|
LINUX_KERNEL_HASH-4.9.264 = ecc62a94388b722d8bd924d9d021805f5fe180616c7d4c9bfee62766c46ec2b5
|
|
|
|
|
LINUX_KERNEL_HASH-4.14.228 = 15074d44ab330bba00518df1c86d3d2c304a34514d70958c0529a9d28d93815b
|
|
|
|
|
LINUX_KERNEL_HASH-4.19.184 = 3dfaf6aae242cb4165d2c0df3405558264f86c3b04f7bbef71b99c83a87ab77c
|
2017-09-06 19:19:45 +08:00
|
|
|
|
2018-04-23 18:50:49 +08:00
|
|
|
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
|
2017-09-06 19:19:45 +08:00
|
|
|
ifdef KERNEL_PATCHVER
|
|
|
|
|
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
|
|
|
|
|
endif
|
2020-03-19 17:40:18 +08:00
|
|
|
ifdef KERNEL_TESTING_PATCHVER
|
|
|
|
|
LINUX_TESTING_VERSION:=$(KERNEL_TESTING_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_TESTING_PATCHVER)))
|
|
|
|
|
endif
|
2018-04-23 18:50:49 +08:00
|
|
|
endif
|
2017-09-06 19:19:45 +08:00
|
|
|
|
|
|
|
|
split_version=$(subst ., ,$(1))
|
|
|
|
|
merge_version=$(subst $(space),.,$(1))
|
|
|
|
|
KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
|
|
|
|
|
KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
|
|
|
|
|
KERNEL_PATCHVER ?= $(KERNEL)
|
|
|
|
|
|
|
|
|
|
# disable the md5sum check for unknown kernel versions
|
|
|
|
|
LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
|
2020-03-09 18:50:47 +08:00
|
|
|
LINUX_KERNEL_HASH?=x
|