#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-kernel-generic rm -rf $PKG mkdir -p $PKG/boot $PKG/install VERSION=2.6.17.13 ARCH=${ARCH:-s390x} PARCH=${ARCH} if [ "x$ARCH" == "xs390x" ]; then ARCH="s390" fi BUILD=${BUILD:-1} if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi cd $TMP rm -rf kernel-generic-${VERSION} mkdir -p kernel-generic-${VERSION}/usr/src cd kernel-generic-${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 make oldconfig || exit 1 make -j3 image || exit 1 cp -vp arch/s390/boot/image $PKG/boot/image-${VERSION} cp -vp System.map $PKG/boot/System.map-${VERSION} cp -vp $CWD/../kernel-source/s390.default.config \ $PKG/boot/config-${VERSION} cd $PKG/boot rm -f System.map ; ln -s System.map-${VERSION} System.map rm -f image ; ln -s image-${VERSION} image rm -f config ; ln -s config-${VERSION} config cd $PKG cat $CWD/slack-desc.s390 > install/slack-desc makepkg -l y -c y ../kernel-generic-${VERSION}-${PARCH}-${BUILD}.tgz