From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yaroslav Klyukin Subject: kernel rpm with no module support. Date: Mon, 27 Feb 2006 14:14:05 -0500 Message-ID: <44034F7D.4030200@demandware.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060402000805020607030008" Return-path: Sender: linux-config-owner@vger.kernel.org List-Id: To: linux-config@vger.kernel.org This is a multi-part message in MIME format. --------------060402000805020607030008 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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. --------------060402000805020607030008 Content-Type: text/plain; name="nomodules.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="nomodules.patch" --- 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 "" --------------060402000805020607030008--