[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 5/6] upd-kernel: Update to not use moduleball
- From: Mark McLoughlin <markmc redhat com>
- To: anaconda-devel-list redhat com
- Cc: markmc redhat com
- Subject: [PATCH 5/6] upd-kernel: Update to not use moduleball
- Date: Thu, 10 Apr 2008 14:09:15 +0100
We now just keep a tree of compressed modules rather than
a moduleball, so handle updating that new format.
Signed-off-by: Mark McLoughlin <markmc redhat com>
---
scripts/upd-kernel | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/scripts/upd-kernel b/scripts/upd-kernel
index 66f8da0..d728f7e 100755
--- a/scripts/upd-kernel
+++ b/scripts/upd-kernel
@@ -57,23 +57,18 @@ popd
mkdir initrd
pushd initrd
zcat $OLDDIR/initrd.img |cpio -id
-popd
-mkdir initrd/modules/mods
-# explode the moduleball
-pushd initrd/modules/mods
-zcat ../modules.cgz |cpio -id
-popd
+for mod in $(find modules/ -type f -name '*.ko.gz' -exec basename {} \; | sort | uniq) ; do
+ for path in $(find $WORKDIR/rpm/lib/modules/$NEWVER/ -name ${mod%.gz}); do
+ dest=${path##$WORKDIR/rpm/lib/}
+ mkdir -p $(dirname $dest)
+ gzip < $path > $dest.gz
+ done
+done
-mkdir -p newmods/$NEWVER/$ARCH
-for i in $(find initrd/modules/mods -type f -name '*.ko' -exec basename {} \;); do find $WORKDIR/rpm/lib/modules/*/ -name $i -exec cp -v {} $WORKDIR/newmods/$NEWVER/$ARCH \; ; done
-rm -rf initrd/modules/mods
+/sbin/depmod -a -b . $NEWVER
+rm -f modules/$NEWVER/modules.*map
-pushd newmods
-find . |cpio --quiet -H crc -o |gzip -9 > $WORKDIR/initrd/modules/modules.cgz
-popd
-
-pushd initrd
find . |cpio -c -o |gzip -9 > $NEWDIR/initrd.img
popd
--
1.5.4.1
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]