From: Josh Hunt Date: Thu, 12 Feb 2009 05:10:57 +0000 (-0800) Subject: kbuild: add vmlinux to kernel rpm X-Git-Tag: v2.6.29-rc6~81^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc370ecfdb37b853bd8e2118c7ad9f99fa9ac5cd;p=profile%2Fivi%2Fkernel-x86-ivi.git kbuild: add vmlinux to kernel rpm 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. Signed-off-by: Josh Hunt Signed-off-by: Sam Ravnborg --- diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 2500886..ee448cd 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -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'