Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | |
| 2 | SUMMARY = "Kexec fast reboot tools" |
| 3 | DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" |
| 4 | AUTHOR = "Eric Biederman" |
| 5 | HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" |
| 6 | SECTION = "kernel/userland" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7 | LICENSE = "GPL-2.0-only" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ |
| 9 | file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" |
| 10 | DEPENDS = "zlib xz" |
| 11 | |
| 12 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ |
| 13 | file://kdump \ |
| 14 | file://kdump.conf \ |
| 15 | file://kdump.service \ |
| 16 | file://0001-powerpc-change-the-memory-size-limit.patch \ |
| 17 | file://0002-purgatory-Pass-r-directly-to-linker.patch \ |
| 18 | file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ |
| 19 | file://0005-Disable-PIE-during-link.patch \ |
| 20 | file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ |
| 21 | " |
| 22 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 23 | SRC_URI[sha256sum] = "1ff9137327aeac3b2ab922a71bc6eb4655571a0ff77c071cb92783a9a59d4d26" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 24 | |
| 25 | inherit autotools update-rc.d systemd |
| 26 | |
| 27 | export LDFLAGS = "-L${STAGING_LIBDIR}" |
| 28 | EXTRA_OECONF = " --with-zlib=yes" |
| 29 | |
| 30 | do_compile:prepend() { |
| 31 | # Remove the prepackaged config.h from the source tree as it overrides |
| 32 | # the same file generated by configure and placed in the build tree |
| 33 | rm -f ${S}/include/config.h |
| 34 | |
| 35 | # Remove the '*.d' file to make sure the recompile is OK |
| 36 | for dep in `find ${B} -type f -name '*.d'`; do |
| 37 | dep_no_d="`echo $dep | sed 's#.d$##'`" |
| 38 | # Remove file.d when there is a file.o |
| 39 | if [ -f "$dep_no_d.o" ]; then |
| 40 | rm -f $dep |
| 41 | fi |
| 42 | done |
| 43 | } |
| 44 | |
| 45 | do_install:append () { |
| 46 | install -d ${D}${sysconfdir}/sysconfig |
| 47 | install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig |
| 48 | |
| 49 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 50 | install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump |
| 51 | fi |
| 52 | |
| 53 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 54 | install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper |
| 55 | install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_system_unitdir}/kdump.service |
| 56 | sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_system_unitdir}/kdump.service |
| 57 | fi |
| 58 | } |
| 59 | |
| 60 | PACKAGES =+ "kexec kdump vmcore-dmesg" |
| 61 | |
| 62 | ALLOW_EMPTY:${PN} = "1" |
| 63 | RRECOMMENDS:${PN} = "kexec kdump vmcore-dmesg" |
| 64 | |
| 65 | FILES:kexec = "${sbindir}/kexec" |
| 66 | FILES:kdump = "${sbindir}/kdump \ |
| 67 | ${sysconfdir}/sysconfig/kdump.conf \ |
| 68 | ${sysconfdir}/init.d/kdump \ |
| 69 | ${libexecdir}/kdump-helper \ |
| 70 | ${systemd_system_unitdir}/kdump.service \ |
| 71 | " |
| 72 | |
| 73 | FILES:vmcore-dmesg = "${sbindir}/vmcore-dmesg" |
| 74 | |
| 75 | INITSCRIPT_PACKAGES = "kdump" |
| 76 | INITSCRIPT_NAME:kdump = "kdump" |
| 77 | INITSCRIPT_PARAMS:kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." |
| 78 | |
| 79 | SYSTEMD_PACKAGES = "kdump" |
| 80 | SYSTEMD_SERVICE:kdump = "kdump.service" |
| 81 | |
| 82 | SECURITY_PIE_CFLAGS:remove = "-fPIE -pie" |
| 83 | |
| 84 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' |
| 85 | |
| 86 | INSANE_SKIP:${PN} = "arch" |