c2e79d80b5
There is a need to modify the source code of the kdump-tools package to adapt it to Debian-based StarlingX. This commit replaces the binary package with a source package. The default kernel image is located at /boot/vmlinuz-${kernel_version} in Debian system. But it is /boot/1/vmlinuz-${kernel_version} in the current starlingx system. In addition, initrd.img is also different because we use ostree. So this commit creates two soft links for vmlinuz and initrd.img. Test Plan: PASS: Image builds successfully. PASS: kdump-tools installs successfully. PASS: Can generate vmcore files in /var/crash after kernel panic. Story: 2009964 Task: 45623 Depends-On: https://review.opendev.org/c/starlingx/tools/+/845886 Depends-On: https://review.opendev.org/c/starlingx/tools/+/845884 Signed-off-by: Jiping Ma <jiping.ma2@windriver.com> Change-Id: Ifffbf0e436e79d9547a478f8b725e18f283d138e
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From bc657ad181e105e225849a78fd08ddcb630cb9e9 Mon Sep 17 00:00:00 2001
|
|
From: Jiping Ma <jiping.ma2@windriver.com>
|
|
Date: Sun, 12 Jun 2022 23:54:50 -0700
|
|
Subject: [PATCH] kdump-tools: add vmlinuz and initrd.img soft link.
|
|
|
|
Default vmlinuz is in the folder /boot, but our vmlinuz is in /boot/1.
|
|
so create the soft link for vmlinuz and initrd.img.
|
|
|
|
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
|
---
|
|
debian/kdump-config.in | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/debian/kdump-config.in b/debian/kdump-config.in
|
|
index 564ab94..eb23da1 100755
|
|
--- a/debian/kdump-config.in
|
|
+++ b/debian/kdump-config.in
|
|
@@ -494,6 +494,12 @@ kernel_version=$1
|
|
exit 1
|
|
fi
|
|
|
|
+ if [ ! -e "/boot/vmlinux-${kernel_version}" ] && [ ! -e "/boot/vmlinuz-${kernel_version}" ]; then
|
|
+ ln -s /boot/1/vmlinuz-${kernel_version} /boot/vmlinuz-${kernel_version}
|
|
+ fi
|
|
+ if [ ! -f "${KDUMP_DIR}/initrd.img-${kernel_version}" ]; then
|
|
+ ln -s /boot/1/initramfs /var/lib/kdump/initrd.img-${kernel_version}
|
|
+ fi
|
|
if [ -e "/boot/vmlinux-${kernel_version}" ] || [ -e "/boot/vmlinuz-${kernel_version}" ]; then
|
|
create_symlink vmlinuz "$kernel_version"
|
|
|
|
--
|
|
2.34.1
|
|
|