diff options
author | Mystery Man <unknown@mandriva.org> | 2003-08-20 07:37:27 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-08-20 07:37:27 +0000 |
commit | 7f2ac73888b8ef372ea597049981b27e7d810ac2 (patch) | |
tree | 354132889b63bbe5f446cb82869b3c3367135a80 /kernel/update_kernel | |
parent | 327bd24f8e4291bd1882de1990dd7339f781a9cb (diff) | |
download | drakx-backup-do-not-use-topic/MDKC_1_0.tar drakx-backup-do-not-use-topic/MDKC_1_0.tar.gz drakx-backup-do-not-use-topic/MDKC_1_0.tar.bz2 drakx-backup-do-not-use-topic/MDKC_1_0.tar.xz drakx-backup-do-not-use-topic/MDKC_1_0.zip |
This commit was manufactured by cvs2svn to create branch 'MDKC_1_0'.topic/MDKC_1_0
Diffstat (limited to 'kernel/update_kernel')
-rwxr-xr-x | kernel/update_kernel | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel index 9cea09e7d..b778fd150 100755 --- a/kernel/update_kernel +++ b/kernel/update_kernel @@ -1,11 +1,17 @@ #!/bin/bash ALL_KERNELS="all.kernels" +RPMS=/RPMS # move stuff to this new "kernel" directory if [ ! -d all.kernels ]; then - mv ../all.kernels . - rm -rf ../all.modules + if [ -d ../all.kernels ]; then + mv ../all.kernels . + rm -rf ../all.modules + else + # make sure "all.kernels" directory exists + mkdir all.kernels + fi fi function create_marfile() { @@ -29,7 +35,7 @@ function create_modules() { ls *.o | packdrake -b9s "modules.cz" 400000 echo "done" mv modules.cz ../modules.cz-$kern - for i in network cdrom hd usb other pcmcia all; do + for i in network cdrom hd usb other pcmcia all ka; do modules_var="${i}_modules" eval "create_marfile ${i}_modules.mar \$$modules_var" done @@ -38,13 +44,23 @@ function create_modules() { [ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main) -rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-(.*)\.(.*)/$1-${2}BOOT/') +ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'` + +if [ "$ARCH" == "ia64" ] || [ "$ARCH" == "ppc" ]; then + rpm=$(rpm -qp --qf '%{name}' $RPMS/kernel-[0-9]*.rpm | perl -pe 's/kernel-((\.?[0-9]+){3})\.(.*)/$1-${3}/') +else + rpm=$(rpm -qp --qf '%{name}' $RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-((\.?[0-9]+){3})\.(.*)/$1-${3}BOOT/') +fi if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then [ -n "$main" ] && rm -rf $ALL_KERNELS/$main cd $ALL_KERNELS rm -rf $rpm ; mkdir $rpm cd $rpm - rpm2cpio /RPMS/kernel-BOOT-*.rpm | cpio -id + if [ "$ARCH" == "ia64" ] || [ "$ARCH" == "ppc" ]; then + rpm2cpio $RPMS/kernel-[0-9]*.rpm | cpio -id + else + rpm2cpio $RPMS/kernel-BOOT-*.rpm | cpio -id + fi find -type f -name "*.o.gz" | xargs gunzip cd ../.. @@ -61,7 +77,6 @@ fi cd .. } -ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'` eval `perl modules.pl images` @@ -70,12 +85,12 @@ if [ "$ARCH" == "i386" ]; then #disable any existing resolution!!! /usr/sbin/rdev -v $i 65535 #788 #785 done -else - if [ "$ARCH" == "ppc" ]; then - cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux . - else - cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux.gz . - fi +elif [ "$ARCH" == "ppc" ]; then + cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux . +elif [ "$ARCH" == "ia64" ]; then + cp -f "$KERNEL_BOOT_PATH"/boot/efi/vmlinuz* . +else + cp -f "$KERNEL_BOOT_PATH"/boot/vmlinuz* . fi @@ -91,6 +106,7 @@ for i in $ALL_KERNELS/*; do create_modules ../../$i $kern else echo "$kern ($main)" + find ../../$i -type f -name "*.o.gz" | xargs gunzip create_modules ../../$i $kern 2>/dev/null fi ) || exit 1 |