blob: 54883cef384ba2f2c77dc22c3e2dc55d6af412ad [file] [log] [blame]
Patrick Williams169d7bc2024-01-05 11:33:25 -06001inherit cross-canadian
2
3SUMMARY = "crash utility (cross-canadian crash for ${TARGET_ARCH} target)"
4PN = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}"
5BPN = "crash"
6
7require crash.inc
8
Patrick Williams169d7bc2024-01-05 11:33:25 -06009
10DEPENDS = "\
11 nativesdk-ncurses \
12 nativesdk-expat \
13 nativesdk-gettext \
14 nativesdk-gmp \
15 nativesdk-mpfr \
16 nativesdk-readline \
17 nativesdk-zlib \
18 virtual/${HOST_PREFIX}gcc \
19 virtual/${HOST_PREFIX}binutils \
20 virtual/nativesdk-${HOST_PREFIX}compilerlibs \
21 virtual/nativesdk-libc"
22
23RDEPENDS:${PN} = "nativesdk-liblzma"
24
25EXTRA_OEMAKE:class-cross-canadian = 'RPMPKG="${PV}" \
26 GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \
27 GDB_HOST="${HOST_SYS}" \
28 GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
29 LDFLAGS="${LDFLAGS}" \
30 '
31
32# To ship crash into your sdk, you should create/update a packagegroup-cross-canadian.bbappend and
33# add the following
34# CRASH = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}"
35# RDEPENDS:${PN} += "${@all_multilib_tune_values(d, 'CRASH')}"
36#
37# You should also add some kernel packages in your sdk, add the followng in your conf/local.conf:
38#
39# TOOLCHAIN_TARGET_TASK += "\
40# kernel-vmlinux \
41# kernel-dbg \
42# kernel-dev \
43# "
44#
45# After sourcing the sdk environment script, you can analyze a kernel panic dump with
46#
47# crash $OECORE_TARGET_SYSROOT/boot/<vmlinux file> $OECORE_TARGET_SYSROOT/boot/<System.map file> <your vmcore>
48
49do_install:class-cross-canadian () {
50 install -m 0755 ${S}/crash ${D}/${bindir}
51 cross_canadian_bindirlinks
52}