|
@@ -6,17 +6,24 @@ Compile test & install kernel image for vz5's VM.
|
6
|
6
|
Dependencies :
|
7
|
7
|
==============
|
8
|
8
|
|
9
|
|
-- virsh
|
10
|
9
|
- expect
|
|
10
|
+- qemu/kvm
|
11
|
11
|
- `apt build-dep linux-image-amd64`
|
12
|
12
|
- `apt install linux-source`
|
13
|
13
|
|
|
14
|
+Optionnal dependencies :
|
|
15
|
+------------------------
|
|
16
|
+- virsh
|
|
17
|
+- debvm
|
|
18
|
+
|
14
|
19
|
Install & config :
|
15
|
20
|
==================
|
16
|
21
|
|
17
|
22
|
Copy sample config `cp config.mk.inc config.mk`
|
18
|
23
|
Edit configuration file to meet your needs `editor config.mk`
|
19
|
24
|
|
|
25
|
+Then you will need kernel sources & kernel configuration.
|
|
26
|
+
|
20
|
27
|
Kernel sources :
|
21
|
28
|
-----------------
|
22
|
29
|
|
|
@@ -45,10 +52,32 @@ git -C kernel-config commit -m 'Initial kernel config'
|
45
|
52
|
Usage :
|
46
|
53
|
=======
|
47
|
54
|
|
|
55
|
+Get current status with `make`
|
|
56
|
+
|
48
|
57
|
Compile a kernel `make kernel`
|
49
|
58
|
|
50
|
59
|
Test a kernel on virsh vm `make test`
|
|
60
|
+ If make test is run with root, we will try to start TEST_VM_NAME with virsh
|
|
61
|
+ If make test is run without privileges, a disk image will be built using debvm
|
|
62
|
+ and the tests will be run using qemu.
|
|
63
|
+ NOTE : the user needs access to /dev/kvm (adduser username kvm)
|
51
|
64
|
|
52
|
65
|
Install kernel `make install`
|
53
|
66
|
|
54
|
67
|
Commit tested kernel config `make commit-config`
|
|
68
|
+
|
|
69
|
+Notes :
|
|
70
|
+=======
|
|
71
|
+
|
|
72
|
+All scripts & tests are designed for monolitic kernel without initrd.
|
|
73
|
+
|
|
74
|
+Kernel config should contains :
|
|
75
|
+```
|
|
76
|
+# CONFIG_BLK_DEV_INITRD=n
|
|
77
|
+# CONFIG_MODULES=n
|
|
78
|
+```
|
|
79
|
+
|
|
80
|
+KVM has a documentation about kernel tuning for guest that can be found here :
|
|
81
|
+https://www.linux-kvm.org/page/Tuning_Kernel#Kernel_for_guest_with_paravirtualization
|
|
82
|
+
|
|
83
|
+The script `scripts/checkconfig.sh` check that kernel config fits basic needs.
|