summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-kernel/blktrace
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 20:05:37 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 04:26:31 +0300
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-kernel/blktrace
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadopenbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-kernel/blktrace')
-rw-r--r--poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch114
-rw-r--r--poky/meta/recipes-kernel/blktrace/blktrace_git.bb41
2 files changed, 155 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
new file mode 100644
index 000000000..ab905cf0d
--- /dev/null
+++ b/poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -0,0 +1,114 @@
+blktrace: obey LDFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+the patch was imported from meta-mentor layer on yoctoproject git server
+http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
+aed463414e2e2bf8ca44ba54ee5973e7ed599e57
+
+Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -1,5 +1,6 @@
+ CC = gcc
+ CFLAGS = -Wall -O2 -g -W
++LDFLAGS =
+ ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
+ LIBS = -lpthread
+@@ -26,19 +27,19 @@ btreplay/btreplay:
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
+
+ blktrace: blktrace.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
+
+ verify_blkparse: verify_blkparse.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
+
+ blkrawverify: blkrawverify.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
+
+ blkiomon: blkiomon.o rbtree.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt $(LDFLAGS)
+
+ $(PROGS): | depend
+
+Index: git/btreplay/Makefile
+===================================================================
+--- git.orig/btreplay/Makefile
++++ git/btreplay/Makefile
+@@ -7,6 +7,7 @@
+
+ CC = gcc
+ CFLAGS = -Wall -W -O2 -g
++LDFLAGS =
+ INCS = -I. -I.. -I../btt
+ OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
+ XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+@@ -32,10 +33,10 @@ clean: docsclean
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btrecord: btrecord.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
+
+ btreplay: btreplay.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
+
+ depend:
+ @$(CC) -MM $(CFLAGS) *.c 1> .depend
+Index: git/btt/Makefile
+===================================================================
+--- git.orig/btt/Makefile
++++ git/btt/Makefile
+@@ -7,6 +7,7 @@
+
+ CC = gcc
+ CFLAGS = -Wall -W -O2 -g
++LDFLAGS =
+ INCS = -I. -I..
+ XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ override CFLAGS += $(INCS) $(XCFLAGS)
+@@ -38,7 +39,7 @@ clean: docsclean
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btt: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
+
+ ifneq ($(wildcard .depend),)
+ include .depend
+Index: git/iowatcher/Makefile
+===================================================================
+--- git.orig/iowatcher/Makefile
++++ git/iowatcher/Makefile
+@@ -1,5 +1,6 @@
+ CC = gcc
+ CFLAGS = -Wall -O2 -g -W -Wunused-result
++LDFLAGS =
+ ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+
+ PROGS = iowatcher
+@@ -19,7 +20,7 @@ all: $(ALL)
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
++ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt
+
+ depend:
+ @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
diff --git a/poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/poky/meta/recipes-kernel/blktrace/blktrace_git.bb
new file mode 100644
index 000000000..663de2ed5
--- /dev/null
+++ b/poky/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Generates traces of I/O traffic on block devices"
+HOMEPAGE = "http://brick.kernel.dk/snaps/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+DEPENDS = "libaio"
+
+SRCREV = "cca113f2fe0759b91fd6a0e10fdcda2c28f18a7e"
+
+PV = "1.2.0+git${SRCPV}"
+
+SRC_URI = "git://git.kernel.dk/blktrace.git \
+ file://ldflags.patch \
+"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "\
+ 'CC=${CC}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+"
+
+# There are a few parallel issues:
+# 1) ../rbtree.o: error adding symbols: Invalid operation
+# collect2: error: ld returned 1 exit status
+# Makefile:42: recipe for target 'btt' failed
+# 2) git/blkiomon.c:216: undefined reference to `rb_insert_color'
+# collect2: error: ld returned 1 exit status
+# Makefile:27: recipe for target 'blkparse' failed
+# 3) ld: rbtree.o: invalid string offset 128 >= 125 for section `.strtab'
+# 4) btreplay.o: file not recognized: File truncated
+# collect2: error: ld returned 1 exit status
+# btreplay/btreplay.c:47:18: fatal error: list.h: No such file or directory
+PARALLEL_MAKE = ""
+
+do_install() {
+ oe_runmake ARCH="${ARCH}" prefix=${prefix} \
+ mandir=${mandir} DESTDIR=${D} install
+}
+