2006-12-25 17:12:57 +08:00
|
|
|
# Use the default kernel version if the Makefile doesn't override it
|
|
|
|
|
2007-06-28 13:52:00 +08:00
|
|
|
LINUX_RELEASE?=1
|
|
|
|
|
2019-01-02 21:02:03 +08:00
|
|
|
LINUX_VERSION-4.9 = .146
|
|
|
|
LINUX_VERSION-4.14 = .89
|
2007-06-28 13:52:00 +08:00
|
|
|
|
2019-01-02 21:02:03 +08:00
|
|
|
LINUX_KERNEL_HASH-4.9.146 = 58195a8be3085d117c83a2ed1caa3b46ea7c1614c75f951b9f13f7adb03f8e59
|
|
|
|
LINUX_KERNEL_HASH-4.14.89 = ce6e16ac44dddd0d6a232bf2ce03e8bf8beca19f9b84503684466d140a1a0b25
|
2014-10-24 21:04:08 +08:00
|
|
|
|
2019-01-02 21:02:03 +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
|
2014-10-24 21:04:08 +08:00
|
|
|
ifdef KERNEL_PATCHVER
|
|
|
|
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
|
|
|
|
endif
|
2019-01-02 21:02:03 +08:00
|
|
|
endif
|
2007-06-28 13:52:00 +08:00
|
|
|
|
2009-03-03 21:54:29 +08:00
|
|
|
split_version=$(subst ., ,$(1))
|
|
|
|
merge_version=$(subst $(space),.,$(1))
|
2009-03-09 23:05:57 +08:00
|
|
|
KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
|
|
|
|
KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
|
2014-10-24 21:04:08 +08:00
|
|
|
KERNEL_PATCHVER ?= $(KERNEL)
|
2006-12-25 17:12:57 +08:00
|
|
|
|
2014-10-24 21:04:08 +08:00
|
|
|
# disable the md5sum check for unknown kernel versions
|
2016-12-17 00:32:10 +08:00
|
|
|
LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
|
|
|
|
LINUX_KERNEL_HASH?=x
|