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.8.13)
  7. LINUX_KERNEL_MD5SUM:=2af19d06cd47ec459519159cdd10542d
  8. endif
  9. ifeq ($(LINUX_VERSION),3.10.49)
  10. LINUX_KERNEL_MD5SUM:=9774e12764e740d49c80eda77d0ef3eb
  11. endif
  12. ifeq ($(LINUX_VERSION),3.13.7)
  13. LINUX_KERNEL_MD5SUM:=370adced5e5c1cb1d0d621c2dae2723f
  14. endif
  15. ifeq ($(LINUX_VERSION),3.14.18)
  16. LINUX_KERNEL_MD5SUM:=3b002a06d0964d8101abec768c2d4eef
  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