Squashed 'import-layers/meta-openembedded/' content from commit 247b126

Change-Id: I40827e9ce5fba63f1cca2a0be44976ae8383b4c0
git-subtree-dir: import-layers/meta-openembedded
git-subtree-split: 247b1267bbe95719cd4877d2d3cfbaf2a2f4865a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch
new file mode 100644
index 0000000..229647f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch
@@ -0,0 +1,34 @@
+From cbaaa42933bb27b1bcff4c7d71d54c913201ee88 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Fri, 9 Jan 2015 11:51:18 +0900
+Subject: [PATCH] cross_add_configure_option
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9c44633..39bebd0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -229,7 +229,7 @@ gdb_merge: force
+ 	@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
+ 	@rm -f ${PROGRAM}
+ 	@if [ ! -f ${GDB}/config.status ]; then \
+-	  (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \
++	  (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \
+ 	    --with-bugurl="" --with-expat=no --with-python=no; \
+ 	  make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
+ 	else make --no-print-directory rebuild; fi
+@@ -277,7 +277,7 @@ force:
+ 
+ make_configure: force
+ 	@rm -f configure
+-	@${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS}
++	@cc ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS}
+ 
+ clean: make_configure
+ 	@./configure ${CONF_TARGET_FLAG} -q -b
+-- 
+1.8.4.2
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/7001force_define_architecture.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/7001force_define_architecture.patch
new file mode 100644
index 0000000..0d44c7f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/7001force_define_architecture.patch
@@ -0,0 +1,13 @@
+diff -uprN crash-5.1.8.org/configure.c crash-5.1.8/configure.c
+--- crash-5.1.8.org/configure.c	2011-09-17 04:01:12.000000000 +0900
++++ crash-5.1.8/configure.c	2012-09-13 13:28:45.393344108 +0900
+@@ -391,6 +391,9 @@ get_current_configuration(struct support
+ 			arch_mismatch(sp);
+ 	}
+ 
++	/** Force define archtecture */
++	target_data.target = FORCE_DEFINE_ARCH;
++
+         if ((fp = fopen("Makefile", "r")) == NULL) {
+ 		perror("Makefile");
+ 		goto get_release;
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch
new file mode 100644
index 0000000..d567fa0
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch
@@ -0,0 +1,10 @@
+--- crash-5.1.8/Makefile.orig	2011-12-27 11:21:58.220652105 +0900
++++ crash-5.1.8/Makefile	2011-12-27 11:22:29.563651593 +0900
+@@ -285,6 +285,7 @@
+ 
+ library: make_build_data ${OBJECT_FILES}
+ 	ar -rs ${PROGRAM}lib.a ${OBJECT_FILES}
++	${RANLIB} ${PROGRAM}lib.a 
+ 
+ gdb: force
+ 	rm -f ${GDB_OFILES}
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9 b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9
new file mode 100644
index 0000000..d6fc22f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9
@@ -0,0 +1 @@
+bash_cv_have_mbstate_t=yes
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch
new file mode 100644
index 0000000..e254fe8
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch
@@ -0,0 +1,32 @@
+Put gdb source tarball in SRC_URI and don't fetch and extract it during
+do_compile.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/Makefile b/Makefile
+index bb0a34e..5eb7604 100644
+--- a/Makefile
++++ b/Makefile
+@@ -226,7 +226,7 @@ all: make_configure
+ #	@make --no-print-directory extensions
+ 
+ gdb_merge: force
+-	@if [ ! -f ${GDB}/README ]; then \
++	@if [ ! -f ${GDB}/${GDB}.patch ]; then \
+ 	  make --no-print-directory gdb_unzip; fi
+ 	@echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
+ 	@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
+@@ -253,11 +253,6 @@ gdb_unzip:
+ 	@rm -f gdb.files
+ 	@for FILE in ${GDB_FILES} dummy; do\
+ 	  echo $$FILE >> gdb.files; done
+-	@if [ ! -f ${GDB}.tar.gz ] && [ ! -f /usr/bin/wget ]; then \
+-	  echo /usr/bin/wget is required to download ${GDB}.tar.gz; echo; exit 1; fi
+-	@if [ ! -f ${GDB}.tar.gz ] && [ -f /usr/bin/wget ]; then \
+-	  wget http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi
+-	@tar --exclude-from gdb.files -xvzmf ${GDB}.tar.gz
+ 	@make --no-print-directory gdb_patch
+ 
+ gdb_patch:
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch
new file mode 100644
index 0000000..3f4d1bc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch
@@ -0,0 +1,26 @@
+This enables parallel building (multiple jobs in gdb) by reading the
+value from GDB_MAKE_JOBS.
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+
+Upstream-Status: Pending
+
+Don't write ${TARGET} to crash.target which causes rebuild fails.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+--
+diff --git a/Makefile b/Makefile
+index 27a1d47..bcf2d2f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -232,8 +232,8 @@ gdb_merge: force
+ 	@if [ ! -f ${GDB}/config.status ]; then \
+ 	  (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \
+ 	    --with-bugurl="" --with-expat=no --with-python=no; \
+-	  make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
+-	else make --no-print-directory rebuild; fi
++	  make --no-print-directory CRASH_TARGET=${TARGET} ${GDB_MAKE_JOBS}; ) \
++	else make --no-print-directory ${GDB_MAKE_JOBS} rebuild; fi
+ 	@if [ ! -f ${PROGRAM} ]; then \
+ 	  echo; echo "${PROGRAM} build failed"; \
+ 	  echo; exit 1; fi
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch
new file mode 100644
index 0000000..c24db10
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+It fails to build crash for mips with error:
+
+| mips-wrs-linux-gcc: error: unrecognized command line option '-m32'
+| Makefile:291: recipe for target 'make_build_data' failed
+
+So remove the unrecognized option '-m32' for mips.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/configure.c b/configure.c
+index cf1973b..71e97b3 100644
+--- a/configure.c
++++ b/configure.c
+@@ -148,7 +148,7 @@ void add_extra_lib(char *);
+ #define TARGET_CFLAGS_PPC64_ON_X86_64  "TARGET_CFLAGS="
+ #define TARGET_CFLAGS_MIPS            "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64"
+ #define TARGET_CFLAGS_MIPS_ON_X86     "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64"
+-#define TARGET_CFLAGS_MIPS_ON_X86_64  "TARGET_CFLAGS=-m32 -D_FILE_OFFSET_BITS=64"
++#define TARGET_CFLAGS_MIPS_ON_X86_64  "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64"
+ 
+ #define GDB_TARGET_DEFAULT        "GDB_CONF_FLAGS="
+ #define GDB_TARGET_ARM_ON_X86     "GDB_CONF_FLAGS=--target=arm-elf-linux"
+@@ -158,7 +158,7 @@ void add_extra_lib(char *);
+ #define GDB_TARGET_ARM64_ON_X86_64  "GDB_CONF_FLAGS=--target=aarch64-elf-linux"   /* TBD */
+ #define GDB_TARGET_PPC64_ON_X86_64  "GDB_CONF_FLAGS=--target=powerpc64le-unknown-linux-gnu"
+ #define GDB_TARGET_MIPS_ON_X86     "GDB_CONF_FLAGS=--target=mipsel-elf-linux"
+-#define GDB_TARGET_MIPS_ON_X86_64  "GDB_CONF_FLAGS=--target=mipsel-elf-linux CFLAGS=-m32"
++#define GDB_TARGET_MIPS_ON_X86_64  "GDB_CONF_FLAGS=--target=mipsel-elf-linux"
+      
+ /*
+  *  The original plan was to allow the use of a particular version
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch
new file mode 100644
index 0000000..0185b57
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch
@@ -0,0 +1,79 @@
+Upstream-Status: Backport
+
+https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=92fc615
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+--
+From 92fc6153a6fdf2a027d9780f5945712aafad4a9e Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 29 Mar 2015 15:59:01 -0400
+Subject: [PATCH] sim: common: sim-arange: fix extern inline handling
+
+With newer versions of gcc (5.x), the extern inline we're using with the
+sim-arange module no longer works.  Since this code really wants the gnu
+inline semantics, use that attribute explicitly.
+
+Reported-by: DJ Delorie <dj@redhat.com>
+Reported-by: Joel Sherrill <joel.sherrill@oarcorp.com>
+---
+ gdb-7.6/sim/common/sim-arange.h | 20 ++++++++++++--------
+ gdb-7.6/sim/common/sim-inline.h |  4 +++-
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/gdb-7.6/sim/common/sim-arange.h b/gdb-7.6/sim/common/sim-arange.h
+index 73117f3..de842c9 100644
+--- a/gdb-7.6/sim/common/sim-arange.h
++++ b/gdb-7.6/sim/common/sim-arange.h
+@@ -60,22 +60,26 @@ extern void sim_addr_range_delete (ADDR_RANGE * /*ar*/,
+ 				   address_word /*start*/,
+ 				   address_word /*end*/);
+ 
++/* TODO: This should get moved into sim-inline.h.  */
++#ifdef HAVE_INLINE
++#ifdef SIM_ARANGE_C
++#define SIM_ARANGE_INLINE INLINE
++#else
++#define SIM_ARANGE_INLINE EXTERN_INLINE
++#endif
++#else
++#define SIM_ARANGE_INLINE EXTERN
++#endif
++
+ /* Return non-zero if ADDR is in range AR, traversing the entire tree.
+    If no range is specified, that is defined to mean "everything".  */
+-extern INLINE int
++SIM_ARANGE_INLINE int
+ sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
+ #define ADDR_RANGE_HIT_P(ar, addr) \
+   ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
+ 
+ #ifdef HAVE_INLINE
+-#ifdef SIM_ARANGE_C
+-#define SIM_ARANGE_INLINE INLINE
+-#else
+-#define SIM_ARANGE_INLINE EXTERN_INLINE
+-#endif
+ #include "sim-arange.c"
+-#else
+-#define SIM_ARANGE_INLINE
+ #endif
+ #define SIM_ARANGE_C_INCLUDED
+ 
+diff --git a/gdb-7.6/sim/common/sim-inline.h b/gdb-7.6/sim/common/sim-inline.h
+index af75562..8a9c286 100644
+--- a/gdb-7.6/sim/common/sim-inline.h
++++ b/gdb-7.6/sim/common/sim-inline.h
+@@ -303,7 +303,9 @@
+ /* ??? Temporary, pending decision to always use extern inline and do a vast
+    cleanup of inline support.  */
+ #ifndef INLINE2
+-#if defined (__GNUC__)
++#if defined (__GNUC_GNU_INLINE__) || defined (__GNUC_STDC_INLINE__)
++#define INLINE2 __inline__ __attribute__ ((__gnu_inline__))
++#elif defined (__GNUC__)
+ #define INLINE2 __inline__
+ #else
+ #define INLINE2 /*inline*/
+-- 
+2.6.1
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch
new file mode 100644
index 0000000..77a287f
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+
+https://sourceware.org/git/?p=binutils-gdb.git;h=0d8a6ab
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From 0d8a6ab7d39d28fb1557e2a62e9e4b336341ab34 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@iki.fi>
+Date: Mon, 17 Feb 2014 17:12:59 -0500
+Subject: [PATCH] sim: ppc: drop $(LIBS) from psim dependency
+
+When cross-compiling GDB for PPC, there's a prerequisite "-lz" for psim
+that results in a build failure. With such prerequisite, GNU Make will
+try to search the library from build machine's /usr/lib which is wrong.
+On 64-bit Linux build machines the compilation will fail because of this.
+
+URL: https://sourceware.org/bugzilla/show_bug.cgi?id=12202
+---
+ sim/ppc/Makefile.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gdb-7.6/sim/ppc/Makefile.in b/gdb-7.6/sim/ppc/Makefile.in
+index b811f6f..740bdb0 100644
+--- a/gdb-7.6/sim/ppc/Makefile.in
++++ b/gdb-7.6/sim/ppc/Makefile.in
+@@ -552,7 +552,7 @@ PACKAGE_SRC = @sim_pk_src@
+ PACKAGE_OBJ = @sim_pk_obj@
+ 
+ 
+-psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP)
++psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP)
+ 	$(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
+ 
+ run: psim
+-- 
+1.9.4
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.3.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.3.bb
new file mode 100644
index 0000000..b787f02
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/crash/crash_7.1.3.bb
@@ -0,0 +1,112 @@
+SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles"
+DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\
+investigate either live systems, kernel core dumps created from the\
+netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\
+offered by Mission Critical Linux, or the LKCD kernel patch."
+
+HOMEPAGE = "http://people.redhat.com/anderson"
+SECTION = "devel"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "zlib readline"
+
+SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+           http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \
+           file://7001force_define_architecture.patch \ 
+           file://7003cross_ranlib.patch \
+           file://0001-cross_add_configure_option.patch \
+           file://sim-ppc-drop-LIBS-from-psim-dependency.patch \
+           file://sim-common-sim-arange-fix-extern-inline-handling.patch \
+           file://donnot-extract-gdb-during-do-compile.patch \
+           file://gdb_build_jobs_and_not_write_crash_target.patch \
+           file://remove-unrecognized-gcc-option-m32-for-mips.patch \
+           "
+
+SRC_URI[md5sum] = "155889a233c5230ef1d387858091d294"
+SRC_URI[sha256sum] = "ae98529d42b843f07d795b86b8f8529f64cc607ee3c58affc5a8aa8a506e183d"
+
+SRC_URI[gdb.md5sum] = "a9836707337e5f7bf76a009a8904f470"
+SRC_URI[gdb.sha256sum] = "8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36"
+
+inherit gettext
+
+BBCLASSEXTEND = "native cross"
+
+# crash 7.1.3 and before don't support mips64
+COMPATIBLE_HOST = "^(?!mips64).*"
+
+EXTRA_OEMAKE = 'RPMPKG="${PV}" \
+                GDB_TARGET="${TARGET_SYS}" \
+                GDB_HOST="${BUILD_SYS}" \
+                GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
+                '
+
+EXTRA_OEMAKE_class-cross = 'RPMPKG="${PV}" \
+                            GDB_TARGET="${BUILD_SYS} \
+                                        \${GDB_CONF_FLAGS} \
+                                        --target=${TARGET_SYS}" \
+                            GDB_HOST="${BUILD_SYS}" \
+                            GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
+                            '
+
+EXTRA_OEMAKE_append_class-native = " LDFLAGS='${BUILD_LDFLAGS}'"
+EXTRA_OEMAKE_append_class-cross = " LDFLAGS='${BUILD_LDFLAGS}'"
+
+REMOVE_M32 = "sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c"
+
+REMOVE_M32_class-cross = ""
+
+do_configure() {
+    :
+}
+
+do_compile_prepend() {
+    case ${TARGET_ARCH} in
+        aarch64*)    ARCH=ARM64 ;;
+        arm*)        ARCH=ARM ;;
+        i*86*)       ARCH=X86 ;;
+        x86_64*)     ARCH=X86_64 ;;
+        powerpc64*)  ARCH=PPC64 ;;
+        powerpc*)    ARCH=PPC ;;
+        mips*)       ARCH=MIPS ;;
+    esac
+
+    sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c
+    ${REMOVE_M32}
+    sed -i 's/&gt;/>/g' ${S}/Makefile
+}
+
+do_compile() {
+    oe_runmake ${EXTRA_OEMAKE}
+}
+
+do_install_prepend () {
+    install -d ${D}${bindir}
+    install -d ${D}/${mandir}/man8
+    install -d ${D}${includedir}/crash
+
+    install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/
+    install -m 0644 ${S}/defs.h ${D}${includedir}/crash
+}
+
+do_install_class-target () {
+    oe_runmake DESTDIR=${D} install
+}
+
+do_install_class-native () {
+    oe_runmake DESTDIR=${D}${STAGING_DIR_NATIVE} install
+}
+
+do_install_class-cross () {
+    install -m 0755 ${S}/crash ${D}/${bindir}
+}
+
+RDEPENDS_${PN} += "liblzma"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-cross = ""
+
+# Causes gcc to get stuck and eat all available memory in qemuarm builds
+# jenkins  15161  100 12.5 10389596 10321284 ?   R    11:40  28:17 /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.2/cc1 -quiet -I . -I . -I ./common -I ./config -I ./../include/opcode -I ./../opcodes/.. -I ./../readline/.. -I ../bfd -I ./../bfd -I ./../include -I ../libdecnumber -I ./../libdecnumber -I ./gnulib/import -I build-gnulib/import -isysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -MMD eval.d -MF .deps/eval.Tpo -MP -MT eval.o -D LOCALEDIR="/usr/local/share/locale" -D CRASH_MERGE -D HAVE_CONFIG_H -D TUI=1 eval.c -quiet -dumpbase eval.c -march=armv5te -mthumb -mthumb-interwork -mtls-dialect=gnu -auxbase-strip eval.o -g -O2 -Wall -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -feliminate-unused-debug-types -o -
+ARM_INSTRUCTION_SET = "arm"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap-module_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap-module_git.bb
new file mode 100644
index 0000000..cb91327
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap-module_git.bb
@@ -0,0 +1,22 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require ktap.inc
+
+SUMMARY = "KTAP is a scripting dynamic tracing tool for Linux"
+
+inherit module
+
+# See https://github.com/ktap/ktap/issues/80
+PNBLACKLIST[ktap-module] ?= "Not compatible with 3.19 kernel"
+
+# Only build the module
+MAKE_TARGETS = "mod"
+
+# Kernel module packages MUST begin with 'kernel-module-', otherwise
+# multilib image generation can fail.
+#
+# The following line is only necessary if the recipe name does not begin
+# with kernel-module-.
+#
+PKG_${PN} = "kernel-module-${PN}"
+
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap.inc b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap.inc
new file mode 100644
index 0000000..c214a02
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap.inc
@@ -0,0 +1,26 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+HOMEPAGE = "http://www.ktap.org"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE-GPL;md5=eb723b61539feef013de476e68b5c50a"
+
+PV = "0.4+gitr${SRCPV}"
+SRCREV = "c8401e07c89cdec9a5f673da4ddb12b7982b522b"
+SRC_URI = "git://github.com/ktap/ktap.git"
+
+S = "${WORKDIR}/git"
+
+# Package config is abused as a general compile time configuration tool.
+
+# Only supports x86_64 for now!. Needs to be enabled for ktap-module too.
+PACKAGECONFIG[ffi] = ""
+
+# Needed to resolve symbols in DSO and for sdt
+PACKAGECONFIG[libelf] = ",,elfutils"
+
+PACKAGECONFIG ?= "libelf"
+
+EXTRA_OEMAKE = " \
+    ${@bb.utils.contains('PACKAGECONFIG', 'libelf', '', 'NO_LIBELF=1', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'ffi', 'FFI=1', '', d)} \
+"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap_git.bb
new file mode 100644
index 0000000..248e7bd
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/ktap/ktap_git.bb
@@ -0,0 +1,19 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require ktap.inc
+
+SUMMARY = "KTAP is a scripting dynamic tracing tool for Linux"
+DEPENDS = "ktap-module"
+
+PNBLACKLIST[ktap] ?= "Depends on blacklisted kernel-module-ktapvm"
+
+# Only build the userspace app
+EXTRA_OEMAKE += "ktap"
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/ktap ${D}${bindir}/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+RRECOMMENDS_${PN} = "kernel-module-ktapvm"
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc b/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
new file mode 100644
index 0000000..e200127
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-oe/recipes-kernel/linux/linux.inc
@@ -0,0 +1,131 @@
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+INC_PR = "r0"
+
+inherit kernel siteinfo
+
+# Enable OABI compat for people stuck with obsolete userspace
+ARM_KEEP_OABI ?= "0"
+
+# Set the verbosity of kernel messages during runtime
+# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
+CMDLINE_DEBUG ?= "loglevel=3"
+
+# Kernel bootlogo is distro-specific (default is OE logo).
+# Logo resolution (qvga, vga, ...) is machine-specific.
+LOGO_SIZE ?= '${@base_conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}'
+# To use this, add file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2 or similar
+# to your kernel recipe, and then structure your logos for each resolution
+# accordingly.
+
+LOCALVERSION ?= ""
+
+#kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
+kernel_conf_variable() {
+    CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
+    if test "$2" = "n"
+    then
+        echo "# CONFIG_$1 is not set" >> ${B}/.config
+    else
+        echo "CONFIG_$1=$2" >> ${B}/.config
+    fi
+}
+
+do_configure_prepend() {
+    echo "" > ${B}/.config
+    CONF_SED_SCRIPT=""
+
+    #
+    # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
+    #
+    if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
+        install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
+        kernel_conf_variable LOGO y
+        kernel_conf_variable LOGO_LINUX_CLUT224 y
+    fi
+
+    #
+    # oabi / eabi support
+    #
+    kernel_conf_variable AEABI y
+    if [ "${ARM_KEEP_OABI}" = "1" ] ; then
+        kernel_conf_variable OABI_COMPAT y
+    else
+        kernel_conf_variable OABI_COMPAT n
+    fi
+
+    # When enabling thumb for userspace we also need thumb support in the kernel
+    if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
+        kernel_conf_variable ARM_THUMB y
+    fi
+
+    kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
+
+    kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+    kernel_conf_variable LOCALVERSION_AUTO n
+
+    kernel_conf_variable SYSFS_DEPRECATED n
+    kernel_conf_variable SYSFS_DEPRECATED_V2 n
+    kernel_conf_variable HOTPLUG y
+    kernel_conf_variable UEVENT_HELPER_PATH \"\"
+    kernel_conf_variable UNIX y
+    kernel_conf_variable SYSFS y
+    kernel_conf_variable PROC_FS y
+    kernel_conf_variable TMPFS y
+    kernel_conf_variable INOTIFY_USER y
+    kernel_conf_variable SIGNALFD y
+    kernel_conf_variable TMPFS_POSIX_ACL y
+    kernel_conf_variable BLK_DEV_BSG y
+    kernel_conf_variable DEVTMPFS y
+    kernel_conf_variable DEVTMPFS_MOUNT y
+
+    # Newer inits like systemd need cgroup support
+    if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
+        kernel_conf_variable CGROUP_SCHED y
+        kernel_conf_variable CGROUPS y
+        kernel_conf_variable CGROUP_NS y
+        kernel_conf_variable CGROUP_FREEZER y
+        kernel_conf_variable CGROUP_DEVICE y
+        kernel_conf_variable CPUSETS y
+        kernel_conf_variable PROC_PID_CPUSET y
+        kernel_conf_variable CGROUP_CPUACCT y
+        kernel_conf_variable RESOURCE_COUNTERS y
+    fi
+
+    #
+    # root-over-nfs-over-usb-eth support. Limited, but should cover some cases.
+    # Enable this by setting a proper CMDLINE_NFSROOT_USB.
+    #
+    if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
+        bbnote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
+        kernel_conf_variable INET y
+        kernel_conf_variable IP_PNP y
+        kernel_conf_variable USB_GADGET y
+        kernel_conf_variable USB_GADGET_SELECTED y
+        kernel_conf_variable USB_ETH y
+        kernel_conf_variable NFS_FS y
+        kernel_conf_variable ROOT_NFS y
+        kernel_conf_variable CMDLINE \"${CMDLINE_NFSROOT_USB} ${CMDLINE_DEBUG}\"
+    fi
+
+    sed -e "${CONF_SED_SCRIPT}" \
+    < '${WORKDIR}/defconfig' >>'${B}/.config'
+
+    yes '' | oe_runmake -C ${S} O=${B} oldconfig
+}
+
+do_configure_append() {
+    if test -e scripts/Makefile.fwinst ; then
+        sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst
+    fi
+}
+
+do_install_append() {
+    oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
+}
+
+PACKAGES =+ "kernel-headers"
+FILES_kernel-headers = "${exec_prefix}/src/linux*"