summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-01-24 14:10:30 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-26 20:48:01 +0000
commit494a5000325325ad855fdea9d83ace2d6b1d6997 (patch)
tree80d1b9d3163f93d09e90894e9012ed9ac64892bd /meta/recipes-kernel
parent3a9e5682a9d74fe4f78cd4399927bad1942d0153 (diff)
downloadpoky-494a5000325325ad855fdea9d83ace2d6b1d6997.tar.gz
linux-tools: don't build perf when GPLv3 in INCOMPATIBLE_LICENSE
As binutils is required by perf to build and is GPLv3 licensed adding GPLv3 to INCOMPATIBLE_LICENSE will cause linux-yocto to be skipped. Long term we should look at moving perf to a separate recipe but as a short term solution this patch will ensure that when GPLv3 is in INCOMPATIBLE_LICENSE perf is not built and it's dependencies are not added to build. Fixes [YOCTO #1879] (From OE-Core rev: ce61f9031b54067bffa304dab90c31278631dcdf) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/linux/linux-tools.inc25
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_2.6.37.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.0.bb2
3 files changed, 20 insertions, 9 deletions
diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc
index aa45dba306..b667421fb1 100644
--- a/meta/recipes-kernel/linux/linux-tools.inc
+++ b/meta/recipes-kernel/linux/linux-tools.inc
@@ -1,17 +1,27 @@
1# included by kernel recipes if they want to build/provide 1# included by kernel recipes if they want to build/provide
2# perf functionality from their tree. 2# perf functionality from their tree.
3do_compile_perf_libc-uclibc () { 3
4 : 4BUILDPERF = "yes"
5} 5BUILDPERF_libc-uclibc = "no"
6do_install_perf_libc-uclibc () { 6# perf requires binutils which is GPLv3 licensed, don't prevent the entire kernel
7 : 7# being built if GPLv3 is in INCOMPATIBLE_LICENSE
8python () {
9 if ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1):
10 # GPLv3, drop perf
11 d.setVar("BUILDPERF", "no")
12 d.setVar("PERFDEPENDS", "")
8} 13}
9do_compile_perf() { 14
15do_compile_perf () {
16 if [ "${BUILDPERF}" = "yes" ]; then
10 oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1 17 oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1
18 fi
11} 19}
12 20
13fakeroot do_install_perf() { 21fakeroot do_install_perf () {
22 if [ "${BUILDPERF}" = "yes" ]; then
14 oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} DESTDIR=${D} install NO_NEWT=1 NO_DWARF=1 23 oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} DESTDIR=${D} install NO_NEWT=1 NO_DWARF=1
24 fi
15} 25}
16 26
17 27
@@ -26,5 +36,6 @@ PERFDEPENDS = "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:d
26PERFDEPENDS_libc-uclibc = "" 36PERFDEPENDS_libc-uclibc = ""
27PERFRDEPENDS = "python perl elfutils" 37PERFRDEPENDS = "python perl elfutils"
28PERFRDEPENDS_libc-uclibc = "" 38PERFRDEPENDS_libc-uclibc = ""
39
29do_compile_perf[depends] = "${PERFDEPENDS}" 40do_compile_perf[depends] = "${PERFDEPENDS}"
30RDEPENDS_perf += "${PERFRDEPENDS}" 41RDEPENDS_perf += "${PERFRDEPENDS}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb b/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb
index 34e563cffd..ce7139352c 100644
--- a/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb
@@ -20,7 +20,7 @@ SRCREV_machine_qemux86-64 = "af2bfbe5f757361b5b027a24d67a93bfdfaaf33c"
20SRCREV_machine = "4ae8f8605c81c39b959948e23f7123294a5dfb3f" 20SRCREV_machine = "4ae8f8605c81c39b959948e23f7123294a5dfb3f"
21SRCREV_meta = "aeea99683c7283f1f3320bf2ee7085ee252d4e7e" 21SRCREV_meta = "aeea99683c7283f1f3320bf2ee7085ee252d4e7e"
22 22
23PR = "r21" 23PR = "r22"
24PV = "${LINUX_VERSION}+git${SRCPV}" 24PV = "${LINUX_VERSION}+git${SRCPV}"
25 25
26SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta" 26SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.0.bb b/meta/recipes-kernel/linux/linux-yocto_3.0.bb
index 10859e7066..9d51bd017c 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.0.bb
@@ -21,7 +21,7 @@ SRCREV_machine_qemux86-64 ?= "3551fd0412965b1f6b0b2f6ba35f7fecdaddb58a"
21SRCREV_machine ?= "6f5b11830deba4a6262c8c4abf67e608924f649e" 21SRCREV_machine ?= "6f5b11830deba4a6262c8c4abf67e608924f649e"
22SRCREV_meta ?= "665fea1c249b4f335cb1c9a46a9f2c138d611f1a" 22SRCREV_meta ?= "665fea1c249b4f335cb1c9a46a9f2c138d611f1a"
23 23
24PR = "r2" 24PR = "r3"
25PV = "${LINUX_VERSION}+git${SRCPV}" 25PV = "${LINUX_VERSION}+git${SRCPV}"
26 26
27SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta" 27SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"