Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/caitsith-patch/specs/build-debian_wheezy.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 251 - (show annotations) (download) (as text)
Sat Nov 11 11:51:35 2017 UTC (6 years, 5 months ago) by kumaneko
File MIME type: text/x-sh
File size: 2123 byte(s)


1 #! /bin/sh
2 #
3 # This is kernel build script for debian wheezy's 3.2 kernel.
4 #
5
6 die () {
7 echo $1
8 exit 1
9 }
10
11 ABI_VERSION=4
12 ORIGINAL_FLAVOUR=686-pae
13 NEW_FLAVOUR=${ORIGINAL_FLAVOUR}-cs
14 REVISION=`apt-cache show --no-all-versions linux-source-3.2 | awk ' { if ($1 == "Version:") print $2; } '`
15
16 echo "Building "${NEW_FLAVOUR}" from "${ORIGINAL_FLAVOUR}"."
17 export CONCURRENCY_LEVEL=`grep -c '^processor' /proc/cpuinfo` || die "Can't export."
18
19 # Install base packages.
20 apt-get install build-essential kernel-package || die "Can't install packages."
21 sed -i -e 's/maintainer := .*/maintainer := Tetsuo Handa/' -e 's/email := .*/email := penguin-kernel@I-love.SAKURA.ne.jp/' -- /etc/kernel-pkg.conf || die "Can't edit /etc/kernel-pkg.conf ."
22
23 # Download CaitSith patches.
24 mkdir -p ~/rpmbuild/SOURCES/
25 cd ~/rpmbuild/SOURCES/ || die "Can't chdir to ~/rpmbuild/SOURCES/ ."
26 if [ ! -r caitsith-patch-0.2-20171111.tar.gz ]
27 then
28 apt-get -y install wget
29 wget -O caitsith-patch-0.2-20171111.tar.gz 'http://osdn.jp/frs/redir.php?f=/caitsith/66537/caitsith-patch-0.2-20171111.tar.gz' || die "Can't download patch."
30 fi
31
32 # Install kernel source packages.
33 cd /usr/src/ || die "Can't chdir to /usr/src/ ."
34 apt-get install linux-source-3.2 || die "Can't install kernel source."
35
36 rm -fR linux-source-3.2
37 tar -jxf linux-source-3.2.tar.bz2
38
39 # Apply patches and create kernel config.
40 cd linux-source-3.2 || die "Can't chdir to linux-source-3.2/ ."
41 tar -zxf ~/rpmbuild/SOURCES/caitsith-patch-0.2-20171111.tar.gz || die "Can't extract patch."
42 sed -i -e 's/CCSECURITY/CAITSITH/g' -e 's/ccsecurity/caitsith/g' -e 's/ccs_domain_info/cs_domain_info/g' -e 's/ccs_flags/cs_flags/g' patches/ccs-patch-*.diff
43 patch -p1 < patches/ccs-patch-3.2-debian-wheezy.diff || die "Can't apply patch."
44 cat /boot/config-3.2.0-$ABI_VERSION-$ORIGINAL_FLAVOUR config.caitsith > .config || die "Can't create config."
45 sed -i -e 's/SUBLEVEL = .*/SUBLEVEL = 0/' Makefile || die "Can't edit Makefile"
46
47 # Start compilation.
48 make-kpkg --append-to-version -$ABI_VERSION-$NEW_FLAVOUR --initrd --revision $REVISION binary-arch || die "Failed to build kernel package."
49
50 exit 0

Properties

Name Value
svn:executable *

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26