mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
Once use kexec in arm arch, it will throw out the error info as below: Could not find a free area of memory of 0xc78e744 bytes... This is because that kexec use kexec_file_load to load image by default but arm doesn't support it. So add this patch to avoid use kexec_file_load in arm platforms. (From OE-Core rev: 952a3fa77c80f16cd6d97f35afdb474876a39483) Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
89 lines
3.2 KiB
BlitzBasic
89 lines
3.2 KiB
BlitzBasic
|
|
SUMMARY = "Kexec fast reboot tools"
|
|
DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
|
|
AUTHOR = "Eric Biederman"
|
|
HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
|
|
SECTION = "kernel/userland"
|
|
LICENSE = "GPLv2"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
|
|
file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
|
|
DEPENDS = "zlib xz"
|
|
|
|
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
|
|
file://kdump \
|
|
file://kdump.conf \
|
|
file://kdump.service \
|
|
file://0001-powerpc-change-the-memory-size-limit.patch \
|
|
file://0002-purgatory-Pass-r-directly-to-linker.patch \
|
|
file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
|
|
file://0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch \
|
|
file://0005-Disable-PIE-during-link.patch \
|
|
file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
|
|
"
|
|
|
|
SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"
|
|
SRC_URI[sha256sum] = "913c8dee918e5855a4ba60d609371390978144b4c8d15d6446ca0057b7bc5e58"
|
|
|
|
inherit autotools update-rc.d systemd
|
|
|
|
export LDFLAGS = "-L${STAGING_LIBDIR}"
|
|
EXTRA_OECONF = " --with-zlib=yes"
|
|
|
|
do_compile_prepend() {
|
|
# Remove the prepackaged config.h from the source tree as it overrides
|
|
# the same file generated by configure and placed in the build tree
|
|
rm -f ${S}/include/config.h
|
|
|
|
# Remove the '*.d' file to make sure the recompile is OK
|
|
for dep in `find ${B} -type f -name '*.d'`; do
|
|
dep_no_d="`echo $dep | sed 's#.d$##'`"
|
|
# Remove file.d when there is a file.o
|
|
if [ -f "$dep_no_d.o" ]; then
|
|
rm -f $dep
|
|
fi
|
|
done
|
|
}
|
|
|
|
do_install_append () {
|
|
install -d ${D}${sysconfdir}/sysconfig
|
|
install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
|
install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
|
|
fi
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
|
install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
|
|
install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
|
|
sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
|
|
fi
|
|
}
|
|
|
|
PACKAGES =+ "kexec kdump vmcore-dmesg"
|
|
|
|
ALLOW_EMPTY_${PN} = "1"
|
|
RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
|
|
|
|
FILES_kexec = "${sbindir}/kexec"
|
|
FILES_kdump = "${sbindir}/kdump \
|
|
${sysconfdir}/sysconfig/kdump.conf \
|
|
${sysconfdir}/init.d/kdump \
|
|
${libexecdir}/kdump-helper \
|
|
${systemd_unitdir}/system/kdump.service \
|
|
"
|
|
|
|
FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
|
|
|
|
INITSCRIPT_PACKAGES = "kdump"
|
|
INITSCRIPT_NAME_kdump = "kdump"
|
|
INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
|
|
|
|
SYSTEMD_PACKAGES = "kdump"
|
|
SYSTEMD_SERVICE_kdump = "kdump.service"
|
|
|
|
SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
|
|
|
|
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
|
|
|
|
INSANE_SKIP_${PN} = "arch"
|