kexec-tools-klibc_git.bb 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # the binaries are statically linked against klibc
  2. SUMMARY = "Kexec tools, statically compiled against klibc"
  3. HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
  4. SECTION = "kernel/userland"
  5. LICENSE = "GPL-2.0-only"
  6. LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
  7. file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
  8. PV = "2.0.18+git"
  9. DEPENDS = "zlib xz"
  10. inherit klibc autotools siteinfo
  11. SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git;branch=master"
  12. SRCREV = "5750980cdbbc33ef75bfba6660295b932376ce15"
  13. BUILD_PATCHES = "file://0001-force-static-build.patch \
  14. file://0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch"
  15. KLIBC_PATCHES += " \
  16. file://0003-kexec-elf-rel-use-our-elf.h.patch \
  17. file://0004-kexec-elf-exec.c-replace-with-our-err.h.patch \
  18. file://0005-crashdump-elf.c-work-around-for-sysconf-_SC_NPROCESS.patch \
  19. file://0006-kexec-syscall.h-work-around-missing-syscall-wrapper.patch \
  20. file://0007-kexec.c-add-guard-around-ENOTSUP.patch \
  21. file://0008-kexec.c-replace-mising-BLKGETSIZE64.patch \
  22. file://0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch \
  23. file://0010-fs2dt.c-work-around-missing-getline.patch \
  24. file://0011-purgatory-Makefile-adapt-to-klcc.patch \
  25. file://0012-purgatory-string.c-avoid-inclusion-of-string.h.patch \
  26. file://0013-sha256.h-avoid-inclusion-of-sys-types.h.patch \
  27. file://0014-add-if_nameindex-from-musl.patch \
  28. file://0015-vmcore-dmesg-fix-warning.patch \
  29. file://klibc-reboot.patch \
  30. file://include_next.patch \
  31. "
  32. WARNING_FIXES = ""
  33. FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \
  34. file://powerpc_change-the-memory-size-limit.patch \
  35. file://kexec-x32.patch"
  36. SRC_URI += "${BUILD_PATCHES} ${KLIBC_PATCHES} ${WARNING_FIXES} ${FROM_OE_CORE}"
  37. SRC_URI:append:arm = " file://arm_crashdump.patch"
  38. SRC_URI:append:mips = " file://140-mips_disable_devicetree_support.patch"
  39. SRC_URI:append:mipsel = " file://140-mips_disable_devicetree_support.patch"
  40. SRC_URI:append:x86 = " file://x86_sys_io.patch file://x86_basename.patch \
  41. file://x86_vfscanf.patch file://x86_kexec_test.patch"
  42. SRC_URI:append:x86-64 = " file://x86_sys_io.patch file://x86_basename.patch \
  43. file://x86_vfscanf.patch file://x86_kexec_test.patch"
  44. SRC_URI:append:aarch64 = " file://arm64_kexec-image-header.h-add-missing-le64toh.patch \
  45. file://arm64-crashdump-arm64.c-fix-warning.patch \
  46. file://arm64_kexec-arm64.c-workaround-for-getrandom-syscall.patch"
  47. SRC_URI:append:powerpc = " file://powerpc-purgatory-Makefile-remove-unknown-flags.patch"
  48. S = "${WORKDIR}/git"
  49. EXTRA_OECONF += "--without-zlib --without-lzma --without-xen"
  50. # fix purgatory/printf.c:2:10: fatal error: limits.h: No such file or directory
  51. # fix include/limits.h:42:10: fatal error: bitsize/limits.h: No such file or directory
  52. CFLAGS += "-O2 -I${STAGING_DIR_HOST}${libdir}/klibc/include -I${S}/purgatory/include \
  53. -I${STAGING_DIR_HOST}${libdir}/klibc/include/bits${SITEINFO_BITS}"
  54. do_compile:prepend() {
  55. # Remove the prepackaged config.h from the source tree as it overrides
  56. # the same file generated by configure and placed in the build tree
  57. rm -f ${S}/include/config.h
  58. # Remove the '*.d' file to make sure the recompile is OK
  59. for dep in `find ${B} -type f -name '*.d'`; do
  60. dep_no_d="`echo $dep | sed 's#.d$##'`"
  61. # Remove file.d when there is a file.o
  62. if [ -f "$dep_no_d.o" ]; then
  63. rm -f $dep
  64. fi
  65. done
  66. }
  67. PACKAGES =+ "kexec-klibc vmcore-dmesg-klibc"
  68. FILES:kexec-klibc = "${sbindir}/kexec"
  69. FILES:vmcore-dmesg-klibc = "${sbindir}/vmcore-dmesg"
  70. INSANE_SKIP:${PN} = "arch"
  71. COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'