From 8d483c36d721432e247be6b0908584c730f70529 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 10 Apr 2008 14:09:15 +0100 Subject: upd-kernel: Update to not use moduleball We now just keep a tree of compressed modules rather than a moduleball, so handle updating that new format. Signed-off-by: Mark McLoughlin --- scripts/upd-kernel | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'scripts/upd-kernel') diff --git a/scripts/upd-kernel b/scripts/upd-kernel index 66f8da0a6..d728f7e46 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 -- cgit