summaryrefslogtreecommitdiffstats
path: root/kernel/update_kernel
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-08-20 16:12:07 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-08-20 16:12:07 +0000
commitf8279c76c0018f0dc3df4c9debc0bed1e6774649 (patch)
tree68e7a3fe5908730147b9788241d8b7c2957a61d9 /kernel/update_kernel
parentfa952752cc78b57266f537b0cc9a3652756b4851 (diff)
downloaddrakx-f8279c76c0018f0dc3df4c9debc0bed1e6774649.tar
drakx-f8279c76c0018f0dc3df4c9debc0bed1e6774649.tar.gz
drakx-f8279c76c0018f0dc3df4c9debc0bed1e6774649.tar.bz2
drakx-f8279c76c0018f0dc3df4c9debc0bed1e6774649.tar.xz
drakx-f8279c76c0018f0dc3df4c9debc0bed1e6774649.zip
- Strip modules on AMD64 with K. O. script
- Split network_gigabit_usb.img into network_{gigabit,usb}.img on AMD64
Diffstat (limited to 'kernel/update_kernel')
-rwxr-xr-xkernel/update_kernel15
1 files changed, 12 insertions, 3 deletions
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