Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [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" |
| 11 | LICENSE = "GPL-2.0-only" |
| 12 | |
| 13 | SRCBRANCH ?= "master" |
| 14 | SRCREV = "3bc3b3e3be33a9aa040e654f055912063e576c1b" |
| 15 | |
| 16 | DEPENDS = "bzip2 zlib elfutils xz" |
| 17 | RDEPENDS:${PN}-tools = "perl ${PN}" |
| 18 | |
| 19 | # mips/rv32 would not compile. |
| 20 | COMPATIBLE_HOST:mipsarcho32 = "null" |
| 21 | COMPATIBLE_HOST:riscv32 = "null" |
| 22 | |
| 23 | PACKAGES =+ "${PN}-tools" |
| 24 | FILES:${PN}-tools = "${bindir}/*.pl" |
| 25 | |
| 26 | SRC_URI = "\ |
| 27 | git://github.com/makedumpfile/makedumpfile;branch=${SRCBRANCH};protocol=https \ |
| 28 | file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \ |
| 29 | " |
| 30 | |
| 31 | S = "${WORKDIR}/git" |
| 32 | |
| 33 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" |
| 34 | |
| 35 | SECTION = "base" |
| 36 | |
| 37 | # If we do not specify TARGET, makedumpfile will build for the host but use the |
| 38 | # target gcc. |
| 39 | # |
| 40 | |
| 41 | MAKEDUMPFILE_TARGET ?= "${TARGET_ARCH}" |
| 42 | MAKEDUMPFILE_TARGET:powerpc = "ppc" |
| 43 | |
| 44 | EXTRA_OEMAKE = "\ |
| 45 | LINKTYPE=static \ |
| 46 | TARGET=${MAKEDUMPFILE_TARGET} \ |
| 47 | ${PACKAGECONFIG_CONFARGS} \ |
| 48 | " |
| 49 | |
| 50 | PACKAGECONFIG ??= "" |
| 51 | PACKAGECONFIG[lzo] = "USELZO=on,USELZO=off,lzo" |
| 52 | PACKAGECONFIG[snappy] = "USESNAPPY=on,USESNAPPY=off,snappy" |
| 53 | PACKAGECONFIG[zstd] = "USEZSTD=on,USEZSTD=off,zstd" |
| 54 | |
| 55 | do_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 | } |