Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | SUMMARY = "VMcore extraction tool" |
| 2 | DESCRIPTION = "\ |
| 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 | " |
| 8 | HOMEPAGE = "https://github.com/makedumpfile/makedumpfile" |
| 9 | |
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 11 | LICENSE = "GPL-2.0-only" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 12 | |
| 13 | SRCBRANCH ?= "master" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 14 | SRCREV = "74bbdd14ec861552ace1ca63953eb2ef73e1f965" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 15 | |
| 16 | DEPENDS = "bzip2 zlib elfutils xz" |
| 17 | RDEPENDS:${PN}-tools = "perl ${PN}" |
| 18 | |
| 19 | # mips would not compile. |
| 20 | COMPATIBLE_HOST = "(x86_64|i.86|powerpc|arm|aarch64).*-linux" |
| 21 | |
| 22 | PACKAGES =+ "${PN}-tools" |
| 23 | FILES:${PN}-tools = "${bindir}/*.pl" |
| 24 | |
| 25 | SRC_URI = "\ |
| 26 | git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \ |
| 27 | file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ |
| 28 | " |
| 29 | |
| 30 | S = "${WORKDIR}/git" |
| 31 | |
| 32 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" |
| 33 | |
| 34 | SECTION = "base" |
| 35 | |
| 36 | # If we do not specify TARGET, makedumpfile will build for the host but use the |
| 37 | # target gcc. |
| 38 | # |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 39 | |
| 40 | MAKEDUMPFILE_TARGET ?= "${TARGET_ARCH}" |
| 41 | MAKEDUMPFILE_TARGET:powerpc = "ppc" |
| 42 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 43 | EXTRA_OEMAKE = "\ |
| 44 | LINKTYPE=static \ |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 45 | TARGET=${MAKEDUMPFILE_TARGET} \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 46 | ${PACKAGECONFIG_CONFARGS} \ |
| 47 | " |
| 48 | |
| 49 | PACKAGECONFIG ??= "" |
| 50 | PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo" |
| 51 | PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy" |
| 52 | PACKAGECONFIG[zstd] = "USEZSTD=on,USEZSTD=off,zstd" |
| 53 | |
| 54 | do_install () { |
| 55 | mkdir -p ${D}/usr/bin |
| 56 | install -m 755 ${S}/makedumpfile ${D}/usr/bin |
| 57 | install -m 755 ${S}/makedumpfile-R.pl ${D}/usr/bin |
| 58 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 59 | mkdir -p ${D}/etc/ |
| 60 | install -m 644 ${S}/makedumpfile.conf ${D}/etc/makedumpfile.conf.sample |
| 61 | } |