Skip to contentSkip to conversation

Add vmlinux to kernel rpm - updated description

PATCH Applied Josh Hunt 2 participants 3 messages Feb 12, 2009 – Feb 18, 2009 Kbuild

lore
Share & tools
lore

Josh Hunt

author
#0 lore raw

PATCH 1/1 Add vmlinux to kernel rpm - updated description

Resending with updated description:

We are building an automated system to test kernels weekly and need to provide an rpm to our QA dept. We would like to use the ability to create kernel rpms already in the kernel's Makefile, but need the vmlinux file included in the rpm for later debugging. This patch adds a compressed vmlinux to the kernel rpm when doing a make rpm-pkg or binrpm-pkg and upon install places the vmlinux file in /boot.

Index: linux-2.6.28/scripts/package/mkspec
===================================================================
--- linux-2.6.28.orig/scripts/package/mkspec 2008-12-24
15:26:37.000000000 -0800
+++ linux-2.6.28/scripts/package/mkspec 2009-01-21
16:53:03.000000000 -0800
@@ -86,6 +86,14 @@ echo "%endif"
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"

echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
+
+echo "%ifnarch ppc64"
+echo 'cp vmlinux vmlinux.orig'
+echo 'bzip2 -9 vmlinux'
+echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" +echo 'mv vmlinux.orig vmlinux'
+echo "%endif"
+
echo ""
echo "%clean"
echo '#echo -rf $RPM_BUILD_ROOT'

Applied
#1 lore raw
Quoted 10 lines · Josh Hunt

Resending with updated description:

We are building an automated system to test kernels weekly and need to provide an rpm to our QA dept. We would like to use the ability to create kernel rpms already in the kernel's Makefile, but need the vmlinux file included in the rpm for later debugging. This patch adds a compressed vmlinux to the kernel rpm when doing a make rpm-pkg or binrpm-pkg and upon install places the vmlinux file in /boot.

Applied, but...

Quoted 8 lines

Index: linux-2.6.28/scripts/package/mkspec
===================================================================
--- linux-2.6.28.orig/scripts/package/mkspec 2008-12-24
15:26:37.000000000 -0800
+++ linux-2.6.28/scripts/package/mkspec 2009-01-21
16:53:03.000000000 -0800

Review echo "%endif" · line 91

Quoted 6 lines
(quoted diff) +3 -0
@@ -86,6 +86,14 @@ echo "%endif"
 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
 
 echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
+
+echo "%ifnarch ppc64"
+echo 'cp vmlinux vmlinux.orig'

why is this relevant for all architectures except ppc64? This is not addressed neither in a comment nor in the changelog.

Sam

author
#2 lore raw
Quoted 24 lines · Sam Ravnborg
Quoted 10 lines · Josh Hunt

Resending with updated description:

We are building an automated system to test kernels weekly and need to provide an rpm to our QA dept. We would like to use the ability to create kernel rpms already in the kernel's Makefile, but need the vmlinux file included in the rpm for later debugging. This patch adds a compressed vmlinux to the kernel rpm when doing a make rpm-pkg or binrpm-pkg and upon install places the vmlinux file in /boot.

Applied, but...

Quoted 10 lines

Index: linux-2.6.28/scripts/package/mkspec
===================================================================
--- linux-2.6.28.orig/scripts/package/mkspec 2008-12-24
15:26:37.000000000 -0800
+++ linux-2.6.28/scripts/package/mkspec 2009-01-21
16:53:03.000000000 -0800

(quoted diff) +0 -0
@@ -86,6 +86,14 @@ echo "%endif"
 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
 
Quoted 6 lines

Review echo "%endif" · line 91

Quoted 4 lines
(quoted diff) +3 -0
 echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
+
+echo "%ifnarch ppc64"
+echo 'cp vmlinux vmlinux.orig'

why is this relevant for all architectures except ppc64? This is not addressed neither in a comment nor in the changelog.

I was under the impression that the ppc64 vmlinuz file could be unzipped and used for debugging and so adding it to /boot would be redundant. Please let me know if this is not the case and I will submit an updated patch.

Thanks
Josh