kernel: bump 5.4 to 5.4.117
[openwrt/staging/dedeckeh.git] / include / kernel-version.mk
1
2 # Use the default kernel version if the Makefile doesn't override it
3 LINUX_RELEASE?=1
4
5 ifdef CONFIG_TESTING_KERNEL
6 KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
7 endif
8
9 LINUX_VERSION-5.4 = .117
10 LINUX_VERSION-5.10 = .33
11
12 LINUX_KERNEL_HASH-5.4.117 = 4e989b5775830092e5c76b5cca65ebff862ad0c87d0b58c3a20d415c3d4ec770
13 LINUX_KERNEL_HASH-5.10.33 = 933fdbc36371c0f830b7a6a957a559fca2dad1cc0eaa852ef42fb168185b4315
14
15 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
16 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
17
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
22 endif
23 LINUX_VERSION:=$(LINUX_VERSION)-$(call sanitize_uri,$(CONFIG_KERNEL_GIT_REF))
24 else
25 ifdef KERNEL_PATCHVER
26 LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
27 endif
28 ifdef KERNEL_TESTING_PATCHVER
29 LINUX_TESTING_VERSION:=$(KERNEL_TESTING_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_TESTING_PATCHVER)))
30 endif
31 endif
32
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)
38
39 # disable the md5sum check for unknown kernel versions
40 LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
41 LINUX_KERNEL_HASH?=x