kernel rpm with no module support.

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

 



Patch that allows to build monolithic kernel (CONFIG_MODULES disabled) RPMs.

Not sure where to send it. If this is the wrong place, please forward it
appropriately.
--- scripts/package/mkspec.orig	2006-02-27 18:54:22.000000000 +0000
+++ scripts/package/mkspec	2006-02-27 19:02:03.000000000 +0000
@@ -17,10 +17,16 @@
 fi
 
 # starting to output the spec
-if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
+if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" == "y" ]; then
 	PROVIDES=kernel-drm
 fi
 
+if [ "`grep CONFIG_MODULES=y .config`" == "" ]; then
+	MODULES=false
+else
+        MODULES=true
+fi
+
 PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
 __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"`
 
@@ -64,7 +70,9 @@
 echo "%install"
 echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
 
-echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
+if $MODULES ; then
+  echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
+fi
 echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
 
 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
@@ -77,6 +85,8 @@
 echo "%files"
 echo '%defattr (-, root, root)'
 echo "%dir /lib/modules"
-echo "/lib/modules/$KERNELRELEASE"
+if $MODULES ; then
+  echo "/lib/modules/$KERNELRELEASE"
+fi
 echo "/boot/*"
 echo ""

[Index of Archives]     [Audio]     [Linux Console]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Fedora Users]

  Powered by Linux