Skip to contentSkip to conversation

cpupower: keep header files for other packages and package systemd service

PATCH New Peter Bergin 1 participant 2 messages Mar 16

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 cpupower: keep header files for other packages and package systemd service

When having a DEPENDS against cpupower it need to leave its header files. Remove that cleanup that has been present since the beginning of the recipe without any (to me) known reason.

cpupower ship a systemd service and config file in kernel source tree since kernel 6.16. Package them as a separate package cpupower-systemd to be installed if wanted.

Add cpupower to packagegroup-meta-oe to be included in builds of all packages.

---
 .../recipes-core/packagegroups/packagegroup-meta-oe.bb   | 1 +
 meta-oe/recipes-kernel/cpupower/cpupower.bb              | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -0
index 87f8a1eed5..9fd7af6c08 100644
@@ -52,6 +52,7 @@ RDEPENDS:packagegroup-meta-oe = "\
 
 RDEPENDS:packagegroup-meta-oe-benchmarks = "\
     bonnie++ \
+    cpupower \
     dbench \
     dhrystone \
     fio \
meta-oe/recipes-kernel/cpupower/cpupower.bb +5 -4
index 453ebe8c7f..b453308770 100644
@@ -5,6 +5,8 @@ LICENSE = "GPL-2.0-only"
 DEPENDS = "pciutils gettext-native"
 PROVIDES = "virtual/cpupower"
 
+B = "${WORKDIR}/${BPN}-${PV}"
+
 inherit kernelsrc kernel-arch bash-completion
 
 do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
@@ -19,17 +21,16 @@ do_compile() {
 
 do_install() {
     oe_runmake DESTDIR=${D} install
-    # Do not ship headers
-    rm -rf ${D}${includedir}
     chown -R root:root ${D}
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
+PACKAGES =+ "${PN}-systemd"
+
+FILES:${PN}-systemd = "${sysconfdir}/cpupower-service.conf ${systemd_unitdir}"
 
 RDEPENDS:${PN} = "bash"
 
 python do_package:prepend() {
     d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
 }
-
-B = "${WORKDIR}/${BPN}-${PV}"
#1 lore raw

PATCH v2 2/2 rtla: add recipe for real-time linux analysis tool

rtla source code is present in the kernel source tree at tools/tracing/rtla. There is another build option for rtla to enable bpf bindings, this was not a quick one to get working and left as a future improvement.

Makefile for rtla has evolved in newer kernels (v6.9). Some fixes needed for support with older kernels. This commit was tested against 6.18 and 6.8.

Also add rtla to packagegroup-meta-oe-benchmarks.

---
Changes in v2:
- Add -D_GNU_SOURCE to fix detection of libtracefs in musl build. The feature test compiles and cpu_set_t is behind a guard with _GNU_SOURCE for musl which make it fail.

 .../packagegroups/packagegroup-meta-oe.bb     |  1 +
 meta-oe/recipes-kernel/rtla/rtla.bb           | 47 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/rtla/rtla.bb
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -0
index 9fd7af6c08..0cbe3964c4 100644
@@ -68,6 +68,7 @@ RDEPENDS:packagegroup-meta-oe-benchmarks = "\
     nbench-byte \
     phoronix-test-suite \
     qperf \
+    rtla \
     s-suite \
     stressapptest \
     tinymembench \
meta-oe/recipes-kernel/rtla/rtla.bb new file +47 -0

47 lines not on this page · raw message