summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel
diff options
context:
space:
mode:
authorleimaohui <leimaohui@cn.fujitsu.com>2015-01-12 11:52:35 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2015-01-15 16:37:55 +0100
commit8c17bb27c5b1ca72fc28457ff8b056c8fbdcc6f7 (patch)
treed2cc4fbdd8a5824dc967ef52dd7e16993c11f1d2 /meta-oe/recipes-kernel
parentbd2d39df79bb52462e6e768fc20362b08697cd58 (diff)
downloadmeta-openembedded-8c17bb27c5b1ca72fc28457ff8b056c8fbdcc6f7.tar.gz
crash: add new recipe
crash core analysis suite Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel')
-rw-r--r--meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch34
-rw-r--r--meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch13
-rw-r--r--meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch10
-rw-r--r--meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.91
-rw-r--r--meta-oe/recipes-kernel/crash/crash_7.0.9.bb59
5 files changed, 117 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch
new file mode 100644
index 000000000..229647f00
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch
@@ -0,0 +1,34 @@
1From cbaaa42933bb27b1bcff4c7d71d54c913201ee88 Mon Sep 17 00:00:00 2001
2From: Lei Maohui <leimaohui@cn.fujitsu.com>
3Date: Fri, 9 Jan 2015 11:51:18 +0900
4Subject: [PATCH] cross_add_configure_option
5
6---
7 Makefile | 4 ++--
8 1 file changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/Makefile b/Makefile
11index 9c44633..39bebd0 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -229,7 +229,7 @@ gdb_merge: force
15 @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
16 @rm -f ${PROGRAM}
17 @if [ ! -f ${GDB}/config.status ]; then \
18- (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \
19+ (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \
20 --with-bugurl="" --with-expat=no --with-python=no; \
21 make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
22 else make --no-print-directory rebuild; fi
23@@ -277,7 +277,7 @@ force:
24
25 make_configure: force
26 @rm -f configure
27- @${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS}
28+ @cc ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS}
29
30 clean: make_configure
31 @./configure ${CONF_TARGET_FLAG} -q -b
32--
331.8.4.2
34
diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch
new file mode 100644
index 000000000..0d44c7f17
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch
@@ -0,0 +1,13 @@
1diff -uprN crash-5.1.8.org/configure.c crash-5.1.8/configure.c
2--- crash-5.1.8.org/configure.c 2011-09-17 04:01:12.000000000 +0900
3+++ crash-5.1.8/configure.c 2012-09-13 13:28:45.393344108 +0900
4@@ -391,6 +391,9 @@ get_current_configuration(struct support
5 arch_mismatch(sp);
6 }
7
8+ /** Force define archtecture */
9+ target_data.target = FORCE_DEFINE_ARCH;
10+
11 if ((fp = fopen("Makefile", "r")) == NULL) {
12 perror("Makefile");
13 goto get_release;
diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch
new file mode 100644
index 000000000..d567fa0a8
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch
@@ -0,0 +1,10 @@
1--- crash-5.1.8/Makefile.orig 2011-12-27 11:21:58.220652105 +0900
2+++ crash-5.1.8/Makefile 2011-12-27 11:22:29.563651593 +0900
3@@ -285,6 +285,7 @@
4
5 library: make_build_data ${OBJECT_FILES}
6 ar -rs ${PROGRAM}lib.a ${OBJECT_FILES}
7+ ${RANLIB} ${PROGRAM}lib.a
8
9 gdb: force
10 rm -f ${GDB_OFILES}
diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9 b/meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9
new file mode 100644
index 000000000..d6fc22fb3
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9
@@ -0,0 +1 @@
bash_cv_have_mbstate_t=yes
diff --git a/meta-oe/recipes-kernel/crash/crash_7.0.9.bb b/meta-oe/recipes-kernel/crash/crash_7.0.9.bb
new file mode 100644
index 000000000..8d6248109
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash_7.0.9.bb
@@ -0,0 +1,59 @@
1SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles"
2DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\
3investigate either live systems, kernel core dumps created from the\
4netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\
5offered by Mission Critical Linux, or the LKCD kernel patch."
6
7HOMEPAGE = "http://people.redhat.com/anderson"
8SECTION = "devel"
9
10inherit gettext
11
12DEPENDS = "zlib readline"
13
14SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz \
15 file://7001force_define_architecture.patch \
16 file://7003cross_ranlib.patch \
17 file://0001-cross_add_configure_option.patch \
18 "
19
20SRC_URI[md5sum] = "d70ad2ed0f6d210ed11e88b8e977f5fd"
21SRC_URI[sha256sum] = "c6034c6eb6b52691c60d0b72dbdec58fac4c1b3ed1cd0697c209dc48d13a577e"
22
23LICENSE = "GPLv3"
24LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
25
26EXTRA_OEMAKE = 'RPMPKG="${PV}" \
27 GDB_TARGET="${TARGET_SYS}" \
28 GDB_HOST="${BUILD_SYS}" \
29 '
30do_configure() {
31 :
32}
33
34do_compile_prepend() {
35 case ${TARGET_ARCH} in
36 arm*) ARCH=ARM ;;
37 i*86*) ARCH=X86 ;;
38 powerpc*) ARCH=PPC ;;
39 x86_64*) ARCH=X86_64 ;;
40 esac
41
42 sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c
43 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
44 sed -i 's/&gt;/>/g' ${S}/Makefile
45}
46do_compile() {
47 oe_runmake ${EXTRA_OEMAKE}
48}
49
50do_install () {
51 install -d ${D}${bindir}
52 install -d ${D}/${mandir}/man8
53 install -d ${D}${includedir}/crash
54
55 oe_runmake DESTDIR=${D} install
56 install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/
57 install -m 0644 ${S}/defs.h ${D}${includedir}/crash
58}
59RDEPENDS_${PN} += "liblzma"