Commit Graph

64 Commits

Author SHA1 Message Date
Wang Mingyu e1dc6c6ce3 crash-trace: add recipe for crash trace extension module
Add a new recipe for crash-trace, a crash utility extension that
displays kernel tracing data and traced events prior to a panic.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-07-20 23:08:10 -07:00
Khem Raj 63a5292025 crash: Fix cross compilation for 32-bit arm
The upstream crash Makefile CONF_TARGET_ARCH mapping (used when
CROSS_COMPILE is set) enumerates most of OE supported arches
but omits 32-bit arm. Building with CROSS_COMPILE=arm-*
therefore aborts at Makefile parse time:

    Makefile:75: *** The current Arch(arm) does not support cross compilation.  Stop.

ARM is already a valid crash target (defs.h/configure.c), so add a patch
mapping the normalized "arm" arch to CONF_TARGET_ARCH=ARM like every
other supported arch.

Verified by cross building crash for qemuarm (arm-yoe-linux-gnueabi-):

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Cc: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
2026-06-30 23:37:18 -07:00
Khem Raj e73caaf78f crash-cross-canadian: fix build, including on clang based SDKs
The cross-canadian variant did not build. Several issues:

1. DEPENDS used :append on top of crash.inc's target DEPENDS. cross-canadian
   does not remap DEPENDS to nativesdk, so the target zlib/readline/ncurses/
   gmp/mpfr stayed in the dependency set and staged a real target usr/lib into
   the recipe sysroot, clashing with the nativesdk toolchain (clang-glue
   provides usr/lib as a symlink) during do_prepare_recipe_sysroot. Override
   DEPENDS with the nativesdk set instead (matching gdb-cross-canadian) and add
   the -native build tools the build needs.

2. do_compile hardcoded ${HOST_PREFIX}gcc, which does not exist on clang based
   SDKs (TOOLCHAIN = "clang"), giving "C compiler cannot create executables".
   Use the toolchain-aware ${CC}/${CXX} like the other variants.

3. crash's gdb merge re-enters the top-level crash Makefile from gdb's link
   rule ("make -C ../.. ... library") without passing the compiler, so crash's
   own objects fell back to the Makefile default $(CROSS_COMPILE)gcc and failed
   to find a compiler on clang SDKs. Forward CC/CXX through that recursion in
   the bundled gdb-16.2.patch; this is harmless where ${cross}-gcc exists.

Verified by building crash, crash-native, crash-cross and
crash-cross-canadian-x86-64 for a clang based SDK (qemux86-64).

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-27 15:50:59 -07:00
Khem Raj 496ce81934 crash: pull in gmp/mpfr for the cross variant
The bundled gdb 16.2 hard-requires GMP and MPFR (crash 8.0.6 bundled gdb 10.2,
which did not). native.bbclass remaps DEPENDS to their -native variants
automatically, so crash-native builds, but cross.bbclass does not - so
crash-cross failed in gdb's configure with:

    configure: error: Building GDB requires GMP 4.2+, and MPFR 3.1.0+.

List the build-host dependencies (gmp/mpfr, plus readline/ncurses that crash
links) explicitly for class-cross.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-27 15:50:59 -07:00
Khem Raj 15f9b7f915 crash: fix buildpaths QA properly via gdb --with-sysroot=/
The recipe passed --with-sysroot=${STAGING_DIR_TARGET} to the bundled gdb's
configure. gdb bakes that path in as its default target sysroot, so the
resulting /usr/bin/crash binary embedded the build-time recipe-sysroot path:

    File /usr/bin/crash in package crash contains reference to TMPDIR [buildpaths]

This was worked around by demoting the buildpaths QA check to a warning
(ERROR_QA:remove / WARN_QA:append), which only hides the problem - the build
path is still wrong for a binary that runs on the target (or, for the
cross-canadian variant, in the SDK).

Set --with-sysroot=/ instead. crash takes the kernel/vmlinux and dump on its
command line, so gdb's compiled-in default sysroot is irrelevant at runtime;
"/" is both a sane default and contains no build path. With this the binary
no longer references TMPDIR, so the QA suppression can be removed and the
buildpaths check passes for real.

Verified with a clean build for qemux86-64: no buildpaths QA issue and no
TMPDIR references remain in the crash binary.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-27 15:50:59 -07:00
Khem Raj d5423311b9 crash: drop unnecessary git scaffolding from do_compile
The do_compile:prepend ran "git init && git add . && git commit" inside the
staged gdb-16.2 tree. crash's build does not use git at all - the bundled gdb
is unpacked from a release tarball and merged with plain "patch -p0" - so this
served no purpose and only made the build depend on a working git identity.

In any environment where committer identity is unset, or where commit signing
is enabled globally (commit.gpgsign=true), do_compile fails with:

    error: gpg failed to sign the data
    fatal: failed to write commit object

Drop the git scaffolding entirely; the gdb patch still applies with patch(1).

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-27 15:50:59 -07:00
Robert Berger 56b437228b crash 8.0.6 -> 9.0.2 + crash-memory-driver
1) crash-memory-driver: fixed typo to include proper patch
2) crash-memory-driver: keep license,...

patch against comments on pull request:

1) HOMEPAGE updated
2) UPSTREAM_CHECK_URI updated
3) exports removed
4) if [ -f "gdb-16.2.patch" ]; then... removed
5) notes about QA Issue: reference to TMPDIR [buildpaths] added
6) notes ./crash --buildinfo removed
7) LIC_FILES_CHKSUM: use license text in crash.c
8) PV = "9.0.2+git${SRCPV}" -> SRCPV removed
9) removed unused patches
10) crash: LICENSE = GPL-3.0-only

Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-27 15:50:59 -07:00
Khem Raj a7428c96bf crash: fix bundled gdb build for C++20
std::allocator::construct was removed in C++20 (GCC 16 default).

Rewrite 0006-gdbsupport-fix-default-init-alloc to include <memory>
guard the using-declaration to pre-C++17, and add a forwarding
construct() overload.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-27 15:50:58 -07:00
Wang Mingyu 924be4d82b crash: build bundled GDB with GNU C++17
The GDB 10.2 sources still rely on std::allocator::construct, which was
removed in C++20.

This causes the build to fail with errors such as:

default-init-alloc.h:52:12: error:
'construct' has not been declared in 'class std::allocator<...>'

Explicitly build the C++ sources with GNU C++17 to retain compatibility
with the bundled GDB sources.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-24 11:57:15 -07:00
Yi Zhao bd745115de crash: add zlib-native to depends for crash-cross
Fix the following error when using buildtools-extended:

va_server.c:20:10: fatal error: zlib.h: No such file or directory
   20 | #include <zlib.h>
      |          ^~~~~~~~

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-12-02 09:18:19 -08:00
Alexander Kanavin fc78d37ff0 meta-openembedded/all: adapt to UNPACKDIR changes
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.

I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-25 06:44:52 -07:00
Kéléfa Sané df7e1b55d5 crash: fix reproducibility
Fix reproducibility issue by retrieving the compiler version from the CC
env variable, which define the compiler used in the build and not from
the native gcc compiler install in the host machine.

Signed-off-by: Kéléfa Sané <kelefa.sane@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-05-27 10:33:01 -07:00
Khem Raj deb18b33df crash: Fix build for 32bit targets
Fixes
rame.c: In function 'CORE_ADDR frame_unwind_pc(frame_info*)':
frame.c:982:35: error: cannot convert 'CORE_ADDR*' {aka 'long long unsigned int*'} to 'ulong*' {aka 'long unsigned int*'}
  982 |           crash_decode_ptrauth_pc(&pc);
      |                                   ^~~
      |                                   |
      |                                   CORE_ADDR* {aka long long unsigned int*}

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: mark.yang <mark.yang@lge.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
2025-03-26 13:13:47 -07:00
mark.yang 604eb7dcde crash: fix build with gcc-15
* to fix: following erros occured in gcc-15.0.1 environment.
signals.c: In function '_rl_signal_handler':
signals.c:62:36: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   62 | #  define SIGHANDLER_RETURN return (0)
      |                                    ^
signals.c:160:3: note: in expansion of macro 'SIGHANDLER_RETURN'
  160 |   SIGHANDLER_RETURN;
      |   ^~~~~~~~~~~~~~~~~
signals.c:141:1: note: declared here
  141 | _rl_signal_handler (int sig)
      | ^~~~~~~~~~~~~~~~~~
signals.c: In function 'rl_set_sighandler':
signals.c:343:18: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
  343 |   act.sa_handler = handler;
      |                  ^
In file included from signals.c:30:
recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
   72 | typedef void (*__sighandler_t) (int);
      |                ^~~~~~~~~~~~~~

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-03-26 07:37:51 -07:00
mark.yang afaa5f4737 crash: upgrade 8.0.5 -> 8.0.6
ChangeLog:
https://crash-utility.github.io/changelog/ChangeLog-8.0.6.txt

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-03-26 07:37:51 -07:00
Richard Purdie 9e4b3d7411 crash-cross-canadian: Update to match OE-Core virtual provider changes
OE-Core changed to to use virtual/nativesdk-cross-XXX replace the older
more complex cross providers. Update the recipes to match.

This fixes check layer failures on the autobuilder.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-01-25 09:36:49 -08:00
Xiangyu Chen 6d492c06be crash: fix crash cannot work with kaslr
According to crash help message, crash can decode the random address with
"--kaslr=auto". But it has a bug that when with "-S" in parameter, crash will
bypass the kaslr option.

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-01-24 18:20:04 -08:00
Yi Zhao 3f3231f62f crash: upgrade 8.0.4 -> 8.0.5
ChangeLog:
https://crash-utility.github.io/changelog/ChangeLog-8.0.5.txt

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-09-11 21:15:34 -07:00
Martin Jansa e722be5fac recipes: Drop remaining PR values from recipes
* as oe-core did in:
  https://git.openembedded.org/openembedded-core/commit/?id=d4c346e8ab

* when people are have to maintain own PRs for recipes in oe-core, they
  might add them for meta-oe recipes at the same time when upgrading
  to next LTS

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-17 13:10:10 -07:00
Frederic Martinsons a4031df72d crash: update to 8.0.4
Remove backported commit.

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-18 22:17:24 -08:00
Frederic Martinsons 1f9ad22b28 crash: add cross canadian version
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-18 22:17:24 -08:00
Frederic Martinsons 058f22ac27 crash: factorize recipe with inc file to prepare cross-canadian version
Suppress unused config-site.crash-7.0.9

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-18 22:17:24 -08:00
Khem Raj 3645710e73 crash: Fix build with glibc 2.38+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-07-13 07:22:17 -07:00
Martin Jansa be8c765c7c *.patch: add Upstream-Status to all patches
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a

This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).

This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.

This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:

5 (26%) 	meta-xfce
6 (50%) 	meta-perl
15 (42%)        meta-webserver
21 (36%)        meta-gnome
25 (57%)        meta-filesystems
26 (43%)        meta-initramfs
45 (45%)        meta-python
47 (55%)        meta-multimedia
312 (63%)       meta-networking
756 (61%)       meta-oe

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-21 09:15:20 -07:00
Mingli Yu 888be5219e 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 <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-09 09:54:04 -08:00
Khem Raj 224d8a8cbe crash: Fix build for mips target
The patch to remove these options is removed therefore instrument them
via sed operations

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Mingli Yu <mingli.yu@windriver.com>
2022-04-22 17:58:09 -07:00
Mingli Yu c7ce2371c0 crash: Upgrade to 8.0.0
The bundled gdb upgraded to 10.2 [1] and remove related patches
against the previous gdb 7.6.

[1] https://github.com/crash-utility/crash/commit/ec568e2ea515b66343d3488d5d4b9a625d55b7ae

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-22 17:58:09 -07:00
Khem Raj 14c7d8a0d7 recipes: Update LICENSE variable to use SPDX license identifiers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-04 17:41:45 -08:00
Richard Purdie b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
zangrc c833f02489 crash: upgrade 7.2.9 -> 7.3.0
Refresh the following patch:
donnot-extract-gdb-during-do-compile.patch
remove-unrecognized-gcc-option-m32-for-mips.patch

0001-printk-add-support-for-lockless-ringbuffer.patch
0002-printk-use-committed-finalized-state-values.patch
Removed since these are included in 7.3.0.

Signed-off-by: Zang Ruochen <zangrc.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-09-09 09:34:13 -07:00
Martin Jansa c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Mingli Yu 1f1f01cf09 crash: add support for lockless ringbuffer
Backport 2 patches to add support for lockless ringbuffer to fix
below issue:
crash: cannot determine length of symbol: log_end

Reference: https://github.com/crash-utility/crash/issues/74

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-20 10:40:53 -08:00
zhengruoqin 89eb9a1dde crash: upgrade 7.2.8 -> 7.2.9
crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch
Removed since this is included in 7.2.9

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-11-30 22:42:20 -08:00
Khem Raj c699d2088e crash: Fix arm64 build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-17 12:26:41 -07:00
Khem Raj 29076c7492 crash: Do not build on riscv
Keep mips64 exclusion as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-04-25 08:32:41 -07:00
Goran Cengic fa91738a94 crash: fix crash-cross build on x86_64
Remove -m32 from CFLAGS even for -cross recipe. Also remove
${GDB_CONF_FLAGS} from GDB_TARGET variable (that is passed to the gdb
configuration) since the use of GDB_CONF_FLAGS is removed by
0001-cross_add_configure_option.patch.

Signed-off-by: Goran Cengic <cengic@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-20 07:44:29 -07:00
Wang Mingyu e10d2bdede crash: upgrade 7.2.7 -> 7.2.8
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-21 14:21:52 -08:00
Randy MacLeod c636bc25db crash: update from 7.2.6 to 7.2.7
Change log: http://people.redhat.com/anderson/crash.changelog.html

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-09-25 09:48:19 -07:00
Adrian Bunk c6351749d6 meta-oe: Replace EXCLUDE_FROM_WORLD_libc-musl = "1" with COMPATIBLE_HOST_libc-musl = 'null'
This gives users a proper error message when trying to build
a known non-building package.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-30 09:27:56 -07:00
Adrian Bunk dab0e88e22 meta-oe: Use GNU_MIRROR in more recipes
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-02 18:04:41 -07:00
Mingli Yu 96ec1963c4 crash: Upgrade to 7.2.6
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-07-21 09:31:09 -07:00
Hongxu Jia 95f94c0154 crash: do not use unstable github archive tarballs
Since commit [21f84fc insane: add sanity checks to SRC_URI] applied
in oe-core, do not use unstable github archive tarballs

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-05-27 00:49:29 -07:00
Mingli Yu f7f06219f1 crash: Upgrade to 7.2.5
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-03-14 07:24:03 -07:00
Randy MacLeod 8e3db630d1 crash: Update from 7.2.3 to to 7.2.4
Change log: http://people.redhat.com/anderson/crash.changelog.html

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-10-10 08:49:36 -07:00
Khem Raj 7e0fa293b7 recipes: Exclude non-buildable recipes from world for musl build
These recipes need to be fixed for musl, until they are needed
on musl lets remove them from world builds

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-20 23:58:58 -07:00
Mingli Yu 7e4d87bde2 crash: Upgrade to 7.2.3
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-02 11:23:03 -07:00
Yi Zhao 346c2940bf crash: add UPSTREAM_CHECK_URI
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-29 12:56:19 -07:00
Huang Qiyu 5b9288eb24 crash: 7.1.9 -> 7.2.0
1)Upgrade crash from 7.1.9 to 7.2.0.
2)Delete 0004-crash-fix-build-failure-with-mips.patch, since it is integrated upstream.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-01-22 19:37:21 -08:00
Khem Raj b62538284d crash: Pass optimization flags to configure via CC
This is because when using fortify warnings we need to have
some level of optimization, while we append warnings to CC
we dont do the same for optimization, which results in compile
failures when doing build with hardened flags

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:27 +02:00
Khem Raj ec9f60a6ef crash: Upgrade to 7.1.9
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:25 +02:00