diff --git a/debian/control.in b/debian/control.in index 1f235f0..a9c8dd8 100644 --- a/debian/control.in +++ b/debian/control.in @@ -71,6 +71,14 @@ Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64, Description: The Proxmox PVE Kernel Image This package contains the linux kernel and initial ramdisk used for booting +Package: pve-kernel-@KVNAME@-dbgsym +Architecture: any +Provides: linux-debug +Section: devel +Priority: optional +Description: The Proxmox PVE Kernel debug image + This package provides the kernel debug image for version @KVNAME@. The debug kernel image contained in this package is NOT meant to boot from - it is uncompressed, and unstripped, and suitable for use with crash/kdump-tools/.. to analyze kernel crashes. This package also contains the pve-kernel modules in their unstripped version. + Package: pve-kernel-libc-dev Section: devel Priority: optional diff --git a/debian/rules b/debian/rules index 7b1b251..ec22136 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,7 @@ include debian/rules.d/${DEB_BUILD_ARCH}.mk CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate) PVE_KERNEL_PKG=pve-kernel-${KVNAME} +PVE_DEBUG_KERNEL_PKG=pve-kernel-${KVNAME}-dbgsym PVE_HEADER_PKG=pve-headers-${KVNAME} PVE_USR_HEADER_PKG=pve-kernel-libc-dev LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN} @@ -132,6 +133,16 @@ binary: install install -m 644 $(addprefix ${MODULES}/,zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko icp.ko zlua.ko spl.ko zzstd.ko) debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs # remove firmware rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware + + # debug package + mkdir -p debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME} + mkdir debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot + install -m 644 ${KERNEL_SRC}/vmlinux debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot/vmlinux-${KVNAME} + cp -r debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME} debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/ + rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/source + rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/build + rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/modules.* + # strip debug info find debian/${PVE_KERNEL_PKG}/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done # finalize