[PATCH 5/6] upd-kernel: Update to not use moduleball

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

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux