kernel-version.mk 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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.10)
  10. LINUX_KERNEL_MD5SUM:=09624c3702107076efcac5e1cd8a18ec
  11. endif
  12. ifeq ($(LINUX_VERSION),3.8.12)
  13. LINUX_KERNEL_MD5SUM:=a4be720ca9e61445562565856bb5154d
  14. endif
  15. ifeq ($(LINUX_VERSION),3.9.1)
  16. LINUX_KERNEL_MD5SUM:=913bbf85c65f3e587a5000763374b4aa
  17. endif
  18. # disable the md5sum check for unknown kernel versions
  19. LINUX_KERNEL_MD5SUM?=x
  20. split_version=$(subst ., ,$(1))
  21. merge_version=$(subst $(space),.,$(1))
  22. KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
  23. KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
  24. ifeq ($(firstword $(call split_version,$(KERNEL_BASE))),2)
  25. KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
  26. else
  27. KERNEL_PATCHVER=$(KERNEL)
  28. endif