blob: b016d5da4d0c83dd07977d5cf9c1500f2ecf8f15 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "VMcore extraction tool"
2DESCRIPTION = "\
3 This program is used to extract a subset of the memory available either \
4 via /dev/mem or /proc/vmcore (for crashdumps). It is used to get memory \
5 images without extra uneeded information (zero pages, userspace programs, \
6 etc). \
7"
8HOMEPAGE = "https://github.com/makedumpfile/makedumpfile"
9
10LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
11LICENSE = "GPL-2.0-only"
12
13SRCBRANCH ?= "master"
14SRCREV = "3bc3b3e3be33a9aa040e654f055912063e576c1b"
15
16DEPENDS = "bzip2 zlib elfutils xz"
17RDEPENDS:${PN}-tools = "perl ${PN}"
18
19# mips/rv32 would not compile.
20COMPATIBLE_HOST:mipsarcho32 = "null"
21COMPATIBLE_HOST:riscv32 = "null"
22
23PACKAGES =+ "${PN}-tools"
24FILES:${PN}-tools = "${bindir}/*.pl"
25
26SRC_URI = "\
27 git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \
28 file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \
29"
30
31S = "${WORKDIR}/git"
32
33UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
34
35SECTION = "base"
36
37# If we do not specify TARGET, makedumpfile will build for the host but use the
38# target gcc.
39#
40
41MAKEDUMPFILE_TARGET ?= "${TARGET_ARCH}"
42MAKEDUMPFILE_TARGET:powerpc = "ppc"
43
44EXTRA_OEMAKE = "\
45 LINKTYPE=static \
46 TARGET=${MAKEDUMPFILE_TARGET} \
47 ${PACKAGECONFIG_CONFARGS} \
48"
49
50PACKAGECONFIG ??= ""
51PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo"
52PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy"
53PACKAGECONFIG[zstd] = "USEZSTD=on,USEZSTD=off,zstd"
54
55do_install () {
56 mkdir -p ${D}/usr/bin
57 install -m 755 ${S}/makedumpfile ${D}/usr/bin
58 install -m 755 ${S}/makedumpfile-R.pl ${D}/usr/bin
59
60 mkdir -p ${D}/etc/
61 install -m 644 ${S}/makedumpfile.conf ${D}/etc/makedumpfile.conf.sample
62}