I just do "MakeDist -a" as user and untar the result as root. Script appended.
Olaf
#!/bin/sh
# MakeDist - build Linux kernel installation tarballs
# written by Olaf Titz, 1999-2000. Public domain.
#
# Call this as MakeDist [-a] [kernel-source-dir]
#
# This will create two tarballs in the kernel source dir:
# boot-x.y.z.v contains /boot and /lib/modules stuff
# inc-x.y.z.v contains /usr/src/linux-x.y.z/include
# The "v" name component is the build number from .version.
#
# The "-a" argument does a "make dep bzImage modules" cycle
# before building tarballs.
#
set -e
#J=-j2
J=""
buildall=false
if [ "$1" = "-a" ]; then
buildall=true
shift
fi
[ "$1" -a -d "$1" ] && cd "$1"
[ -e kernel/panic.c -a -d include/linux ] || { echo "usage: $0 srcdir"; exit 1; }
if $buildall ; then
make dep
rm -f make.log.0
[ -f make.log ] && mv make.log make.log.0
time make $J bzImage modules 2>&1 | tee make.log
fi
mkdir tmp 2>/dev/null || true
rm -rf tmp/boot tmp/lib tmp/usr 2>/dev/null
va=`sed -n 's/^#define UTS_RELEASE "\(.*\)".*$/\1/p' include/linux/version.h`
vb=`cat .version`
vc="$va.$vb"
mkdir tmp/boot
cp -p arch/i386/boot/bzImage tmp/boot/vmlinuz-$va
cp -p System.map tmp/boot/System.map-$va
cp -p .config tmp/boot/config-$va
make modules_install INSTALL_MOD_PATH=`pwd`/tmp
rm -f tmp/lib/modules/$va/build || true
echo "Creating boot-$vc.tar.gz"
( cd tmp; tar chzf ../boot-$vc.tar.gz boot lib )
mkdir -p tmp/usr/src/linux-$va/include
ARCH=`uname -m | sed 's/i.86/i386/;s/sun4u/sparc64/;s/arm.*/arm/;s/sa110/arm/'`
GENINC=`find include -mindepth 1 -maxdepth 1 \! -name 'asm*'`
cp -pR $GENINC include/asm-$ARCH tmp/usr/src/linux-$va/include
( cd tmp/usr/src/linux-$va/include; ln -s asm-$ARCH asm )
echo "Creating inc-$vc.tar.gz"
( cd tmp; tar czf ../inc-$vc.tar.gz usr )
rm -rf tmp/boot tmp/lib tmp/usr
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/