From 888be5219e147e1b6a285b6111c03095aaf494e8 Mon Sep 17 00:00:00 2001 From: Mingli Yu Date: Thu, 9 Mar 2023 13:39:49 +0800 Subject: crash: Upgrade to 8.0.2 Upgrade crash to 8.0.2 and rebase 4 patches to the new version. Signed-off-by: Mingli Yu Signed-off-by: Khem Raj --- .../crash/0001-cross_add_configure_option.patch | 19 ++-- .../crash/crash/7003cross_ranlib.patch | 19 +++- .../donnot-extract-gdb-during-do-compile.patch | 32 ++++-- ...gdb_build_jobs_and_not_write_crash_target.patch | 26 +++-- meta-oe/recipes-kernel/crash/crash_8.0.0.bb | 113 --------------------- meta-oe/recipes-kernel/crash/crash_8.0.2.bb | 113 +++++++++++++++++++++ 6 files changed, 177 insertions(+), 145 deletions(-) delete mode 100644 meta-oe/recipes-kernel/crash/crash_8.0.0.bb create mode 100644 meta-oe/recipes-kernel/crash/crash_8.0.2.bb (limited to 'meta-oe/recipes-kernel') diff --git a/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch b/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch index 26a34e5c16..fc5cc3ddfb 100644 --- a/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch +++ b/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch @@ -1,27 +1,27 @@ -From 73269df4d8196abe81112acaa2613155b308a8b8 Mon Sep 17 00:00:00 2001 +From e3ba432243d9be4e845daabc78a0ae7c03c680f5 Mon Sep 17 00:00:00 2001 From: Lei Maohui Date: Fri, 9 Jan 2015 11:51:18 +0900 -Subject: [PATCH 1/9] cross_add_configure_option +Subject: [PATCH] cross_add_configure_option + -%% original patch: 0001-cross_add_configure_option.patch --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index a2baec1..f1972c8 100644 +index 7266e305..390fc0ef 100644 --- a/Makefile +++ b/Makefile -@@ -232,7 +232,7 @@ gdb_merge: force +@@ -260,7 +260,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 --disable-sim; \ - make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ - else make --no-print-directory rebuild; fi -@@ -283,7 +283,7 @@ force: + $(MAKE) CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ + else $(MAKE) rebuild; fi +@@ -306,7 +306,7 @@ force: make_configure: force @rm -f configure @@ -30,6 +30,3 @@ index a2baec1..f1972c8 100644 clean: make_configure @./configure ${CONF_TARGET_FLAG} -q -b --- -2.8.1 - diff --git a/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch b/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch index d567fa0a82..a0d87f1b9e 100644 --- a/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch +++ b/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch @@ -1,8 +1,19 @@ ---- 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 @@ +From 2f200ceed289f935b5e7ec230454a22dd76e42b0 Mon Sep 17 00:00:00 2001 +From: leimaohui +Date: Mon, 12 Jan 2015 11:52:35 +0800 +Subject: [PATCH] crash: add new recipe + +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 79aef176..7266e305 100644 +--- a/Makefile ++++ b/Makefile +@@ -295,6 +295,7 @@ gdb_patch: - library: make_build_data ${OBJECT_FILES} + library: ${OBJECT_FILES} ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} + ${RANLIB} ${PROGRAM}lib.a diff --git a/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch b/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch index 7133cf0aa2..16382877d0 100644 --- a/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch +++ b/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch @@ -1,33 +1,45 @@ +From 8b882650b730cb6e025d47d65574f43549b7a1a3 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Thu, 9 Mar 2023 10:28:28 +0800 +Subject: [PATCH] Makefile: Put gdb source tarball in SRC_URI + 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 +Signed-off-by: Mingli Yu --- + Makefile | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + diff --git a/Makefile b/Makefile -index bb0a34e..5eb7604 100644 +index 79aef17..146da6a 100644 --- a/Makefile +++ b/Makefile -@@ -228,7 +228,7 @@ all: make_configure - # @make --no-print-directory extensions +@@ -254,7 +254,7 @@ all: make_configure + # @$(MAKE) extensions gdb_merge: force - @if [ ! -f ${GDB}/README ]; then \ + @if [ ! -f ${GDB}/${GDB}.patch ]; then \ - make --no-print-directory gdb_unzip; fi + $(MAKE) gdb_unzip; fi @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj -@@ -255,12 +255,6 @@ gdb_unzip: - @rm -f gdb.files - @for FILE in ${GDB_FILES} dummy; do\ - echo $$FILE >> gdb.files; done +@@ -281,12 +281,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 \ - [ ! -t 2 ] && WGET_OPTS="--progress=dot:mega"; \ - wget $$WGET_OPTS http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi - @tar --exclude-from gdb.files -xzmf ${GDB}.tar.gz - @make --no-print-directory gdb_patch - + @$(MAKE) gdb_patch + gdb_patch: +-- +2.25.1 + diff --git a/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch b/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch index aa5f44dd42..257b4dd2bf 100644 --- a/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch +++ b/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch @@ -1,3 +1,8 @@ +From af49d8df559aa18f97d14ab7971f211238a16041 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Thu, 9 Mar 2023 10:50:10 +0800 +Subject: [PATCH] Makefile: Don't write ${TARGET} to crash.target + This enables parallel building (multiple jobs in gdb) by reading the value from GDB_MAKE_JOBS. @@ -8,19 +13,26 @@ Upstream-Status: Pending Don't write ${TARGET} to crash.target which causes rebuild fails. Signed-off-by: Kai Kang --- +Signed-off-by: Mingli Yu +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/Makefile b/Makefile -index 27a1d47..bcf2d2f 100644 +index cd25c7d..d61c4c5 100644 --- a/Makefile +++ b/Makefile -@@ -232,8 +232,8 @@ gdb_merge: force +@@ -262,8 +262,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 --disable-sim; \ -- 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 +- $(MAKE) CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ +- else $(MAKE) rebuild; fi ++ $(MAKE) CRASH_TARGET=${TARGET} ${GDB_MAKE_JOBS}; ) \ ++ else $(MAKE) ${GDB_MAKE_JOBS} rebuild; fi @if [ ! -f ${PROGRAM} ]; then \ echo; echo "${PROGRAM} build failed"; \ echo; exit 1; fi +-- +2.25.1 + diff --git a/meta-oe/recipes-kernel/crash/crash_8.0.0.bb b/meta-oe/recipes-kernel/crash/crash_8.0.0.bb deleted file mode 100644 index 55de6a604b..0000000000 --- a/meta-oe/recipes-kernel/crash/crash_8.0.0.bb +++ /dev/null @@ -1,113 +0,0 @@ -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 = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS = "zlib readline coreutils-native ncurses-native" - -S = "${WORKDIR}/git" -SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https \ - ${GNU_MIRROR}/gdb/gdb-10.2.tar.gz;name=gdb;subdir=git \ - file://7001force_define_architecture.patch \ - file://7003cross_ranlib.patch \ - file://0001-cross_add_configure_option.patch \ - file://donnot-extract-gdb-during-do-compile.patch \ - file://gdb_build_jobs_and_not_write_crash_target.patch \ - " -SRCREV = "ec568e2ea515b66343d3488d5d4b9a625d55b7ae" - -SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" - -UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases" - -inherit gettext - -BBCLASSEXTEND = "native cross" -TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}" - -# crash 7.1.3 and before don't support mips64/riscv64 -COMPATIBLE_HOST:riscv64 = "null" -COMPATIBLE_HOST:riscv32 = "null" -COMPATIBLE_HOST:mipsarchn64 = "null" -COMPATIBLE_HOST:mipsarchn32 = "null" - - -EXTRA_OEMAKE = 'RPMPKG="${PV}" \ - GDB_TARGET="${TARGET_SYS}" \ - GDB_HOST="${BUILD_SYS}" \ - GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ - LDFLAGS="${LDFLAGS}" \ - ' - -EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ - GDB_TARGET="${BUILD_SYS} --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}'" - -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 - 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 - sed -i -e 's/#define TARGET_CFLAGS_MIPS_ON_X86_64.*/#define TARGET_CFLAGS_MIPS_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c - sed -i 's/>/>/g' ${S}/Makefile -} - -do_compile() { - oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT} -} - -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" - -# http://errors.yoctoproject.org/Errors/Details/186964/ -COMPATIBLE_HOST:libc-musl = 'null' diff --git a/meta-oe/recipes-kernel/crash/crash_8.0.2.bb b/meta-oe/recipes-kernel/crash/crash_8.0.2.bb new file mode 100644 index 0000000000..f58bb6ef54 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash_8.0.2.bb @@ -0,0 +1,113 @@ +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 = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "zlib readline coreutils-native ncurses-native" + +S = "${WORKDIR}/git" +SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https \ + ${GNU_MIRROR}/gdb/gdb-10.2.tar.gz;name=gdb;subdir=git \ + file://7001force_define_architecture.patch \ + file://7003cross_ranlib.patch \ + file://0001-cross_add_configure_option.patch \ + file://donnot-extract-gdb-during-do-compile.patch \ + file://gdb_build_jobs_and_not_write_crash_target.patch \ + " +SRCREV = "f1cd581d1c4afa5b8ffdfaa6a3ea9f545fe4ec91" + +SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" + +UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases" + +inherit gettext + +BBCLASSEXTEND = "native cross" +TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}" + +# crash 7.1.3 and before don't support mips64/riscv64 +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" +COMPATIBLE_HOST:mipsarchn64 = "null" +COMPATIBLE_HOST:mipsarchn32 = "null" + + +EXTRA_OEMAKE = 'RPMPKG="${PV}" \ + GDB_TARGET="${TARGET_SYS}" \ + GDB_HOST="${BUILD_SYS}" \ + GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ + LDFLAGS="${LDFLAGS}" \ + ' + +EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ + GDB_TARGET="${BUILD_SYS} --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}'" + +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 + 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 + sed -i -e 's/#define TARGET_CFLAGS_MIPS_ON_X86_64.*/#define TARGET_CFLAGS_MIPS_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c + sed -i 's/>/>/g' ${S}/Makefile +} + +do_compile() { + oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT} +} + +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" + +# http://errors.yoctoproject.org/Errors/Details/186964/ +COMPATIBLE_HOST:libc-musl = 'null' -- cgit 1.2.3-korg