kexec-tools: added the script kdump
PATCH 1/1 kexec-tools: added the script kdump
Added the script file kdump,it provides the follow support:
1. Load a kdump kernel image into memory;
2. Copy away vmcore when system panic.
Signed-off-by Wenlin Kang <[email protected]>
--- meta/recipes-kernel/kexec/kexec-tools.inc | 5 +- meta/recipes-kernel/kexec/kexec-tools/kdump | 163 +++++++++++++++++++++++ meta/recipes-kernel/kexec/kexec-tools/kdump.conf | 18 +++ meta/recipes-kernel/kexec/kexec-tools_2.0.10.bb | 8 ++ 4 files changed, 193 insertions(+), 1 deletion(-) create mode 100755 meta/recipes-kernel/kexec/kexec-tools/kdump create mode 100644 meta/recipes-kernel/kexec/kexec-tools/kdump.conf
meta/recipes-kernel/kexec/kexec-tools.inc +4 -1
@@ -8,7 +8,10 @@ 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" +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ + file://kdump \ + file://kdump.conf \ +" PR = "r1"
meta/recipes-kernel/kexec/kexec-tools/kdump new file +163 -0
163 lines not on this page · raw message
meta/recipes-kernel/kexec/kexec-tools/kdump.conf new file +18 -0
@@ -0,0 +1,18 @@ +#the kdump kernel version string. +#KDUMP_KVER="`uname -r`" + +#this will be passed to the kdump kernel as kdump kernel command line, it +#usually comes from /proc/cmdline +#KDUMP_CMDLINE="`cat /proc/cmdline`" + +# append arguments to the kdump commandline +#KDUMP_CMDLINE_APPEND="kdump_needed maxcpus=1 irqpoll reset_devices" + +#the kernel image for kdump +#KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}" + +#Where to save the vmcore +#KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" + +#the arguments to makedumpfile +MAKEDUMPFILE_ARGS="--dump-dmesg -x /boot/vmlinux-`uname -r`"
meta/recipes-kernel/kexec/kexec-tools_2.0.10.bb +8 -0
@@ -17,6 +17,14 @@ PACKAGES =+ "kexec kdump vmcore-dmesg" ALLOW_EMPTY_${PN} = "1" RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" +FILES_${PN} =+ "${sysconfig}/init.d/kdump ${sysconfig}/sysconfig/kdump.conf" FILES_kexec = "${sbindir}/kexec" FILES_kdump = "${sbindir}/kdump" FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump + install -d ${D}${sysconfdir}/sysconfig + install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig +}
Signature · 1 line
1.9.1