Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | # the binaries are statically linked against klibc |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 2 | SUMMARY = "Kexec tools, statically compiled against klibc" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 3 | AUTHOR = "Eric Biederman" |
| 4 | HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" |
| 5 | SECTION = "kernel/userland" |
| 6 | LICENSE = "GPLv2" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ |
| 8 | file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" |
| 9 | DEPENDS = "zlib xz" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 10 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | PR = "r1" |
| 12 | |
| 13 | inherit klibc autotools |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | |
| 15 | FILESPATH =. "${FILE_DIRNAME}/kexec-tools-${PV}:" |
| 16 | |
| 17 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz" |
| 18 | |
| 19 | SRC_URI += " \ |
| 20 | file://kexec-elf-rel.patch \ |
| 21 | file://kexec-syscall.patch \ |
| 22 | file://cflags_static.patch \ |
| 23 | file://ifdown_errno.patch \ |
| 24 | file://purgatory_flags.patch \ |
| 25 | file://purgatory_string.patch \ |
| 26 | file://sha256.patch \ |
| 27 | file://sysconf_nrprocessors.patch \ |
| 28 | file://fix-out-of-tree-build.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | file://0001-Adjust-the-order-of-headers-to-fix-build-for-musl.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 30 | " |
| 31 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 32 | SRC_URI[md5sum] = "92eff93b097475b7767f8c98df84408a" |
| 33 | SRC_URI[sha256sum] = "09e180ff36dee087182cdc939ba6c6917b6adbb5fc12d589f31fd3659b6471f2" |
| 34 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | SRC_URI_append_arm = " file://arm_crashdump.patch" |
| 36 | SRC_URI_append_powerpc = " file://ppc__lshrdi3.patch" |
| 37 | SRC_URI_append_x86 = " file://x86_sys_io.patch file://x86_basename.patch file://x86_vfscanf.patch file://x86_kexec_test.patch" |
| 38 | SRC_URI_append_x86-64 = " file://x86_sys_io.patch file://x86_basename.patch file://x86_vfscanf.patch file://x86_kexec_test.patch" |
| 39 | |
| 40 | S = "${WORKDIR}/kexec-tools-${PV}" |
| 41 | |
| 42 | EXTRA_OECONF += "--without-zlib --without-lzma --without-xen" |
| 43 | |
| 44 | CFLAGS += "-I${STAGING_DIR_HOST}${libdir}/klibc/include -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32" |
| 45 | CFLAGS_x86-64 += "-I${STAGING_DIR_HOST}${libdir}/klibc/include -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits64" |
| 46 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 47 | do_compile_prepend() { |
| 48 | # Remove the prepackaged config.h from the source tree as it overrides |
| 49 | # the same file generated by configure and placed in the build tree |
| 50 | rm -f ${S}/include/config.h |
| 51 | |
| 52 | # Remove the '*.d' file to make sure the recompile is OK |
| 53 | for dep in `find ${B} -type f -name '*.d'`; do |
| 54 | dep_no_d="`echo $dep | sed 's#.d$##'`" |
| 55 | # Remove file.d when there is a file.o |
| 56 | if [ -f "$dep_no_d.o" ]; then |
| 57 | rm -f $dep |
| 58 | fi |
| 59 | done |
| 60 | } |
| 61 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 62 | PACKAGES =+ "kexec-klibc kdump-klibc" |
| 63 | |
| 64 | FILES_kexec-klibc = "${sbindir}/kexec" |
| 65 | FILES_kdump-klibc = "${sbindir}/kdump" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 66 | |
| 67 | INSANE_SKIP_${PN} = "arch" |
| 68 | |
| 69 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)' |