#!/bin/bash #DEP:linux_src #NEED:bc NAME=linux CWD=`pwd` PKGTMP=/tmp/pkgtmp mkdir -p $PKGTMP &>/dev/null cd /usr/src/linux || exit 1 make INSTALL_MOD_STRIP=1 bzImage || exit 1 make INSTALL_MOD_STRIP=1 modules || exit 1 make INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$PKGTMP modules_install || exit 1 #bepaal versie nummer VER=`ls $PKGTMP/lib/modules | tail -1` || exit 1 mkdir $PKGTMP/boot cp `find .|grep '/bzImage$'| head -1` $PKGTMP/boot/bzImage.test || exit 1 #nodig voor depmod.pl van busybox: #cp `find .|grep '/System.map$'| head -1` $PKGTMP/boot/System.map || exit 1 #Als je externe modules bakt, bv mISDN, dan ben je Module.symvers nodig. mkdir -p $PKGTMP`echo /usr/src/linux-*` || exit 1 cp Module.symvers $PKGTMP`echo /usr/src/linux-*` || exit 1 #nodig voor onderandere de drv_cciss driver cp Module.symvers $PKGTMP/lib/modules/$VER || exit 1 mkdir -p $PKGTMP/etc/postinst.d cp $CWD/post.linux $PKGTMP/etc/postinst.d || exit 1 chmod +x $PKGTMP/etc/postinst.d/* || exit 1 echo "* kernel package maken" cd "$PKGTMP" || exit 1 makepkg -l y -c n $CWD/$NAME.pkg > /dev/null && echo $VER > $CWD/$NAME.version && arch > $CWD/$NAME.arch