Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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" |
| 7 | LICENSE = "GPLv2" |
| 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 | PR = "r1" |
| 13 | |
| 14 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ |
| 15 | file://kdump \ |
| 16 | file://kdump.conf \ |
| 17 | file://kdump.service \ |
| 18 | file://0002-powerpc-change-the-memory-size-limit.patch \ |
| 19 | file://0001-purgatory-Pass-r-directly-to-linker.patch \ |
| 20 | file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ |
| 21 | file://kexec-x32.patch \ |
| 22 | file://0001-Disable-PIE-during-link.patch \ |
| 23 | " |
| 24 | |
| 25 | SRC_URI[md5sum] = "5198968de79b5ded96f97f3c2ea9637b" |
| 26 | SRC_URI[sha256sum] = "cf17fc99bf77c9b39f06ee88ac0e86d0349c4a0c3f8214a3cc78eece872f6f3a" |
| 27 | |
| 28 | inherit autotools update-rc.d systemd |
| 29 | |
| 30 | export LDFLAGS = "-L${STAGING_LIBDIR}" |
| 31 | EXTRA_OECONF = " --with-zlib=yes" |
| 32 | |
| 33 | do_compile_prepend() { |
| 34 | # Remove the prepackaged config.h from the source tree as it overrides |
| 35 | # the same file generated by configure and placed in the build tree |
| 36 | rm -f ${S}/include/config.h |
| 37 | |
| 38 | # Remove the '*.d' file to make sure the recompile is OK |
| 39 | for dep in `find ${B} -type f -name '*.d'`; do |
| 40 | dep_no_d="`echo $dep | sed 's#.d$##'`" |
| 41 | # Remove file.d when there is a file.o |
| 42 | if [ -f "$dep_no_d.o" ]; then |
| 43 | rm -f $dep |
| 44 | fi |
| 45 | done |
| 46 | } |
| 47 | |
| 48 | do_install_append () { |
| 49 | install -d ${D}${sysconfdir}/sysconfig |
| 50 | install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig |
| 51 | |
| 52 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 53 | install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump |
| 54 | fi |
| 55 | |
| 56 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 57 | install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper |
| 58 | install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service |
| 59 | sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service |
| 60 | fi |
| 61 | } |
| 62 | |
| 63 | PACKAGES =+ "kexec kdump vmcore-dmesg" |
| 64 | |
| 65 | ALLOW_EMPTY_${PN} = "1" |
| 66 | RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" |
| 67 | |
| 68 | FILES_kexec = "${sbindir}/kexec" |
| 69 | FILES_kdump = "${sbindir}/kdump \ |
| 70 | ${sysconfdir}/sysconfig/kdump.conf \ |
| 71 | ${sysconfdir}/init.d/kdump \ |
| 72 | ${libexecdir}/kdump-helper \ |
| 73 | ${systemd_unitdir}/system/kdump.service \ |
| 74 | " |
| 75 | |
| 76 | FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" |
| 77 | |
| 78 | INITSCRIPT_PACKAGES = "kdump" |
| 79 | INITSCRIPT_NAME_kdump = "kdump" |
| 80 | INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." |
| 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" |