From f8279c76c0018f0dc3df4c9debc0bed1e6774649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Wed, 20 Aug 2003 16:12:07 +0000 Subject: - Strip modules on AMD64 with K. O. script - Split network_gigabit_usb.img into network_{gigabit,usb}.img on AMD64 --- kernel/update_kernel | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'kernel/update_kernel') diff --git a/kernel/update_kernel b/kernel/update_kernel index 9a7e5b79e..f54ea5d83 100755 --- a/kernel/update_kernel +++ b/kernel/update_kernel @@ -3,6 +3,12 @@ ALL_KERNELS="all.kernels" RPMS=/export/Mandrake/RPMS +ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'` + +if [[ "$ARCH" = "x86_64" ]]; then + STRIP_MODULES="yes" +fi + # move stuff to this new "kernel" directory if [ ! -d all.kernels ]; then if [ -d ../all.kernels ]; then @@ -33,11 +39,16 @@ function create_modules() { } function create_modules_mar() { + if [[ -n "$STRIP_MODULES" ]]; then + echo -n "stripping $kern: " + $GIBASEDIR/kernel/strip_modules *.o + echo "done" + fi echo -n "packdrake $kern: " ls *.o | packdrake -b9s "modules.cz" 400000 echo "done" mv modules.cz ../modules.cz-$kern - for i in network network_gigabit_usb cdrom hd hdcdrom_usb pcmcia all; do + for i in network network_gigabit_usb network_gigabit network_usb cdrom hd hdcdrom_usb pcmcia all; do modules_var="${i}_modules" eval "create_marfile ${i}_modules.mar \$$modules_var" done @@ -46,8 +57,6 @@ function create_modules_mar() { [ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main) -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 -- cgit v1.2.1