* [pve-devel] [PATCH kernel 1/2] build: conditionalize -dbgsym package
@ 2021-07-21 12:10 Fabian Grünbichler
2021-07-21 12:10 ` [pve-devel] [PATCH kernel 2/2] readme: document " Fabian Grünbichler
2021-07-29 15:19 ` [pve-devel] applied-series: Re: [PATCH kernel 1/2] build: conditionalize " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2021-07-21 12:10 UTC (permalink / raw)
To: pve-devel
via a new, namespaced build profile.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
test-built with and without build-profile enabled, no content difference
in the other debs.
debian/control.in | 1 +
debian/rules | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/control.in b/debian/control.in
index 7194d00..ee91978 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -71,6 +71,7 @@ Architecture: any
Provides: linux-debug
Section: devel
Priority: optional
+Build-Profiles: <pkg.pve-kernel.debug>
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
diff --git a/debian/rules b/debian/rules
index a500762..e338a01 100755
--- a/debian/rules
+++ b/debian/rules
@@ -138,7 +138,10 @@ binary: install
# remove firmware
rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware
- # debug package
+ifeq ($(filter pkg.pve-kernel.debug,$(DEB_BUILD_PROFILES)),)
+ echo "'pkg.pve-kernel.debug' build profile disabled, skipping -dbgsym creation"
+else
+ echo "'pkg.pve-kernel.debug' build profile enabled, creating -dbgsym contents"
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}
@@ -146,6 +149,7 @@ binary: install
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.*
+endif
# strip debug info
find debian/${PVE_KERNEL_PKG}/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] [PATCH kernel 2/2] readme: document -dbgsym package
2021-07-21 12:10 [pve-devel] [PATCH kernel 1/2] build: conditionalize -dbgsym package Fabian Grünbichler
@ 2021-07-21 12:10 ` Fabian Grünbichler
2021-07-29 15:19 ` [pve-devel] applied-series: Re: [PATCH kernel 1/2] build: conditionalize " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2021-07-21 12:10 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
README | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/README b/README
index 042db01..6c426c0 100644
--- a/README
+++ b/README
@@ -98,6 +98,18 @@ which device is actually used for /dev/watchdog.
We ship this list in /lib/modprobe.d/blacklist_pve-kernel-<VERSION>.conf
The user typically edit /etc/modules to enable a specific watchdog device.
+Debug kernel and modules
+------------------------
+
+In order to build a -dbgsym package containing an unstripped copy of the kernel
+image and modules, enable the 'pkg.pve-kernel.debug' build profile (e.g. by
+exporting DEB_BUILD_PROFILES='pkg.pve-kernel.debug'). The resulting package can
+be used together with 'crash'/'kdump-tools' to debug kernel crashes.
+
+Note: the -dbgsym package is only valid for the pve-kernel packages produced by
+the same build. A kernel/module from a different build will likely not match,
+even if both builds are of the same kernel and package version.
+
Additional information
----------------------
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied-series: Re: [PATCH kernel 1/2] build: conditionalize -dbgsym package
2021-07-21 12:10 [pve-devel] [PATCH kernel 1/2] build: conditionalize -dbgsym package Fabian Grünbichler
2021-07-21 12:10 ` [pve-devel] [PATCH kernel 2/2] readme: document " Fabian Grünbichler
@ 2021-07-29 15:19 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2021-07-29 15:19 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
On 21/07/2021 14:10, Fabian Grünbichler wrote:
> via a new, namespaced build profile.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> test-built with and without build-profile enabled, no content difference
> in the other debs.
>
> debian/control.in | 1 +
> debian/rules | 6 +++++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
>
applied both patches a bit ago but it seems I forgot to reply that... Any how, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-29 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 12:10 [pve-devel] [PATCH kernel 1/2] build: conditionalize -dbgsym package Fabian Grünbichler
2021-07-21 12:10 ` [pve-devel] [PATCH kernel 2/2] readme: document " Fabian Grünbichler
2021-07-29 15:19 ` [pve-devel] applied-series: Re: [PATCH kernel 1/2] build: conditionalize " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox