sparc64 needs an entirely untouched, unstripped kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In testing, I've found that sparc64 needs an entirely untouched,
unstripped kernel in order to netboot. The kernels which have gone
through the debuginfo process did not netboot properly, but an untouched
copy of the kernel made right after it is built work fine.

This is a variant of the spec code we've been using in Aurora for a
while, it enables a with-unstripped option, and only enables it for
sparc64. If enabled, it makes a copy, calls it foo-UNSTRIPPED, and
includes it in the %files macro.

If this is ok, let me know, and I'll commit it in rawhide. If there is a
better way to be doing this, also let me know. :)

~spot


--- kernel.spec	2007-08-17 12:05:29.000000000 -0400
+++ /home/spot/kernel.spec	2007-08-17 12:01:23.000000000 -0400
@@ -93,6 +93,9 @@
 # Whether or not to gpg sign modules
 %define with_modsign   %{?_without_modsign:   0} %{?!_without_modsign:   1}
 
+# Whether or not to package an unstripped copy of the kernel (for netbooting)
+%define with_unstripped %{?_without_unstripped: 0} %{?!_without_unstripped: 1}
+
 # Whether or not to do C=1 builds with sparse
 %define usesparse 0
 %if "%fedora" >= "7"
@@ -214,6 +217,11 @@
 %define with_smp 0
 %endif
 
+# only sparc64 needs unstripped kernels
+%ifnarch sparc64
+%define with_unstripped 0
+%endif
+
 # pae is only valid on i686
 %ifnarch i686
 %define with_pae 0
@@ -1297,6 +1305,10 @@
     install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
     touch $RPM_BUILD_ROOT/boot/initrd-$KernelVer.img
     cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+%if %{with_unstripped}
+    cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer-UNSTRIPPED
+    chmod -x $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer-UNSTRIPPED
+%endif
     if [ -f arch/$Arch/boot/zImage.stub ]; then
       cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
     fi
@@ -1697,6 +1709,9 @@
 %{expand:%%files %{?2}}\
 %defattr(-,root,root)\
 /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2}\
+%if %{with_unstripped}\
+/%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2}-UNSTRIPPED\
+%endif\
 /boot/System.map-%{KVERREL}%{?2}\
 #/boot/symvers-%{KVERREL}%{?2}.gz\
 /boot/config-%{KVERREL}%{?2}\
_______________________________________________
Fedora-kernel-list mailing list
Fedora-kernel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-kernel-list

[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux