On Sat, May 29, 2010 at 11:08:35PM +0200, Remy Bohmer wrote: > Signed-off-by: Remy Bohmer <li...@bohmer.net> > --- > patches/latencytop-0.5/repair-cross-compile.patch | 30 ++++++++ > patches/latencytop-0.5/series | 1 + > rules/latencytop.in | 24 +++++++ > rules/latencytop.make | 75 > +++++++++++++++++++++ > 4 files changed, 130 insertions(+), 0 deletions(-) > create mode 100644 patches/latencytop-0.5/repair-cross-compile.patch > create mode 100644 patches/latencytop-0.5/series > create mode 100644 rules/latencytop.in > create mode 100644 rules/latencytop.make > > diff --git a/patches/latencytop-0.5/repair-cross-compile.patch > b/patches/latencytop-0.5/repair-cross-compile.patch > new file mode 100644 > index 0000000..542c7c4 > --- /dev/null > +++ b/patches/latencytop-0.5/repair-cross-compile.patch > @@ -0,0 +1,30 @@ > +Adapt the Makefile for Cross-compilation > + > +Signed-off-by: Remy Bohmer <li...@bohmer.net> > +--- > + Makefile | 6 ++++-- > + 1 file changed, 4 insertions(+), 2 deletions(-) > + > +Index: latencytop-0.5/Makefile > +=================================================================== > +--- latencytop-0.5.orig/Makefile > ++++ latencytop-0.5/Makefile > +@@ -26,14 +26,16 @@ endif > + > + # We write explicity this "implicit rule" > + %.o : %.c > +- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ > ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(XCFLAGS) $< -o $@ > + > + latencytop: $(OBJS) latencytop.h Makefile > +- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop > ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDF) -o latencytop > + > ++.PHONY: clean > + clean: > + rm -f *~ latencytop DEADJOE *.o > + > ++.PHONY: install > + install: latencytop > + mkdir -p $(DESTDIR)/usr/share/latencytop > + install -m 0644 latencytop.trans > $(DESTDIR)/usr/share/latencytop/latencytop.trans > diff --git a/patches/latencytop-0.5/series b/patches/latencytop-0.5/series > new file mode 100644 > index 0000000..3da175e > --- /dev/null > +++ b/patches/latencytop-0.5/series > @@ -0,0 +1 @@ > +repair-cross-compile.patch > diff --git a/rules/latencytop.in b/rules/latencytop.in > new file mode 100644 > index 0000000..2160aee > --- /dev/null > +++ b/rules/latencytop.in > @@ -0,0 +1,24 @@ > +## SECTION=shell_and_console > + > +config LATENCYTOP > + tristate > + prompt "LatencyTOP" > + select GLIB > + select NCURSES > + select NCURSES_WIDE_CHAR > + help > + Skipping audio, slower servers, everyone knows the symptoms of > latency. > + But to know what's going on in the system, what's causing the > latency, how > + to fix it... that's a hard question without good answers right now. > + LatencyTOP is a Linux* tool for software developers (both kernel and > userspace), > + aimed at identifying where in the system latency is happening, and > what kind > + of operation/action is causing the latency to happen so that the code > can > + be changed to avoid the worst latency hiccups. > + There are many types and causes of latency. LatencyTOP focuses on the > type > + of latency that causes skips in audio, stutters in your desktop > experience > + or that overloads your server (while you have plenty of CPU power > left). > + LatencyTOP focuses on the cases where the applications want to run and > + execute useful code, but there's some resource that's not currently > available > + (and the kernel then blocks the process). This is done both on a > system level > + and on a per process level, so that you can see what's happening to > the system, > + and which process is suffering and/or causing the delays. > diff --git a/rules/latencytop.make b/rules/latencytop.make > new file mode 100644 > index 0000000..532bc37 > --- /dev/null > +++ b/rules/latencytop.make > @@ -0,0 +1,75 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2010 by Remy Bohmer <li...@bohmer.net> > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_LATENCYTOP) += latencytop > + > +# > +# Paths and names > +# > +LATENCYTOP_VERSION := 0.5 > +LATENCYTOP := latencytop-$(LATENCYTOP_VERSION) > +LATENCYTOP_SUFFIX := tar.gz > +LATENCYTOP_URL := > http://www.latencytop.org/download/$(LATENCYTOP).$(LATENCYTOP_SUFFIX) > +LATENCYTOP_SOURCE := $(SRCDIR)/$(LATENCYTOP).$(LATENCYTOP_SUFFIX) > +LATENCYTOP_DIR := $(BUILDDIR)/$(LATENCYTOP) > +LATENCYTOP_LICENSE := GPLv2 > + > +# > ---------------------------------------------------------------------------- > +# Get > +# > ---------------------------------------------------------------------------- > + > +$(LATENCYTOP_SOURCE): > + @$(call targetinfo) > + @$(call get, LATENCYTOP) > + > +# > ---------------------------------------------------------------------------- > +# Prepare > +# > ---------------------------------------------------------------------------- > + > +LATENCYTOP_PATH := PATH=$(CROSS_PATH)
This line can be removed. The default will be used if LATENCYTOP_PATH is not defined. > +LATENCYTOP_CONF_TOOL := NO > +LATENCYTOP_ENV := $(CROSS_ENV) Same here. > +LATENCYTOP_COMPILE_ENV := $(CROSS_ENV_FLAGS) > +LATENCYTOP_MAKE_OPT := \ > + $(CROSS_ENV_CC) \ > + HAS_GTK_GUI= > +LATENCYTOP_INSTALL_OPT := \ > + $(LATENCYTOP_MAKE_OPT) \ > + DESTDIR=$(LATENCYTOP_PKGDIR) \ > + install > + > +# > ---------------------------------------------------------------------------- > +# Target-Install > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/latencytop.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, latencytop) > + @$(call install_fixup, latencytop,PACKAGE,latencytop) > + @$(call install_fixup, latencytop,PRIORITY,optional) > + @$(call install_fixup, latencytop,VERSION,$(LATENCYTOP_VERSION)) > + @$(call install_fixup, latencytop,SECTION,base) > + @$(call install_fixup, latencytop,AUTHOR,"Remy Bohmer > <li...@bohmer.net>") > + @$(call install_fixup, latencytop,DEPENDS,) > + @$(call install_fixup, latencytop,DESCRIPTION,missing) > + > + @$(call install_copy, latencytop, 0, 0, 0644, -, > /usr/share/latencytop/latencytop.trans) @$(call install_copy, latencytop, 0, 0, 0644, -, \ /usr/share/latencytop/latencytop.trans) We try to keep the lines <80 chars. > + @$(call install_copy, latencytop, 0, 0, 0755, -, /usr/sbin/latencytop) > + > + @$(call install_finish, latencytop) > + > + @$(call touch) > + > + > +# vim: syntax=make > -- > 1.7.0.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de