kernel-version.mk 845 B

123456789101112131415161718192021222324252627
  1. # Use the default kernel version if the Makefile doesn't override it
  2. LINUX_RELEASE?=1
  3. ifeq ($(LINUX_VERSION),3.3.8)
  4. LINUX_KERNEL_MD5SUM:=f1058f64eed085deb44f10cee8541d50
  5. endif
  6. ifeq ($(LINUX_VERSION),3.6.11)
  7. LINUX_KERNEL_MD5SUM:=3d602ad7f7984509c3e923a5ae90bc54
  8. endif
  9. ifeq ($(LINUX_VERSION),3.7.6)
  10. LINUX_KERNEL_MD5SUM:=4c4d80619c713f83015fc6b1c6280891
  11. endif
  12. # disable the md5sum check for unknown kernel versions
  13. LINUX_KERNEL_MD5SUM?=x
  14. split_version=$(subst ., ,$(1))
  15. merge_version=$(subst $(space),.,$(1))
  16. KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
  17. KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
  18. ifeq ($(firstword $(call split_version,$(KERNEL_BASE))),2)
  19. KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
  20. else
  21. KERNEL_PATCHVER=$(KERNEL)
  22. endif