kernel: bump 4.14 to 4.14.180
[openwrt/openwrt.git] / include / kernel-version.mk
1 # Use the default kernel version if the Makefile doesn't override it
2
3 LINUX_RELEASE?=1
4
5 ifdef CONFIG_TESTING_KERNEL
6 KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
7 endif
8
9 LINUX_VERSION-4.14 = .180
10 LINUX_VERSION-4.19 = .115
11 LINUX_VERSION-5.4 = .39
12
13 LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e
14 LINUX_KERNEL_HASH-4.19.115 = 11b2d97c8ea5ceb40c5e1d0bb87ad5b2b8c84560181bc60c0d28ec3a3e3801c2
15 LINUX_KERNEL_HASH-5.4.39 = 5141965a61a7b1c538443782ec3ef25fe0c3f9cd4d70c4e9f969d16883f365c8
16
17 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
18 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
19
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
24 endif
25 LINUX_VERSION:=$(LINUX_VERSION)-$(call sanitize_uri,$(CONFIG_KERNEL_GIT_REF))
26 else
27 ifdef KERNEL_PATCHVER
28 LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
29 endif
30 ifdef KERNEL_TESTING_PATCHVER
31 LINUX_TESTING_VERSION:=$(KERNEL_TESTING_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_TESTING_PATCHVER)))
32 endif
33 endif
34
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)
40
41 # disable the md5sum check for unknown kernel versions
42 LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
43 LINUX_KERNEL_HASH?=x