summaryrefslogtreecommitdiffstats
path: root/rules/host-kernel-header.make
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2018-10-29 14:38:36 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-10-29 14:42:03 +0100
commitb0626b420a9861fc18995809b6d7570f84619e3e (patch)
tree943b117da967de472a28b866b131dc9476bc60ed /rules/host-kernel-header.make
parent4d97f742d51a2b969cff5c9ddfea9543b8f1b15e (diff)
downloadptxdist-b0626b420a9861fc18995809b6d7570f84619e3e.tar.gz
ptxdist-b0626b420a9861fc18995809b6d7570f84619e3e.tar.xz
host-kernel-header: improve version handling and selection
Allow selection it in the platformconfig. Use the toolchain kernel header version if possible if target kernel headers are not selected. In that case the cross toolchain kernel headers are most likely new enough. Also, update fallback version to 4.19 while at it. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/host-kernel-header.make')
-rw-r--r--rules/host-kernel-header.make10
1 files changed, 8 insertions, 2 deletions
diff --git a/rules/host-kernel-header.make b/rules/host-kernel-header.make
index 15abb894a..bd1059dd8 100644
--- a/rules/host-kernel-header.make
+++ b/rules/host-kernel-header.make
@@ -17,8 +17,14 @@ HOST_PACKAGES-$(PTXCONF_HOST_KERNEL_HEADER) += host-kernel-header
# Paths and names
#
ifndef PTXCONF_KERNEL_HEADER
-HOST_KERNEL_HEADER_VERSION := 3.15
-HOST_KERNEL_HEADER_MD5 := 97ca1625bb40368dc41b9a7971549071
+TOOLCHAIN_CONFIG := $(PTXDIST_PLATFORMDIR)/selected_toolchain/ptxconfig
+ifneq ($(wildcard $(TOOLCHAIN_CONFIG)),)
+HOST_KERNEL_HEADER_VERSION := $(call remove_quotes,$(shell ptxd_get_kconfig $(TOOLCHAIN_CONFIG) PTXCONF_KERNEL_HEADERS_VERSION))
+HOST_KERNEL_HEADER_MD5 := $(call remove_quotes,$(shell ptxd_get_kconfig $(TOOLCHAIN_CONFIG) PTXCONF_KERNEL_HEADERS_MD5))
+else
+HOST_KERNEL_HEADER_VERSION := 4.19
+HOST_KERNEL_HEADER_MD5 := 740a90cf810c2105df8ee12e5d0bb900
+endif
HOST_KERNEL_HEADER := linux-$(HOST_KERNEL_HEADER_VERSION)
HOST_KERNEL_HEADER_SUFFIX := tar.xz
HOST_KERNEL_HEADER_URL := $(call kernel-url, HOST_KERNEL_HEADER)