/[sysadmin-cookbook]/recepies/lxc/kvm/01-setup/02-build-kvm-kernel.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /recepies/lxc/kvm/01-setup/02-build-kvm-kernel.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 261 - (show annotations)
Sun May 15 00:04:01 2011 UTC (12 years, 11 months ago) by dpavlin
File MIME type: application/x-sh
File size: 996 byte(s)
include all options for blkio cgroup
1 #!/bin/sh -xe
2
3 wget -nc http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/patches.tar.gz
4 tar xvf patches.tar.gz
5
6 wget -nc ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.2.tar.gz
7 tar xvf linux-2.6.38.2.tar.gz
8
9
10 cd linux-2.6.38.2
11
12 ls ../patches/*.patch | xargs -i sh -cx "patch -p1 < {}"
13
14
15 # Start with the default configuration
16 make defconfig
17
18 cat >> .config << EOF
19 # Add /dev/hda for qemu/kvm
20 CONFIG_IDE=y
21 CONFIG_IDE_GD=y
22 CONFIG_IDE_GD_ATA=y
23 CONFIG_BLK_DEV_PIIX=y
24
25 # Switch on all container functionality
26 CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
27 CONFIG_CGROUP_DEVICE=y
28 CONFIG_CGROUP_MEM_RES_CTLR=y
29 CONFIG_CGROUP_PERF=y
30
31 CONFIG_BLK_CGROUP=y
32 CONFIG_DEBUG_BLK_CGROUP=y
33 CONFIG_CFQ_GROUP_IOSCHED=y
34 CONFIG_BLK_DEV_THROTTLING=y
35
36 CONFIG_NET_CLS_CGROUP=y
37
38 # Virtual network devices
39 CONFIG_VETH=y
40 CONFIG_MACVLAN=y
41 CONFIG_VLAN_8021Q=y
42 EOF
43 yes '' | make oldconfig
44
45 # Build kernel (counting CPUS to supply appropriate -j to make)
46
47 CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
48 make -j $CPUS
49

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26