Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 1 | inherit cross-canadian |
| 2 | |
| 3 | SUMMARY = "crash utility (cross-canadian crash for ${TARGET_ARCH} target)" |
| 4 | PN = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
| 5 | BPN = "crash" |
| 6 | |
| 7 | require crash.inc |
| 8 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 9 | |
| 10 | DEPENDS = "\ |
| 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 | |
| 23 | RDEPENDS:${PN} = "nativesdk-liblzma" |
| 24 | |
| 25 | EXTRA_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 | |
| 49 | do_install:class-cross-canadian () { |
| 50 | install -m 0755 ${S}/crash ${D}/${bindir} |
| 51 | cross_canadian_bindirlinks |
| 52 | } |