source: npl/kernel/linux_src/linux_src.SlackBuild @ d337995

Last change on this file since d337995 was 6936b89, checked in by Edwin Eefting <edwin@datux.nl>, 6 years ago

majors kernel upgrade from 4.4.x to 4.9.x

  • Property mode set to 100755
File size: 2.9 KB
RevLine 
[c5c522c]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
[6936b89]16tar -xf $CWD/linux-4.9.tar.xz || exit 1
[c5c522c]17cd linux-* || exit 1
18#if you want to create a newer kernel: just download newest patches, and increase patchlevel
[2bd9b8d]19#also increase .major file to trigger rebuilds!
[6936b89]20PATCHLEVEL=149
21VER=4.9.$PATCHLEVEL
[c5c522c]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
[6936b89]45#patch  -p1 < $CWD/fbcondecor-3.19.patch || exit 1
46
47#from https://dev.gentoo.org/~mpagano/genpatches/patches-4.9-143.html
48patch  -p1 < $CWD/4200_fbcondecor.patch || exit 1
[c5c522c]49
50
51echo "IMQ (for traffic shaping)"
52#patch -p1 < $CWD/linux-2.6.27.21-imq-test3.diff || exit 1
53#patch -p1 < $CWD/patch-imqmq-3.3.diff || exit 1
54#patch -p1 -F3 < $CWD/linux-3.13-imq.diff || exit 1
55#patch -p1 -F3 < $CWD/linux-3.13.10_hardened_gentoo.diff || exit 1
[6936b89]56#patch -p1  < $CWD/linux-4.4.5-imq.diff || exit 1
57patch -p1  < $CWD/linux-4.9-imq.diff || exit 1
[c5c522c]58
59
60################################################################# CONFIGURE
61echo "* kernel configureren"
62cp $CWD/config $PKGTMP/usr/src/linux/.config || exit 1
63cd $PKGTMP/usr/src/linux || exit 1
64
65
66
67#rename extra version, er mogen geen streepjes inkomen ivm syn3 packaging
68sed '/^EXTRAVERSION = /s/-/_/g' Makefile > Makefile.new || exit 1
69mv Makefile.new Makefile || exit 1
70
71
72#configfiles fixen
73#Als deze wat vraagt, gewoon antwoorden en dan de resultaerende .config naar de svn config kopieren!
74make oldconfig  || exit 1
75
76#nodig om version.h en zo te fix0rren
77make prepare || exit 1
78
79#nodig om modules te bakken
80make scripts || exit 1
81
82
83################################################################ PACKAGE
84
85#versie is nu anders omdat kernel gepatched en configged is:
86KVER="`cat include/config/kernel.release`"
87
88echo "* inpakken kernel_src"
89cd $PKGTMP || exit 1
90makepkg -l y -c n $CWD/$NAME.pkg &>/dev/null ||exit 1
91echo $KVER > $CWD/$NAME.version &&
92arch > $CWD/$NAME.arch
93
Note: See TracBrowser for help on using the repository browser.