#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-kernel-modules rm -rf $PKG mkdir -p $PKG/boot $PKG/install VERSION=2.6.17.13 ARCH=${ARCH:-s390x} BUILD=${BUILD:-1} if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi cd $TMP rm -rf kernel-modules-${VERSION} mkdir -p kernel-modules-${VERSION}/usr/src cd kernel-modules-${VERSION}/usr/src tar -jxvf $CWD/../linux-${VERSION}.tar.bz2 chown -R root:root . find . -type f -perm 666 | xargs chmod 644 find . -type f -perm 777 | xargs chmod 755 ln -sf linux-${VERSION} linux cd linux-${VERSION} cp $CWD/../kernel-source/s390.default.config .config ARCH=s390 make oldconfig || exit 1 ARCH=s390 make -j3 modules || exit 1 ARCH=s390 make modules_install INSTALL_MOD_PATH=$PKG || exit 1 ( mkdir -p $PKG/etc/rc.d/ cd $PKG/etc/rc.d/ cp $CWD/rc.modules.new . cat $CWD/rc.modules.s390.diff | patch -p0 --verbose ) ( cd $PKG/lib/modules/$VERSION rm -rf build ; ln -s /usr/src/linux-$VERSION build find . -type f -name "*.ko" | xargs gzip -9 ) depmod -a -b $PKG $VERSION cd $PKG cat $CWD/slack-desc > install/slack-desc makepkg -l y -c y ../kernel-modules-${VERSION}-${ARCH}-${BUILD}.tgz