[rhel5-branch] [PATCH] Add extra modules that are not in the kernel package
Vratislav Podzimek
vpodzime at redhat.com
Tue Nov 13 12:34:14 UTC 2012
Some modules that we want are not in the kernel package. We need to
add them to the right directory tree before we make modules.cgz.
Resolves: rhbz#754213
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
scripts/mk-images | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/scripts/mk-images b/scripts/mk-images
index ce3beb6..d468a64 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -53,6 +53,9 @@ INFINIBANDMODS="ib_ipoib"
MSHVMODS="hv_storvsc hv_mouse hv_netvsc hv_vmbus"
INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS $CRYPTOMODS $BTERMMODS $COMMONMODS $PCMCIASOCKMODS $INFINIBANDMODS $MSHVMODS =scsi =net"
+# packages with modules not included in kernel
+EXTRAMODSPACKAGES="kmod-gfs"
+
# Set, verify, and create paths
KERNELPATH=$1
TOPDESTPATH=$2
@@ -866,6 +869,23 @@ for KERNELARCH in $arches; do
exit 1
fi
+ # add extra modules
+ for package in $EXTRAMODSPACKAGES; do
+ packagePath=(findPackage $KERNELPATH $package)
+ if [ "$KERNELARCH" = "i586" -a ! -f "$packagePath" ]; then
+ echo "No i586 $package, trying i686..."
+ KERNELARCH="i686"
+ packagePath=$(findPackage $KERNELPATH $package)
+ fi
+
+ if [ ! -f "$packagePath" ]; then
+ echo "$package doesn't exist for $KERNELARCH. skipping"
+ continue
+ fi
+
+ rpm2cpio $packagePath | (cd $KERNELROOT; cpio --quiet -iumd)
+ done
+
allmods=$(find $KERNELROOT/lib/modules/$version -name *.ko)
rundepmod "$allmods" $MODDEPS
--
1.7.11.7
More information about the anaconda-patches
mailing list