source: npl/kernel/linux_src/linux_src.SlackBuild @ 929bb42

Last change on this file since 929bb42 was 929bb42, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

trying kernel 5.14

  • Property mode set to 100755
File size: 3.4 KB
RevLine 
[c5c522c]1#!/bin/bash
2#NEED:ncurses_dev
[929bb42]3#DEP:openssl
[c5c522c]4
5NAME=linux_src
6CWD=`pwd`
7PKGTMP=/tmp/pkgtmp
8
9
10################################################################ UNPACK
11echo "* uitpakken kernel"
12mkdir -p $PKGTMP/usr/src &>/dev/null
13cd $PKGTMP/usr/src
14#tar -xzf $CWD/linux-$VER.tar.gz || exit 1
15
16#unpack basic kernel and apply all incremental patches
[929bb42]17tar -xf $CWD/linux-5.14.tar.xz || exit 1
[c5c522c]18cd linux-* || exit 1
19#if you want to create a newer kernel: just download newest patches, and increase patchlevel
[2bd9b8d]20#also increase .major file to trigger rebuilds!
[929bb42]21PATCHLEVEL=12
22VER=5.14.$PATCHLEVEL
[c5c522c]23#bunzip2 $CWD/patch-$VER.bz2 || exit 1
24#gunzip $CWD/patch-$VER.gz || exit 1
25xz -d $CWD/patch-$VER.xz || exit 1
26patch -p1 < $CWD/patch-$VER || exit 1
27cd ..
28mv linux-* linux-$VER #make use the dir-name corresponds to the patched-version
29ln -s linux-$VER linux || exit 1
30cd linux || exit 1
31
32cd $PKGTMP/usr/src/linux || exit 1
33
34
35############################################################### PATCHING
36echo "bootsplash"
37#Nodig voor splashscreen
38#patch -p1 < $CWD/fbsplash-0.9.2-r5-2.6.16.patch || exit 1
39#patch -p1 < $CWD/fbsplash-0.9.2-r5-2.6.18-rc4.patch || exit 1
40#patch -p1 < $CWD/fbsplash-0.9.2-r5-2.6.23-rc2.patch || exit 1
41#fbsplash is hernoemd naar fbcondecor
42#patch -F3 -p1 < $CWD/fbcondecor-0.9.4-2.6.27.patch || exit 1
43#patch -p1 < $CWD/fbcondecor-0.9.6-3.5-rc3.patch || exit 1
44#patch -p1 < $CWD/fbcondecor-3.14b.patch || exit 1
45#patch -F3 -p1 < $CWD/fbcondecor-3.15.patch || exit 1
[6936b89]46#patch  -p1 < $CWD/fbcondecor-3.19.patch || exit 1
47
48#from https://dev.gentoo.org/~mpagano/genpatches/patches-4.9-143.html
[efa4154]49#https://dev.gentoo.org/~mpagano/genpatches/patches-4.14-182.html
[1ebb340]50#patch  -F3 -p1 < $CWD/4200_fbcondecor.patch || exit 1
51#from https://raw.githubusercontent.com/jirka-grunt/fbcondecor/master/fbcondecor-5.10.patch
[929bb42]52#patch   -p1 < $CWD/fbcondecor-5.10.patch || exit 1
[c5c522c]53
54
55echo "IMQ (for traffic shaping)"
56#patch -p1 < $CWD/linux-2.6.27.21-imq-test3.diff || exit 1
57#patch -p1 < $CWD/patch-imqmq-3.3.diff || exit 1
58#patch -p1 -F3 < $CWD/linux-3.13-imq.diff || exit 1
59#patch -p1 -F3 < $CWD/linux-3.13.10_hardened_gentoo.diff || exit 1
[6936b89]60#patch -p1  < $CWD/linux-4.4.5-imq.diff || exit 1
[efa4154]61#patch -p1  < $CWD/linux-4.9-imq.diff || exit 1
62#from https://raw.githubusercontent.com/imq/linuximq/master/kernel/v4.x/linux-4.14-imq.diff
[1ebb340]63#patch -p1  < $CWD/linux-4.14-imq.diff || exit 1
64#from https://raw.githubusercontent.com/imq/linuximq/master/kernel/v5.x/linux-5.9-imq.patch
[929bb42]65#patch -p1 < $CWD/linux-5.9-imq.patch || exit 1
[c5c522c]66
67
68################################################################# CONFIGURE
69echo "* kernel configureren"
70cp $CWD/config $PKGTMP/usr/src/linux/.config || exit 1
71cd $PKGTMP/usr/src/linux || exit 1
72
73
74
75#rename extra version, er mogen geen streepjes inkomen ivm syn3 packaging
76sed '/^EXTRAVERSION = /s/-/_/g' Makefile > Makefile.new || exit 1
77mv Makefile.new Makefile || exit 1
78
79
80#configfiles fixen
81#Als deze wat vraagt, gewoon antwoorden en dan de resultaerende .config naar de svn config kopieren!
82make oldconfig  || exit 1
83
84#nodig om version.h en zo te fix0rren
85make prepare || exit 1
86
87#nodig om modules te bakken
88make scripts || exit 1
89
90
91################################################################ PACKAGE
92
93#versie is nu anders omdat kernel gepatched en configged is:
94KVER="`cat include/config/kernel.release`"
95
96echo "* inpakken kernel_src"
97cd $PKGTMP || exit 1
98makepkg -l y -c n $CWD/$NAME.pkg &>/dev/null ||exit 1
99echo $KVER > $CWD/$NAME.version &&
100arch > $CWD/$NAME.arch
101
Note: See TracBrowser for help on using the repository browser.