blob: 79bad0a01cc4bfebf5b24c6372f1b30d5f50a9fe [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "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"
Andrew Geissler4b7c1152020-11-30 19:55:29 -06008HOMEPAGE = "https://github.com/makedumpfile/makedumpfile"
Andrew Geissler82c905d2020-04-13 13:39:40 -05009
10LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
11LICENSE = "GPLv2.0"
12
Andrew Geissler4b7c1152020-11-30 19:55:29 -060013SRCBRANCH ?= "master"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070014SRCREV = "a9ad811c15e769c8e6d8d915a05cebc32f2ea2f5"
Andrew Geissler4b7c1152020-11-30 19:55:29 -060015
16DEPENDS = "bzip2 zlib elfutils xz"
Andrew Geissler82c905d2020-04-13 13:39:40 -050017RDEPENDS_${PN}-tools = "perl ${PN}"
18
19# arm and aarch64 would compile but has never been tested upstream. mips would not compile.
20#
21COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm|aarch64).*-linux"
22
23PACKAGES =+ "${PN}-tools"
24FILES_${PN}-tools = "${bindir}/*.pl"
25
26SRC_URI = "\
Andrew Geissler4b7c1152020-11-30 19:55:29 -060027 git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH} \
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \
29 file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050030"
Andrew Geissler82c905d2020-04-13 13:39:40 -050031
Andrew Geissler4b7c1152020-11-30 19:55:29 -060032S = "${WORKDIR}/git"
33
34UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
Andrew Geissler82c905d2020-04-13 13:39:40 -050035
36SECTION = "base"
37
38# If we do not specify TARGET, makedumpfile will build for the host but use the
39# target gcc.
40#
41EXTRA_OEMAKE = "\
42 LINKTYPE=static \
43 TARGET=${TARGET_ARCH} \
Andrew Geissler4b7c1152020-11-30 19:55:29 -060044 ${PACKAGECONFIG_CONFARGS} \
Andrew Geissler82c905d2020-04-13 13:39:40 -050045"
46
Andrew Geissler4b7c1152020-11-30 19:55:29 -060047PACKAGECONFIG ??= ""
48PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo"
49PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy"
50
Andrew Geissler82c905d2020-04-13 13:39:40 -050051do_install () {
52 mkdir -p ${D}/usr/bin
53 install -m 755 ${S}/makedumpfile ${D}/usr/bin
54 install -m 755 ${S}/makedumpfile-R.pl ${D}/usr/bin
55
56 mkdir -p ${D}/usr/share/man/man8
57 install -m 644 ${S}/makedumpfile.8.gz ${D}/usr/share/man/man8
58
59 mkdir -p ${D}/usr/share/man/man5
60 install -m 644 ${S}/makedumpfile.conf.5.gz ${D}/usr/share/man/man5
61
62 mkdir -p ${D}/etc/
63 install -m 644 ${S}/makedumpfile.conf ${D}/etc/makedumpfile.conf.sample
64}