#!/bin/bash #NEED:ncurses_dev NAME=linux_src CWD=`pwd` PKGTMP=/tmp/pkgtmp ################################################################ UNPACK echo "* uitpakken kernel" mkdir -p $PKGTMP/usr/src &>/dev/null cd $PKGTMP/usr/src #tar -xzf $CWD/linux-$VER.tar.gz || exit 1 #unpack basic kernel and apply all incremental patches tar -xf $CWD/linux-5.10.tar.xz || exit 1 cd linux-* || exit 1 #if you want to create a newer kernel: just download newest patches, and increase patchlevel #also increase .major file to trigger rebuilds! PATCHLEVEL=73 VER=5.10.$PATCHLEVEL #bunzip2 $CWD/patch-$VER.bz2 || exit 1 #gunzip $CWD/patch-$VER.gz || exit 1 xz -d $CWD/patch-$VER.xz || exit 1 patch -p1 < $CWD/patch-$VER || exit 1 cd .. mv linux-* linux-$VER #make use the dir-name corresponds to the patched-version ln -s linux-$VER linux || exit 1 cd linux || exit 1 cd $PKGTMP/usr/src/linux || exit 1 ############################################################### PATCHING echo "bootsplash" #Nodig voor splashscreen #patch -p1 < $CWD/fbsplash-0.9.2-r5-2.6.16.patch || exit 1 #patch -p1 < $CWD/fbsplash-0.9.2-r5-2.6.18-rc4.patch || exit 1 #patch -p1 < $CWD/fbsplash-0.9.2-r5-2.6.23-rc2.patch || exit 1 #fbsplash is hernoemd naar fbcondecor #patch -F3 -p1 < $CWD/fbcondecor-0.9.4-2.6.27.patch || exit 1 #patch -p1 < $CWD/fbcondecor-0.9.6-3.5-rc3.patch || exit 1 #patch -p1 < $CWD/fbcondecor-3.14b.patch || exit 1 #patch -F3 -p1 < $CWD/fbcondecor-3.15.patch || exit 1 #patch -p1 < $CWD/fbcondecor-3.19.patch || exit 1 #from https://dev.gentoo.org/~mpagano/genpatches/patches-4.9-143.html #https://dev.gentoo.org/~mpagano/genpatches/patches-4.14-182.html #patch -F3 -p1 < $CWD/4200_fbcondecor.patch || exit 1 #from https://raw.githubusercontent.com/jirka-grunt/fbcondecor/master/fbcondecor-5.10.patch patch -p1 < $CWD/fbcondecor-5.10.patch || exit 1 echo "IMQ (for traffic shaping)" #patch -p1 < $CWD/linux-2.6.27.21-imq-test3.diff || exit 1 #patch -p1 < $CWD/patch-imqmq-3.3.diff || exit 1 #patch -p1 -F3 < $CWD/linux-3.13-imq.diff || exit 1 #patch -p1 -F3 < $CWD/linux-3.13.10_hardened_gentoo.diff || exit 1 #patch -p1 < $CWD/linux-4.4.5-imq.diff || exit 1 #patch -p1 < $CWD/linux-4.9-imq.diff || exit 1 #from https://raw.githubusercontent.com/imq/linuximq/master/kernel/v4.x/linux-4.14-imq.diff #patch -p1 < $CWD/linux-4.14-imq.diff || exit 1 #from https://raw.githubusercontent.com/imq/linuximq/master/kernel/v5.x/linux-5.9-imq.patch patch -p1 < $CWD/linux-5.9-imq.patch || exit 1 ################################################################# CONFIGURE echo "* kernel configureren" cp $CWD/config $PKGTMP/usr/src/linux/.config || exit 1 cd $PKGTMP/usr/src/linux || exit 1 #rename extra version, er mogen geen streepjes inkomen ivm syn3 packaging sed '/^EXTRAVERSION = /s/-/_/g' Makefile > Makefile.new || exit 1 mv Makefile.new Makefile || exit 1 #configfiles fixen #Als deze wat vraagt, gewoon antwoorden en dan de resultaerende .config naar de svn config kopieren! make oldconfig || exit 1 #nodig om version.h en zo te fix0rren make prepare || exit 1 #nodig om modules te bakken make scripts || exit 1 ################################################################ PACKAGE #versie is nu anders omdat kernel gepatched en configged is: KVER="`cat include/config/kernel.release`" echo "* inpakken kernel_src" cd $PKGTMP || exit 1 makepkg -l y -c n $CWD/$NAME.pkg &>/dev/null ||exit 1 echo $KVER > $CWD/$NAME.version && arch > $CWD/$NAME.arch