source: npl/kernel/linux_src/linux_src.SlackBuild @ 439f083

Last change on this file since 439f083 was 1ebb340, checked in by Edwin Eefting <edwin@datux.nl>, 4 years ago

kernel 5.10

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