kernel-version.mk 752 B

123456789101112131415161718192021222324
  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.7)
  7. LINUX_KERNEL_MD5SUM:=089209f655c8811db20d8b6ff37a8093
  8. endif
  9. # disable the md5sum check for unknown kernel versions
  10. LINUX_KERNEL_MD5SUM?=x
  11. split_version=$(subst ., ,$(1))
  12. merge_version=$(subst $(space),.,$(1))
  13. KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
  14. KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
  15. ifeq ($(firstword $(call split_version,$(KERNEL_BASE))),2)
  16. KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
  17. else
  18. KERNEL_PATCHVER=$(KERNEL)
  19. endif