linux-tools: update to 4.12.
Add tmon and turbostat, fix musl.
This commit is contained in:
parent
47e5a64f21
commit
8851ca272b
|
@ -0,0 +1,32 @@
|
|||
--- tools/include/uapi/linux/perf_event.h.orig
|
||||
+++ tools/include/uapi/linux/perf_event.h
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifndef _UAPI_LINUX_PERF_EVENT_H
|
||||
#define _UAPI_LINUX_PERF_EVENT_H
|
||||
|
||||
+#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <asm/byteorder.h>
|
||||
--- tools/power/x86/turbostat/turbostat.c.orig
|
||||
+++ tools/power/x86/turbostat/turbostat.c
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <cpuid.h>
|
||||
#include <linux/capability.h>
|
||||
#include <errno.h>
|
||||
+#include <limits.h>
|
||||
|
||||
char *proc_stat = "/proc/stat";
|
||||
FILE *outf;
|
||||
--- tools/thermal/tmon/tmon.h.orig
|
||||
+++ tools/thermal/tmon/tmon.h
|
||||
@@ -19,6 +19,9 @@
|
||||
#ifndef TMON_H
|
||||
#define TMON_H
|
||||
|
||||
+#include <pthread.h>
|
||||
+#include <sys/time.h>
|
||||
+
|
||||
#define MAX_DISP_TEMP 125
|
||||
#define MAX_CTRL_TEMP 105
|
||||
#define MIN_CTRL_TEMP 40
|
|
@ -0,0 +1,20 @@
|
|||
--- tools/power/x86/turbostat/Makefile.orig
|
||||
+++ tools/power/x86/turbostat/Makefile
|
||||
@@ -8,13 +8,13 @@
|
||||
endif
|
||||
|
||||
turbostat : turbostat.c
|
||||
-CFLAGS += -Wall
|
||||
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
|
||||
-CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
|
||||
+override CFLAGS += -Wall
|
||||
+override CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
|
||||
+override CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
|
||||
|
||||
%: %.c
|
||||
@mkdir -p $(BUILD_OUTPUT)
|
||||
- $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
|
||||
+ $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS)
|
||||
|
||||
.PHONY : clean
|
||||
clean :
|
|
@ -1,29 +1,29 @@
|
|||
# Template file for 'linux-tools'
|
||||
pkgname=linux-tools
|
||||
version=4.9
|
||||
revision=2
|
||||
version=4.12
|
||||
revision=1
|
||||
build_style=meta
|
||||
wrksrc="linux-${version}"
|
||||
short_desc="Linux kernel tools meta-pkg"
|
||||
hostmakedepends="flex perl asciidoc xmlto python automake libtool"
|
||||
makedepends="pciutils-devel python-devel libglib-devel libsysfs-devel
|
||||
elfutils-devel libunwind-devel binutils-devel zlib-devel slang-devel
|
||||
eudev-libudev-devel liblzma-devel libressl-devel"
|
||||
eudev-libudev-devel liblzma-devel libressl-devel ncurses-devel"
|
||||
depends="cpupower-${version}_${revision} perf-${version}_${revision} usbip-${version}_${revision}"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-2"
|
||||
homepage="https://www.kernel.org"
|
||||
distfiles="${KERNEL_SITE}/kernel/v4.x/linux-${version}.tar.xz"
|
||||
checksum=029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a
|
||||
checksum=a45c3becd4d08ce411c14628a949d08e2433d8cdeca92036c7013980e93858ab
|
||||
|
||||
subpackages="cpupower libcpupower libcpupower-devel libusbip libusbip-devel usbip perf freefall"
|
||||
subpackages="cpupower libcpupower libcpupower-devel libusbip libusbip-devel usbip perf freefall tmon"
|
||||
|
||||
CFLAGS="-Wno-error"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*|x86_64*)
|
||||
makedepends+=" libnuma-devel"
|
||||
depends+=" x86_energy_perf_policy>=${version}"
|
||||
subpackages+=" x86_energy_perf_policy"
|
||||
depends+=" x86_energy_perf_policy>=${version} turbostat>=${version}"
|
||||
subpackages+=" x86_energy_perf_policy turbostat"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -32,6 +32,7 @@ nocross=yes
|
|||
post_extract() {
|
||||
sed -i 's/\$(LIBS)/& $(LDFLAGS)/' tools/power/cpupower/bench/Makefile
|
||||
sed -i 's/SIGCLD/SIGCHLD/g' tools/usb/usbip/src/usbipd.c
|
||||
sed -i 's/^CFLAGS/override &/g' tools/thermal/tmon/Makefile
|
||||
}
|
||||
do_build() {
|
||||
cd ${wrksrc}/tools/perf
|
||||
|
@ -48,6 +49,9 @@ do_build() {
|
|||
i686*|x86_64*)
|
||||
cd ${wrksrc}/tools/power/x86/x86_energy_perf_policy
|
||||
make ${makejobs}
|
||||
|
||||
cd ${wrksrc}/tools/power/x86/turbostat
|
||||
make ${makejobs} CC=$CC LD=$LD CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
||||
esac
|
||||
|
||||
cd ${wrksrc}/tools/laptop/freefall
|
||||
|
@ -59,6 +63,9 @@ do_build() {
|
|||
./autogen.sh
|
||||
./configure --prefix=/usr --sbindir=/usr/bin
|
||||
make ${makejobs}
|
||||
|
||||
cd ${wrksrc}/tools/thermal/tmon
|
||||
make ${makejobs} CC=$CC LD=$LD CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
@ -174,3 +181,19 @@ freefall_package() {
|
|||
vsv freefall
|
||||
}
|
||||
}
|
||||
turbostat_package() {
|
||||
short_desc="Report processor frequency and idle statistics"
|
||||
pkg_install() {
|
||||
cd ${wrksrc}/tools/power/x86/turbostat
|
||||
vbin turbostat
|
||||
vman turbostat.8
|
||||
}
|
||||
}
|
||||
tmon_package() {
|
||||
short_desc="Monitoring and Testing Tool for Linux kernel thermal subsystem"
|
||||
pkg_install() {
|
||||
cd ${wrksrc}/tools/thermal/tmon
|
||||
vbin tmon
|
||||
vman tmon.8
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
linux-tools
|
|
@ -0,0 +1 @@
|
|||
linux-tools
|
Loading…
Reference in New Issue