From 13c233ce4551542481d7a6390ff2119671137b95 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 27 Oct 2011 10:32:48 -0400 Subject: linux-libc-headers: provide 3.0.x and 3.1 headers Provide both a 3.0.x and a 3.1 set of headers to the toolchain. Compatibility is maintained with older 2.6 headers by creating a new variable that changes the SRC_URI based on the major version number of the kernel. Built and booted with 2.6.37.2, 3.0.8 and 3.1 linux-libc-headers. Signed-off-by: Bruce Ashfield Signed-off-by: Richard Purdie --- .../linux-libc-headers/linux-libc-headers.inc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc') diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc index e586ac301e..4137be1a45 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc @@ -1,9 +1,18 @@ -DESCRIPTION = "Sanitized set of 2.6 kernel headers for the C library's use." +DESCRIPTION = "Sanitized set of kernel headers for the C library's use." SECTION = "devel" LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v2.6/linux-${PV}.tar.bz2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +python __anonymous () { + major = d.getVar("PV",True).split('.')[0] + if major == "3": + d.setVar("HEADER_FETCH_VER", "3.0") + else: + d.setVar("HEADER_FETCH_VER", "2.6") +} + +SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.bz2" S = "${WORKDIR}/linux-${PV}" @@ -54,4 +63,4 @@ RDEPENDS_${PN}-dev = "" RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" INHIBIT_DEFAULT_DEPS = "1" -DEPENDS += "unifdef-native" \ No newline at end of file +DEPENDS += "unifdef-native" -- cgit v1.2.3