linux-config.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel rpm with no module support.
@ 2006-02-27 19:14 Yaroslav Klyukin
  0 siblings, 0 replies; only message in thread
From: Yaroslav Klyukin @ 2006-02-27 19:14 UTC (permalink / raw)
  To: linux-config

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

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.

[-- Attachment #2: nomodules.patch --]
[-- Type: text/plain, Size: 1216 bytes --]

--- 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 ""

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-27 19:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 19:14 kernel rpm with no module support Yaroslav Klyukin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).