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