blob: 2e2703382a320a5270dae169c5193336972c02d8 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001# the binaries are statically linked against klibc
Patrick Williamsb48b7b42016-08-17 15:04:38 -05002SUMMARY = "Kexec tools, statically compiled against klibc"
Brad Bishop316dfdd2018-06-25 12:45:53 -04003AUTHOR = "Eric Biederman"
4HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
5SECTION = "kernel/userland"
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
8 file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
9DEPENDS = "zlib xz"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010
Brad Bishop316dfdd2018-06-25 12:45:53 -040011PR = "r1"
12
13inherit klibc autotools
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014
15FILESPATH =. "${FILE_DIRNAME}/kexec-tools-${PV}:"
16
17SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz"
18
19SRC_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 Bishop6e60e8b2018-02-01 10:27:11 -050029 file://0001-Adjust-the-order-of-headers-to-fix-build-for-musl.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030 "
31
Brad Bishop316dfdd2018-06-25 12:45:53 -040032SRC_URI[md5sum] = "92eff93b097475b7767f8c98df84408a"
33SRC_URI[sha256sum] = "09e180ff36dee087182cdc939ba6c6917b6adbb5fc12d589f31fd3659b6471f2"
34
Patrick Williamsb48b7b42016-08-17 15:04:38 -050035SRC_URI_append_arm = " file://arm_crashdump.patch"
36SRC_URI_append_powerpc = " file://ppc__lshrdi3.patch"
37SRC_URI_append_x86 = " file://x86_sys_io.patch file://x86_basename.patch file://x86_vfscanf.patch file://x86_kexec_test.patch"
38SRC_URI_append_x86-64 = " file://x86_sys_io.patch file://x86_basename.patch file://x86_vfscanf.patch file://x86_kexec_test.patch"
39
40S = "${WORKDIR}/kexec-tools-${PV}"
41
42EXTRA_OECONF += "--without-zlib --without-lzma --without-xen"
43
44CFLAGS += "-I${STAGING_DIR_HOST}${libdir}/klibc/include -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits32"
45CFLAGS_x86-64 += "-I${STAGING_DIR_HOST}${libdir}/klibc/include -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits64"
46
Brad Bishop316dfdd2018-06-25 12:45:53 -040047do_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 Williamsb48b7b42016-08-17 15:04:38 -050062PACKAGES =+ "kexec-klibc kdump-klibc"
63
64FILES_kexec-klibc = "${sbindir}/kexec"
65FILES_kdump-klibc = "${sbindir}/kdump"
Brad Bishop316dfdd2018-06-25 12:45:53 -040066
67INSANE_SKIP_${PN} = "arch"
68
69COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'