All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] perf: make perf a standlone recipe
@ 2012-06-15 20:23 Bruce Ashfield
  2012-06-15 20:23 ` [PATCH 1/2] recipes-kernel: make perf a standalone package Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-15 20:23 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core, liang.li, saul.wold

Richard/Saul,

We've wanted to do this for some time, and now have finally split
out perf from being a sub-part of the kernel packages into a
standalone package that is built out of the kernel sources.

I've built and tested this by adding task-core-tools-profile to
my IMAGE_INSTALL, and perf behaves just as it did before.  I've
also tested this on my oe-core checkout/repo, and it works fine
there as well (but I'm using my easier to access contrib
branch for now).

There's additional work that can be done more easily once this
is split, so please consider this for inclusion, but I'd like
to keep this initial version as an exact functional match as
what was previously in place.

I've removed the old linux-tools.inc and updated any kernel 
recipes that I know about that have references to it. If there
are other dependent recipes, they'll need to be updated.

From the patch itself:

  perf has been coupled to the kernel packages via kernel.bbclass.
  While maintaining the build of perf out of the kernel source tree
  is desired the package coupling has proved to be awkward in
  several situations such as:

     - when a kernel recipe doesn't want to build/provide perf
     - when licensing of dependencies would prohibit perf and hence
       the kernel from being built.

  To solve some of these problems, this recipe is the extraction of
  the linux-tools.inc provided perf compilation into a standalone
  perf recipe that builds out of the kernel source, but is otherwise
  independent.

  No new functionality is provided above what the linux-tools.inc
  variant provided, but the separate recipe provides baseline for
  adding new functionality.

This addresses [YOCTO #1552]

cc: Tom Zanussi <tom.zanussi@intel.com>
cc: Liang Li <liang.li@windriver.com>

Cheers,

Bruce

The following changes since commit 4bb7ef94fca392bcd389ed7069280c238f8fe094:

  directfb: added missing Upstream-status (2012-06-15 15:44:39 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib zedd/perf
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/perf

Bruce Ashfield (1):
  recipes-kernel: remove linux-tools.inc

Liang Li (1):
  recipes-kernel: make perf a standalone package

 meta/classes/kernel.bbclass                     |    7 +---
 meta/recipes-kernel/linux/linux-tools.inc       |   41 ------------------
 meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb |    2 -
 meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb |    2 -
 meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb |    2 -
 meta/recipes-kernel/linux/linux-yocto_3.0.bb    |    2 -
 meta/recipes-kernel/linux/linux-yocto_3.2.bb    |    2 -
 meta/recipes-kernel/linux/linux-yocto_3.4.bb    |    2 -
 meta/recipes-kernel/perf/perf_3.4.bb            |   52 +++++++++++++++++++++++
 9 files changed, 53 insertions(+), 59 deletions(-)
 delete mode 100644 meta/recipes-kernel/linux/linux-tools.inc
 create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb

-- 
1.7.7




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] recipes-kernel: make perf a standalone package
  2012-06-15 20:23 [PATCH 0/2] perf: make perf a standlone recipe Bruce Ashfield
@ 2012-06-15 20:23 ` Bruce Ashfield
  2012-06-16 17:34   ` Saul Wold
  2012-06-15 20:23 ` [PATCH 2/2] recipes-kernel: remove linux-tools.inc Bruce Ashfield
  2012-06-18  0:13 ` [PATCH 0/2] perf: make perf a standlone recipe Tom Zanussi
  2 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-15 20:23 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core, liang.li, saul.wold

From: Liang Li <liang.li@windriver.com>

perf has been coupled to the kernel packages via kernel.bbclass.
While maintaining the build of perf out of the kernel source tree
is desired the package coupling has proved to be awkward in
several situations such as:

  - when a kernel recipe doesn't want to build/provide perf
  - when licensing of dependencies would prohibit perf and hence
    the kernel from being built.

To solve some of these problems, this recipe is the extraction of
the linux-tools.inc provided perf compilation into a standalone
perf recipe that builds out of the kernel source, but is otherwise
independent.

No new functionality is provided above what the linux-tools.inc
variant provided, but the separate recipe provides baseline for
adding new functionality.

Signed-off-by: Liang Li <liang.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel.bbclass          |    7 +----
 meta/recipes-kernel/perf/perf_3.4.bb |   52 ++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 116e10b..02234df 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -469,7 +469,7 @@ python populate_packages_prepend () {
 	metapkg = "kernel-modules"
 	d.setVar('ALLOW_EMPTY_' + metapkg, "1")
 	d.setVar('FILES_' + metapkg, "")
-	blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
+	blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ]
 	for l in module_deps.values():
 		for i in l:
 			pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
@@ -548,8 +548,3 @@ addtask deploy before do_build after do_install
 
 EXPORT_FUNCTIONS do_deploy
 
-# perf must be enabled in individual kernel recipes
-PACKAGES =+ "perf-dbg perf"
-FILES_perf = "${bindir}/* \
-              ${libexecdir}"
-FILES_perf-dbg = "${FILES_${PN}-dbg}"
diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
new file mode 100644
index 0000000..9c8ceb0
--- /dev/null
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Performance analysis tools for Linux"
+DESCRIPTION = "Performance counters for Linux are a new kernel-based \
+subsystem that provide a framework for all things \
+performance analysis. It covers hardware level \
+(CPU/PMU, Performance Monitoring Unit) features \
+and software features (software counters, tracepoints) \
+as well."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+PR = "r0"
+
+BUILDPERF_libc-uclibc = "no"
+
+PERFDEPENDS = " \
+virtual/${MLPREFIX}libc:do_populate_sysroot \
+${MLPREFIX}elfutils:do_populate_sysroot \
+${MLPREFIX}binutils:do_populate_sysroot \
+"
+RDEPENDS += "elfutils perl python"
+
+PROVIDES = "virtual/perf"
+
+S = "${STAGING_KERNEL_DIR}/source"
+B = "${WORKDIR}/${BPN}-${PV}"
+
+EXTRA_OEMAKE = \
+		'-C ${S}/tools/perf \
+		O=${B} \
+		CROSS_COMPILE=${TARGET_PREFIX} \
+		ARCH=${TARGET_ARCH} \
+		CC="${CC}" \
+		AR="${AR}" \
+		prefix=/usr \
+		NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
+		'
+
+do_configure[depends] = "virtual/kernel:do_populate_sysroot"
+
+do_compile() {
+	oe_runmake all
+}
+
+do_compile[depends] = "${PERFDEPENDS}"
+
+do_install() {
+	oe_runmake DESTDIR=${D} install
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
-- 
1.7.7




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] recipes-kernel: remove linux-tools.inc
  2012-06-15 20:23 [PATCH 0/2] perf: make perf a standlone recipe Bruce Ashfield
  2012-06-15 20:23 ` [PATCH 1/2] recipes-kernel: make perf a standalone package Bruce Ashfield
@ 2012-06-15 20:23 ` Bruce Ashfield
  2012-06-18  0:13 ` [PATCH 0/2] perf: make perf a standlone recipe Tom Zanussi
  2 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-15 20:23 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core, liang.li, saul.wold

perf has been moved to a standalone package, making linux-tools.inc
unecessary. It can now be removed and recipes that included it
updated.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/recipes-kernel/linux/linux-tools.inc       |   41 -----------------------
 meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb |    2 -
 meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb |    2 -
 meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb |    2 -
 meta/recipes-kernel/linux/linux-yocto_3.0.bb    |    2 -
 meta/recipes-kernel/linux/linux-yocto_3.2.bb    |    2 -
 meta/recipes-kernel/linux/linux-yocto_3.4.bb    |    2 -
 7 files changed, 0 insertions(+), 53 deletions(-)
 delete mode 100644 meta/recipes-kernel/linux/linux-tools.inc

diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc
deleted file mode 100644
index 3b03c05..0000000
--- a/meta/recipes-kernel/linux/linux-tools.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-# included by kernel recipes if they want to build/provide
-# perf functionality from their tree.
-
-BUILDPERF = "yes"
-BUILDPERF_libc-uclibc = "no"
-# perf requires binutils which is GPLv3 licensed, don't prevent the entire kernel
-# being built if GPLv3 is in INCOMPATIBLE_LICENSE
-python () {
-    if ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1):
-       # GPLv3, drop perf
-       d.setVar("BUILDPERF", "no")
-       d.setVar("PERFDEPENDS", "")
-}
-
-do_compile_perf () {
-    if [ "${BUILDPERF}" = "yes" ]; then
-	oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1
-    fi
-}
-
-fakeroot do_install_perf () {
-    if [ "${BUILDPERF}" = "yes" ]; then
-	oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} DESTDIR=${D} install NO_NEWT=1 NO_DWARF=1
-    fi
-}
-
-
-# perf tasks
-addtask compile_perf after do_compile before do_install
-addtask install_perf after do_install before do_package
-
-do_compile_perf[umask] = "022"
-do_install_perf[umask] = "022"
-
-PERFDEPENDS = "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:do_populate_sysroot ${MLPREFIX}binutils:do_populate_sysroot"
-PERFDEPENDS_libc-uclibc = ""
-PERFRDEPENDS = "python perl elfutils"
-PERFRDEPENDS_libc-uclibc = ""
-
-do_compile_perf[depends] = "${PERFDEPENDS}"
-RDEPENDS_perf += "${PERFRDEPENDS}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb
index a39b966..971d1a8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb
@@ -27,5 +27,3 @@ KERNEL_FEATURES = "features/netfilter"
 KERNEL_FEATURES_append = " features/taskstats"
 KERNEL_FEATURES_append_qemux86 = " cfg/sound"
 KERNEL_FEATURES_append_qemux86-64 = " cfg/sound"
-
-require recipes-kernel/linux/linux-tools.inc
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb
index a07b27a..ada66b8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb
@@ -28,5 +28,3 @@ KERNEL_FEATURES = "features/netfilter"
 KERNEL_FEATURES_append = " features/taskstats"
 KERNEL_FEATURES_append_qemux86 = " cfg/sound"
 KERNEL_FEATURES_append_qemux86-64 = " cfg/sound"
-
-require recipes-kernel/linux/linux-tools.inc
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
index 81730ea..52f2dd1 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
@@ -28,5 +28,3 @@ KERNEL_FEATURES = "features/netfilter"
 KERNEL_FEATURES_append = " features/taskstats"
 KERNEL_FEATURES_append_qemux86 = " cfg/sound"
 KERNEL_FEATURES_append_qemux86-64 = " cfg/sound"
-
-require recipes-kernel/linux/linux-tools.inc
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.0.bb b/meta/recipes-kernel/linux/linux-yocto_3.0.bb
index 440821c..5cdff95 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.0.bb
@@ -32,5 +32,3 @@ KERNEL_FEATURES = "features/netfilter"
 KERNEL_FEATURES_append = " features/taskstats"
 KERNEL_FEATURES_append_qemux86 = " cfg/sound"
 KERNEL_FEATURES_append_qemux86-64 = " cfg/sound"
-
-require linux-tools.inc
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.2.bb b/meta/recipes-kernel/linux/linux-yocto_3.2.bb
index e6cf9bb..3e4a9dd 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.2.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.2.bb
@@ -32,5 +32,3 @@ KERNEL_FEATURES="features/netfilter"
 KERNEL_FEATURES_append=" features/taskstats"
 KERNEL_FEATURES_append_qemux86=" cfg/sound"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound"
-
-require linux-tools.inc
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
index af6130d..eb5e888 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
@@ -34,5 +34,3 @@ KERNEL_REVISION_CHECKING=""
 KERNEL_FEATURES="features/netfilter"
 KERNEL_FEATURES_append_qemux86=" cfg/sound"
 KERNEL_FEATURES_append_qemux86-64=" cfg/sound"
-
-require recipes-kernel/linux/linux-tools.inc
-- 
1.7.7




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] recipes-kernel: make perf a standalone package
  2012-06-15 20:23 ` [PATCH 1/2] recipes-kernel: make perf a standalone package Bruce Ashfield
@ 2012-06-16 17:34   ` Saul Wold
  2012-06-16 17:47     ` Bruce Ashfield
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Saul Wold @ 2012-06-16 17:34 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: liang.li

On 06/15/2012 01:23 PM, Bruce Ashfield wrote:
> From: Liang Li<liang.li@windriver.com>
>
> perf has been coupled to the kernel packages via kernel.bbclass.
> While maintaining the build of perf out of the kernel source tree
> is desired the package coupling has proved to be awkward in
> several situations such as:
>
>    - when a kernel recipe doesn't want to build/provide perf
>    - when licensing of dependencies would prohibit perf and hence
>      the kernel from being built.
>
> To solve some of these problems, this recipe is the extraction of
> the linux-tools.inc provided perf compilation into a standalone
> perf recipe that builds out of the kernel source, but is otherwise
> independent.
>
> No new functionality is provided above what the linux-tools.inc
> variant provided, but the separate recipe provides baseline for
> adding new functionality.
>
> Signed-off-by: Liang Li<liang.li@windriver.com>
> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
> ---
>   meta/classes/kernel.bbclass          |    7 +----
>   meta/recipes-kernel/perf/perf_3.4.bb |   52 ++++++++++++++++++++++++++++++++++
>   2 files changed, 53 insertions(+), 6 deletions(-)
>   create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 116e10b..02234df 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -469,7 +469,7 @@ python populate_packages_prepend () {
>   	metapkg = "kernel-modules"
>   	d.setVar('ALLOW_EMPTY_' + metapkg, "1")
>   	d.setVar('FILES_' + metapkg, "")
> -	blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
> +	blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ]
>   	for l in module_deps.values():
>   		for i in l:
>   			pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
> @@ -548,8 +548,3 @@ addtask deploy before do_build after do_install
>
>   EXPORT_FUNCTIONS do_deploy
>
> -# perf must be enabled in individual kernel recipes
> -PACKAGES =+ "perf-dbg perf"
> -FILES_perf = "${bindir}/* \
> -              ${libexecdir}"
> -FILES_perf-dbg = "${FILES_${PN}-dbg}"
> diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
> new file mode 100644
> index 0000000..9c8ceb0
> --- /dev/null
> +++ b/meta/recipes-kernel/perf/perf_3.4.bb
> @@ -0,0 +1,52 @@
> +SUMMARY = "Performance analysis tools for Linux"
> +DESCRIPTION = "Performance counters for Linux are a new kernel-based \
> +subsystem that provide a framework for all things \
> +performance analysis. It covers hardware level \
> +(CPU/PMU, Performance Monitoring Unit) features \
> +and software features (software counters, tracepoints) \
> +as well."
> +
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
> +
This fails to find the correct file in the poky-lsb case, not sure what 
is going on yet, but here is the error from the autobuilder.

ERROR: Function failed: perf: LIC_FILES_CHKSUM points to an invalid 
file: 
/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/kernel/source/COPYING
NOTE: package perf-3.4-r0: task do_configure: Failed
ERROR: Task 3336 
(/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/meta/recipes-kernel/perf/perf_3.4.bb, 
do_configure) failed with exit code '1'

This can be reproduced by setting DISTRO="poky-lsb" in your local.conf

Please investigate, thanks

	Sau!


> +PR = "r0"
> +
> +BUILDPERF_libc-uclibc = "no"
> +
> +PERFDEPENDS = " \
> +virtual/${MLPREFIX}libc:do_populate_sysroot \
> +${MLPREFIX}elfutils:do_populate_sysroot \
> +${MLPREFIX}binutils:do_populate_sysroot \
> +"
> +RDEPENDS += "elfutils perl python"
> +
> +PROVIDES = "virtual/perf"
> +
> +S = "${STAGING_KERNEL_DIR}/source"
> +B = "${WORKDIR}/${BPN}-${PV}"
> +
> +EXTRA_OEMAKE = \
> +		'-C ${S}/tools/perf \
> +		O=${B} \
> +		CROSS_COMPILE=${TARGET_PREFIX} \
> +		ARCH=${TARGET_ARCH} \
> +		CC="${CC}" \
> +		AR="${AR}" \
> +		prefix=/usr \
> +		NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
> +		'
> +
> +do_configure[depends] = "virtual/kernel:do_populate_sysroot"
> +
> +do_compile() {
> +	oe_runmake all
> +}
> +
> +do_compile[depends] = "${PERFDEPENDS}"
> +
> +do_install() {
> +	oe_runmake DESTDIR=${D} install
> +}
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] recipes-kernel: make perf a standalone package
  2012-06-16 17:34   ` Saul Wold
@ 2012-06-16 17:47     ` Bruce Ashfield
  2012-06-17  1:19     ` Bruce Ashfield
  2012-06-17  3:16     ` Bruce Ashfield
  2 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-16 17:47 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: liang.li

On Sat, Jun 16, 2012 at 1:34 PM, Saul Wold <saul.wold@intel.com> wrote:
> On 06/15/2012 01:23 PM, Bruce Ashfield wrote:
>>
>> From: Liang Li<liang.li@windriver.com>
>>
>> perf has been coupled to the kernel packages via kernel.bbclass.
>> While maintaining the build of perf out of the kernel source tree
>> is desired the package coupling has proved to be awkward in
>> several situations such as:
>>
>>   - when a kernel recipe doesn't want to build/provide perf
>>   - when licensing of dependencies would prohibit perf and hence
>>     the kernel from being built.
>>
>> To solve some of these problems, this recipe is the extraction of
>> the linux-tools.inc provided perf compilation into a standalone
>> perf recipe that builds out of the kernel source, but is otherwise
>> independent.
>>
>> No new functionality is provided above what the linux-tools.inc
>> variant provided, but the separate recipe provides baseline for
>> adding new functionality.
>>
>> Signed-off-by: Liang Li<liang.li@windriver.com>
>> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>> ---
>>  meta/classes/kernel.bbclass          |    7 +----
>>  meta/recipes-kernel/perf/perf_3.4.bb |   52
>> ++++++++++++++++++++++++++++++++++
>>  2 files changed, 53 insertions(+), 6 deletions(-)
>>  create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 116e10b..02234df 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -469,7 +469,7 @@ python populate_packages_prepend () {
>>        metapkg = "kernel-modules"
>>        d.setVar('ALLOW_EMPTY_' + metapkg, "1")
>>        d.setVar('FILES_' + metapkg, "")
>> -       blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>> 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
>> +       blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>> 'kernel-vmlinux', 'kernel-misc' ]
>>        for l in module_deps.values():
>>                for i in l:
>>                        pkg = module_pattern %
>> legitimize_package_name(re.match(module_regex,
>> os.path.basename(i)).group(1))
>> @@ -548,8 +548,3 @@ addtask deploy before do_build after do_install
>>
>>  EXPORT_FUNCTIONS do_deploy
>>
>> -# perf must be enabled in individual kernel recipes
>> -PACKAGES =+ "perf-dbg perf"
>> -FILES_perf = "${bindir}/* \
>> -              ${libexecdir}"
>> -FILES_perf-dbg = "${FILES_${PN}-dbg}"
>> diff --git a/meta/recipes-kernel/perf/perf_3.4.bb
>> b/meta/recipes-kernel/perf/perf_3.4.bb
>> new file mode 100644
>> index 0000000..9c8ceb0
>> --- /dev/null
>> +++ b/meta/recipes-kernel/perf/perf_3.4.bb
>> @@ -0,0 +1,52 @@
>> +SUMMARY = "Performance analysis tools for Linux"
>> +DESCRIPTION = "Performance counters for Linux are a new kernel-based \
>> +subsystem that provide a framework for all things \
>> +performance analysis. It covers hardware level \
>> +(CPU/PMU, Performance Monitoring Unit) features \
>> +and software features (software counters, tracepoints) \
>> +as well."
>> +
>> +LICENSE = "GPLv2"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>> +
>
> This fails to find the correct file in the poky-lsb case, not sure what is
> going on yet, but here is the error from the autobuilder.
>
> ERROR: Function failed: perf: LIC_FILES_CHKSUM points to an invalid file:
> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/kernel/source/COPYING
> NOTE: package perf-3.4-r0: task do_configure: Failed
> ERROR: Task 3336
> (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/meta/recipes-kernel/perf/perf_3.4.bb,
> do_configure) failed with exit code '1'
>
> This can be reproduced by setting DISTRO="poky-lsb" in your local.conf

ok. Either Liang or myself will have a go with that config. I've never
built poky-lsb
or have any typical use for it .. so I'd never reproduce this in my
own builds :)

Cheers,

Bruce

>
> Please investigate, thanks
>
>        Sau!
>
>
>
>> +PR = "r0"
>> +
>> +BUILDPERF_libc-uclibc = "no"
>> +
>> +PERFDEPENDS = " \
>> +virtual/${MLPREFIX}libc:do_populate_sysroot \
>> +${MLPREFIX}elfutils:do_populate_sysroot \
>> +${MLPREFIX}binutils:do_populate_sysroot \
>> +"
>> +RDEPENDS += "elfutils perl python"
>> +
>> +PROVIDES = "virtual/perf"
>> +
>> +S = "${STAGING_KERNEL_DIR}/source"
>> +B = "${WORKDIR}/${BPN}-${PV}"
>> +
>> +EXTRA_OEMAKE = \
>> +               '-C ${S}/tools/perf \
>> +               O=${B} \
>> +               CROSS_COMPILE=${TARGET_PREFIX} \
>> +               ARCH=${TARGET_ARCH} \
>> +               CC="${CC}" \
>> +               AR="${AR}" \
>> +               prefix=/usr \
>> +               NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
>> +               '
>> +
>> +do_configure[depends] = "virtual/kernel:do_populate_sysroot"
>> +
>> +do_compile() {
>> +       oe_runmake all
>> +}
>> +
>> +do_compile[depends] = "${PERFDEPENDS}"
>> +
>> +do_install() {
>> +       oe_runmake DESTDIR=${D} install
>> +}
>> +
>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>> +
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] recipes-kernel: make perf a standalone package
  2012-06-16 17:34   ` Saul Wold
  2012-06-16 17:47     ` Bruce Ashfield
@ 2012-06-17  1:19     ` Bruce Ashfield
  2012-06-17  3:16     ` Bruce Ashfield
  2 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-17  1:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: liang.li

On Sat, Jun 16, 2012 at 1:34 PM, Saul Wold <saul.wold@intel.com> wrote:
> On 06/15/2012 01:23 PM, Bruce Ashfield wrote:
>>
>> From: Liang Li<liang.li@windriver.com>
>>
>> perf has been coupled to the kernel packages via kernel.bbclass.
>> While maintaining the build of perf out of the kernel source tree
>> is desired the package coupling has proved to be awkward in
>> several situations such as:
>>
>>   - when a kernel recipe doesn't want to build/provide perf
>>   - when licensing of dependencies would prohibit perf and hence
>>     the kernel from being built.
>>
>> To solve some of these problems, this recipe is the extraction of
>> the linux-tools.inc provided perf compilation into a standalone
>> perf recipe that builds out of the kernel source, but is otherwise
>> independent.
>>
>> No new functionality is provided above what the linux-tools.inc
>> variant provided, but the separate recipe provides baseline for
>> adding new functionality.
>>
>> Signed-off-by: Liang Li<liang.li@windriver.com>
>> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>> ---
>>  meta/classes/kernel.bbclass          |    7 +----
>>  meta/recipes-kernel/perf/perf_3.4.bb |   52
>> ++++++++++++++++++++++++++++++++++
>>  2 files changed, 53 insertions(+), 6 deletions(-)
>>  create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 116e10b..02234df 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -469,7 +469,7 @@ python populate_packages_prepend () {
>>        metapkg = "kernel-modules"
>>        d.setVar('ALLOW_EMPTY_' + metapkg, "1")
>>        d.setVar('FILES_' + metapkg, "")
>> -       blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>> 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
>> +       blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>> 'kernel-vmlinux', 'kernel-misc' ]
>>        for l in module_deps.values():
>>                for i in l:
>>                        pkg = module_pattern %
>> legitimize_package_name(re.match(module_regex,
>> os.path.basename(i)).group(1))
>> @@ -548,8 +548,3 @@ addtask deploy before do_build after do_install
>>
>>  EXPORT_FUNCTIONS do_deploy
>>
>> -# perf must be enabled in individual kernel recipes
>> -PACKAGES =+ "perf-dbg perf"
>> -FILES_perf = "${bindir}/* \
>> -              ${libexecdir}"
>> -FILES_perf-dbg = "${FILES_${PN}-dbg}"
>> diff --git a/meta/recipes-kernel/perf/perf_3.4.bb
>> b/meta/recipes-kernel/perf/perf_3.4.bb
>> new file mode 100644
>> index 0000000..9c8ceb0
>> --- /dev/null
>> +++ b/meta/recipes-kernel/perf/perf_3.4.bb
>> @@ -0,0 +1,52 @@
>> +SUMMARY = "Performance analysis tools for Linux"
>> +DESCRIPTION = "Performance counters for Linux are a new kernel-based \
>> +subsystem that provide a framework for all things \
>> +performance analysis. It covers hardware level \
>> +(CPU/PMU, Performance Monitoring Unit) features \
>> +and software features (software counters, tracepoints) \
>> +as well."
>> +
>> +LICENSE = "GPLv2"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>> +
>
> This fails to find the correct file in the poky-lsb case, not sure what is
> going on yet, but here is the error from the autobuilder.
>
> ERROR: Function failed: perf: LIC_FILES_CHKSUM points to an invalid file:
> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/kernel/source/COPYING
> NOTE: package perf-3.4-r0: task do_configure: Failed
> ERROR: Task 3336
> (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/meta/recipes-kernel/perf/perf_3.4.bb,
> do_configure) failed with exit code '1'
>
> This can be reproduced by setting DISTRO="poky-lsb" in your local.conf
>
> Please investigate, thanks

My turn to ask a question. What are the host requirements for poky-lsb, and why
aren't they checked up front ? I can't trigger the error, since I
can't build poky-lsb
on my builder, due to gdk-pixbuf-native failing in configure:

| checking sys/sysinfo.h usability... yes
| checking sys/sysinfo.h presence... yes
| checking for sys/sysinfo.h... yes
| checking for mediaLib 2.3... checking for mlib_ImageSetStruct in -lmlib... no
| checking for x86 platform... no
| checking for GDK_PIXBUF_XLIB_DEP... no
| configure: error: Package requirements (x11 gobject-2.0) were not met:
|
| No package 'x11' found

Bruce

>
>        Sau!
>
>
>
>> +PR = "r0"
>> +
>> +BUILDPERF_libc-uclibc = "no"
>> +
>> +PERFDEPENDS = " \
>> +virtual/${MLPREFIX}libc:do_populate_sysroot \
>> +${MLPREFIX}elfutils:do_populate_sysroot \
>> +${MLPREFIX}binutils:do_populate_sysroot \
>> +"
>> +RDEPENDS += "elfutils perl python"
>> +
>> +PROVIDES = "virtual/perf"
>> +
>> +S = "${STAGING_KERNEL_DIR}/source"
>> +B = "${WORKDIR}/${BPN}-${PV}"
>> +
>> +EXTRA_OEMAKE = \
>> +               '-C ${S}/tools/perf \
>> +               O=${B} \
>> +               CROSS_COMPILE=${TARGET_PREFIX} \
>> +               ARCH=${TARGET_ARCH} \
>> +               CC="${CC}" \
>> +               AR="${AR}" \
>> +               prefix=/usr \
>> +               NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
>> +               '
>> +
>> +do_configure[depends] = "virtual/kernel:do_populate_sysroot"
>> +
>> +do_compile() {
>> +       oe_runmake all
>> +}
>> +
>> +do_compile[depends] = "${PERFDEPENDS}"
>> +
>> +do_install() {
>> +       oe_runmake DESTDIR=${D} install
>> +}
>> +
>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>> +
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] recipes-kernel: make perf a standalone package
  2012-06-16 17:34   ` Saul Wold
  2012-06-16 17:47     ` Bruce Ashfield
  2012-06-17  1:19     ` Bruce Ashfield
@ 2012-06-17  3:16     ` Bruce Ashfield
  2012-06-19 19:11       ` Bruce Ashfield
  2 siblings, 1 reply; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-17  3:16 UTC (permalink / raw)
  To: Saul Wold; +Cc: liang.li, Patches and discussions about the oe-core layer

On 12-06-16 1:34 PM, Saul Wold wrote:
> On 06/15/2012 01:23 PM, Bruce Ashfield wrote:
>> From: Liang Li<liang.li@windriver.com>
>>
>> perf has been coupled to the kernel packages via kernel.bbclass.
>> While maintaining the build of perf out of the kernel source tree
>> is desired the package coupling has proved to be awkward in
>> several situations such as:
>>
>> - when a kernel recipe doesn't want to build/provide perf
>> - when licensing of dependencies would prohibit perf and hence
>> the kernel from being built.
>>
>> To solve some of these problems, this recipe is the extraction of
>> the linux-tools.inc provided perf compilation into a standalone
>> perf recipe that builds out of the kernel source, but is otherwise
>> independent.
>>
>> No new functionality is provided above what the linux-tools.inc
>> variant provided, but the separate recipe provides baseline for
>> adding new functionality.
>>
>> Signed-off-by: Liang Li<liang.li@windriver.com>
>> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>> ---
>> meta/classes/kernel.bbclass | 7 +----
>> meta/recipes-kernel/perf/perf_3.4.bb | 52
>> ++++++++++++++++++++++++++++++++++
>> 2 files changed, 53 insertions(+), 6 deletions(-)
>> create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 116e10b..02234df 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -469,7 +469,7 @@ python populate_packages_prepend () {
>> metapkg = "kernel-modules"
>> d.setVar('ALLOW_EMPTY_' + metapkg, "1")
>> d.setVar('FILES_' + metapkg, "")
>> - blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>> 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
>> + blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>> 'kernel-vmlinux', 'kernel-misc' ]
>> for l in module_deps.values():
>> for i in l:
>> pkg = module_pattern % legitimize_package_name(re.match(module_regex,
>> os.path.basename(i)).group(1))
>> @@ -548,8 +548,3 @@ addtask deploy before do_build after do_install
>>
>> EXPORT_FUNCTIONS do_deploy
>>
>> -# perf must be enabled in individual kernel recipes
>> -PACKAGES =+ "perf-dbg perf"
>> -FILES_perf = "${bindir}/* \
>> - ${libexecdir}"
>> -FILES_perf-dbg = "${FILES_${PN}-dbg}"
>> diff --git a/meta/recipes-kernel/perf/perf_3.4.bb
>> b/meta/recipes-kernel/perf/perf_3.4.bb
>> new file mode 100644
>> index 0000000..9c8ceb0
>> --- /dev/null
>> +++ b/meta/recipes-kernel/perf/perf_3.4.bb
>> @@ -0,0 +1,52 @@
>> +SUMMARY = "Performance analysis tools for Linux"
>> +DESCRIPTION = "Performance counters for Linux are a new kernel-based \
>> +subsystem that provide a framework for all things \
>> +performance analysis. It covers hardware level \
>> +(CPU/PMU, Performance Monitoring Unit) features \
>> +and software features (software counters, tracepoints) \
>> +as well."
>> +
>> +LICENSE = "GPLv2"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>> +
> This fails to find the correct file in the poky-lsb case, not sure what
> is going on yet, but here is the error from the autobuilder.
>
> ERROR: Function failed: perf: LIC_FILES_CHKSUM points to an invalid
> file:
> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/kernel/source/COPYING
>
> NOTE: package perf-3.4-r0: task do_configure: Failed
> ERROR: Task 3336
> (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/meta/recipes-kernel/perf/perf_3.4.bb,
> do_configure) failed with exit code '1'
>
> This can be reproduced by setting DISTRO="poky-lsb" in your local.conf
>
> Please investigate, thanks

I forced x11 off in my gdk-pixbuf (I couldn't fine the right DISTRO_FEATURE
tweak to do it .. but I digress), and I was able to build poky-lsb
just fine here.

NOTE: Running task 2673 of 2674 (ID: 8, 
/home/bruce/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs)
NOTE: package core-image-minimal-1.0-r0: task do_rootfs: Started
NOTE: package core-image-minimal-1.0-r0: task do_rootfs: Succeeded
NOTE: Running noexec task 2674 of 2674 (ID: 5, 
/home/bruce/poky/meta/recipes-core/images/core-image-minimal.bb, do_build)
NOTE: Tasks Summary: Attempted 2674 tasks of which 2595 didn't need to 
be rerun and all succeeded.

Care to elaborate on what exactly the autobuilder runs that would
trigger this .. and remember, I'm a kernel guy, so I'm not familiar
with all the ins and outs of what you may or may not being doing to
trigger this .. so the more specific you are, the easier it is for
me to help out.

(i.e. what image was I suppose to build ? Which MACHINE ?)

But as of now, I can't reproduce this, and it looks like a dependency
problem on the kernel sources that has never been triggered here, so
you are going to need to help me .. help you.

Cheers,

Bruce

>
> Sau!
>
>
>> +PR = "r0"
>> +
>> +BUILDPERF_libc-uclibc = "no"
>> +
>> +PERFDEPENDS = " \
>> +virtual/${MLPREFIX}libc:do_populate_sysroot \
>> +${MLPREFIX}elfutils:do_populate_sysroot \
>> +${MLPREFIX}binutils:do_populate_sysroot \
>> +"
>> +RDEPENDS += "elfutils perl python"
>> +
>> +PROVIDES = "virtual/perf"
>> +
>> +S = "${STAGING_KERNEL_DIR}/source"
>> +B = "${WORKDIR}/${BPN}-${PV}"
>> +
>> +EXTRA_OEMAKE = \
>> + '-C ${S}/tools/perf \
>> + O=${B} \
>> + CROSS_COMPILE=${TARGET_PREFIX} \
>> + ARCH=${TARGET_ARCH} \
>> + CC="${CC}" \
>> + AR="${AR}" \
>> + prefix=/usr \
>> + NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
>> + '
>> +
>> +do_configure[depends] = "virtual/kernel:do_populate_sysroot"
>> +
>> +do_compile() {
>> + oe_runmake all
>> +}
>> +
>> +do_compile[depends] = "${PERFDEPENDS}"
>> +
>> +do_install() {
>> + oe_runmake DESTDIR=${D} install
>> +}
>> +
>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>> +
>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] perf: make perf a standlone recipe
  2012-06-15 20:23 [PATCH 0/2] perf: make perf a standlone recipe Bruce Ashfield
  2012-06-15 20:23 ` [PATCH 1/2] recipes-kernel: make perf a standalone package Bruce Ashfield
  2012-06-15 20:23 ` [PATCH 2/2] recipes-kernel: remove linux-tools.inc Bruce Ashfield
@ 2012-06-18  0:13 ` Tom Zanussi
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Zanussi @ 2012-06-18  0:13 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: openembedded-core, liang.li, saul.wold

On Fri, 2012-06-15 at 16:23 -0400, Bruce Ashfield wrote:
> Richard/Saul,
> 
> We've wanted to do this for some time, and now have finally split
> out perf from being a sub-part of the kernel packages into a
> standalone package that is built out of the kernel sources.
> 
> I've built and tested this by adding task-core-tools-profile to
> my IMAGE_INSTALL, and perf behaves just as it did before.  I've
> also tested this on my oe-core checkout/repo, and it works fine
> there as well (but I'm using my easier to access contrib
> branch for now).
> 

Built and worked fine here on real hardware (crownbay) too...

Tested-by: Tom Zanussi <tom.zanussi@intel.com>



Tom

> There's additional work that can be done more easily once this
> is split, so please consider this for inclusion, but I'd like
> to keep this initial version as an exact functional match as
> what was previously in place.
> 
> I've removed the old linux-tools.inc and updated any kernel 
> recipes that I know about that have references to it. If there
> are other dependent recipes, they'll need to be updated.
> 
> From the patch itself:
> 
>   perf has been coupled to the kernel packages via kernel.bbclass.
>   While maintaining the build of perf out of the kernel source tree
>   is desired the package coupling has proved to be awkward in
>   several situations such as:
> 
>      - when a kernel recipe doesn't want to build/provide perf
>      - when licensing of dependencies would prohibit perf and hence
>        the kernel from being built.
> 
>   To solve some of these problems, this recipe is the extraction of
>   the linux-tools.inc provided perf compilation into a standalone
>   perf recipe that builds out of the kernel source, but is otherwise
>   independent.
> 
>   No new functionality is provided above what the linux-tools.inc
>   variant provided, but the separate recipe provides baseline for
>   adding new functionality.
> 
> This addresses [YOCTO #1552]
> 
> cc: Tom Zanussi <tom.zanussi@intel.com>
> cc: Liang Li <liang.li@windriver.com>
> 
> Cheers,
> 
> Bruce
> 
> The following changes since commit 4bb7ef94fca392bcd389ed7069280c238f8fe094:
> 
>   directfb: added missing Upstream-status (2012-06-15 15:44:39 +0100)
> 
> are available in the git repository at:
>   git://git.pokylinux.org/poky-contrib zedd/perf
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/perf
> 
> Bruce Ashfield (1):
>   recipes-kernel: remove linux-tools.inc
> 
> Liang Li (1):
>   recipes-kernel: make perf a standalone package
> 
>  meta/classes/kernel.bbclass                     |    7 +---
>  meta/recipes-kernel/linux/linux-tools.inc       |   41 ------------------
>  meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb |    2 -
>  meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb |    2 -
>  meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb |    2 -
>  meta/recipes-kernel/linux/linux-yocto_3.0.bb    |    2 -
>  meta/recipes-kernel/linux/linux-yocto_3.2.bb    |    2 -
>  meta/recipes-kernel/linux/linux-yocto_3.4.bb    |    2 -
>  meta/recipes-kernel/perf/perf_3.4.bb            |   52 +++++++++++++++++++++++
>  9 files changed, 53 insertions(+), 59 deletions(-)
>  delete mode 100644 meta/recipes-kernel/linux/linux-tools.inc
>  create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb
> 





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] recipes-kernel: make perf a standalone package
  2012-06-17  3:16     ` Bruce Ashfield
@ 2012-06-19 19:11       ` Bruce Ashfield
  0 siblings, 0 replies; 9+ messages in thread
From: Bruce Ashfield @ 2012-06-19 19:11 UTC (permalink / raw)
  To: Saul Wold; +Cc: liang.li, Patches and discussions about the oe-core layer

On Sat, Jun 16, 2012 at 11:16 PM, Bruce Ashfield
<bruce.ashfield@windriver.com> wrote:
> On 12-06-16 1:34 PM, Saul Wold wrote:
>>
>> On 06/15/2012 01:23 PM, Bruce Ashfield wrote:
>>>
>>> From: Liang Li<liang.li@windriver.com>
>>>
>>> perf has been coupled to the kernel packages via kernel.bbclass.
>>> While maintaining the build of perf out of the kernel source tree
>>> is desired the package coupling has proved to be awkward in
>>> several situations such as:
>>>
>>> - when a kernel recipe doesn't want to build/provide perf
>>> - when licensing of dependencies would prohibit perf and hence
>>> the kernel from being built.
>>>
>>> To solve some of these problems, this recipe is the extraction of
>>> the linux-tools.inc provided perf compilation into a standalone
>>> perf recipe that builds out of the kernel source, but is otherwise
>>> independent.
>>>
>>> No new functionality is provided above what the linux-tools.inc
>>> variant provided, but the separate recipe provides baseline for
>>> adding new functionality.
>>>
>>> Signed-off-by: Liang Li<liang.li@windriver.com>
>>> Signed-off-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>>> ---
>>> meta/classes/kernel.bbclass | 7 +----
>>> meta/recipes-kernel/perf/perf_3.4.bb | 52
>>> ++++++++++++++++++++++++++++++++++
>>> 2 files changed, 53 insertions(+), 6 deletions(-)
>>> create mode 100644 meta/recipes-kernel/perf/perf_3.4.bb
>>>
>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>> index 116e10b..02234df 100644
>>> --- a/meta/classes/kernel.bbclass
>>> +++ b/meta/classes/kernel.bbclass
>>> @@ -469,7 +469,7 @@ python populate_packages_prepend () {
>>> metapkg = "kernel-modules"
>>> d.setVar('ALLOW_EMPTY_' + metapkg, "1")
>>> d.setVar('FILES_' + metapkg, "")
>>> - blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>>> 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
>>> + blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base',
>>> 'kernel-vmlinux', 'kernel-misc' ]
>>> for l in module_deps.values():
>>> for i in l:
>>> pkg = module_pattern % legitimize_package_name(re.match(module_regex,
>>> os.path.basename(i)).group(1))
>>> @@ -548,8 +548,3 @@ addtask deploy before do_build after do_install
>>>
>>> EXPORT_FUNCTIONS do_deploy
>>>
>>> -# perf must be enabled in individual kernel recipes
>>> -PACKAGES =+ "perf-dbg perf"
>>> -FILES_perf = "${bindir}/* \
>>> - ${libexecdir}"
>>> -FILES_perf-dbg = "${FILES_${PN}-dbg}"
>>> diff --git a/meta/recipes-kernel/perf/perf_3.4.bb
>>> b/meta/recipes-kernel/perf/perf_3.4.bb
>>> new file mode 100644
>>> index 0000000..9c8ceb0
>>> --- /dev/null
>>> +++ b/meta/recipes-kernel/perf/perf_3.4.bb
>>> @@ -0,0 +1,52 @@
>>> +SUMMARY = "Performance analysis tools for Linux"
>>> +DESCRIPTION = "Performance counters for Linux are a new kernel-based \
>>> +subsystem that provide a framework for all things \
>>> +performance analysis. It covers hardware level \
>>> +(CPU/PMU, Performance Monitoring Unit) features \
>>> +and software features (software counters, tracepoints) \
>>> +as well."
>>> +
>>> +LICENSE = "GPLv2"
>>> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>>> +
>>
>> This fails to find the correct file in the poky-lsb case, not sure what
>> is going on yet, but here is the error from the autobuilder.
>>
>> ERROR: Function failed: perf: LIC_FILES_CHKSUM points to an invalid
>> file:
>>
>> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/kernel/source/COPYING
>>
>> NOTE: package perf-3.4-r0: task do_configure: Failed
>> ERROR: Task 3336
>>
>> (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/meta/recipes-kernel/perf/perf_3.4.bb,
>> do_configure) failed with exit code '1'
>>
>> This can be reproduced by setting DISTRO="poky-lsb" in your local.conf
>>
>> Please investigate, thanks
>
>
> I forced x11 off in my gdk-pixbuf (I couldn't fine the right DISTRO_FEATURE
> tweak to do it .. but I digress), and I was able to build poky-lsb
> just fine here.
>
> NOTE: Running task 2673 of 2674 (ID: 8,
> /home/bruce/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs)
> NOTE: package core-image-minimal-1.0-r0: task do_rootfs: Started
> NOTE: package core-image-minimal-1.0-r0: task do_rootfs: Succeeded
> NOTE: Running noexec task 2674 of 2674 (ID: 5,
> /home/bruce/poky/meta/recipes-core/images/core-image-minimal.bb, do_build)
> NOTE: Tasks Summary: Attempted 2674 tasks of which 2595 didn't need to be
> rerun and all succeeded.
>
> Care to elaborate on what exactly the autobuilder runs that would
> trigger this .. and remember, I'm a kernel guy, so I'm not familiar
> with all the ins and outs of what you may or may not being doing to
> trigger this .. so the more specific you are, the easier it is for
> me to help out.
>
> (i.e. what image was I suppose to build ? Which MACHINE ?)
>
> But as of now, I can't reproduce this, and it looks like a dependency
> problem on the kernel sources that has never been triggered here, so
> you are going to need to help me .. help you.

Saul and I have worked out some of the details on this, I've reworked the perf
recipe to be less like the kernel.bbclass variant, and a better citizen of the
sysroot.

Once my testing completes, I'll resubmit the series.

Cheers,

Bruce

>
> Cheers,
>
> Bruce
>
>
>>
>> Sau!
>>
>>
>>> +PR = "r0"
>>> +
>>> +BUILDPERF_libc-uclibc = "no"
>>> +
>>> +PERFDEPENDS = " \
>>> +virtual/${MLPREFIX}libc:do_populate_sysroot \
>>> +${MLPREFIX}elfutils:do_populate_sysroot \
>>> +${MLPREFIX}binutils:do_populate_sysroot \
>>> +"
>>> +RDEPENDS += "elfutils perl python"
>>> +
>>> +PROVIDES = "virtual/perf"
>>> +
>>> +S = "${STAGING_KERNEL_DIR}/source"
>>> +B = "${WORKDIR}/${BPN}-${PV}"
>>> +
>>> +EXTRA_OEMAKE = \
>>> + '-C ${S}/tools/perf \
>>> + O=${B} \
>>> + CROSS_COMPILE=${TARGET_PREFIX} \
>>> + ARCH=${TARGET_ARCH} \
>>> + CC="${CC}" \
>>> + AR="${AR}" \
>>> + prefix=/usr \
>>> + NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
>>> + '
>>> +
>>> +do_configure[depends] = "virtual/kernel:do_populate_sysroot"
>>> +
>>> +do_compile() {
>>> + oe_runmake all
>>> +}
>>> +
>>> +do_compile[depends] = "${PERFDEPENDS}"
>>> +
>>> +do_install() {
>>> + oe_runmake DESTDIR=${D} install
>>> +}
>>> +
>>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>>> +
>>
>>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-06-19 19:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 20:23 [PATCH 0/2] perf: make perf a standlone recipe Bruce Ashfield
2012-06-15 20:23 ` [PATCH 1/2] recipes-kernel: make perf a standalone package Bruce Ashfield
2012-06-16 17:34   ` Saul Wold
2012-06-16 17:47     ` Bruce Ashfield
2012-06-17  1:19     ` Bruce Ashfield
2012-06-17  3:16     ` Bruce Ashfield
2012-06-19 19:11       ` Bruce Ashfield
2012-06-15 20:23 ` [PATCH 2/2] recipes-kernel: remove linux-tools.inc Bruce Ashfield
2012-06-18  0:13 ` [PATCH 0/2] perf: make perf a standlone recipe Tom Zanussi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.