]> git.proxmox.com Git - pve-kernel.git/blame - README
buildsys add dbgsym package from linux-tools to DEBS/upload
[pve-kernel.git] / README
CommitLineData
ba2f1a67
FG
1KERNEL SOURCE:
2==============
3
4We currently use the Ubuntu kernel sources, available from:
5
b6512398 6 http://kernel.ubuntu.com/git/ubuntu/ubuntu-hirsute.git/
ba2f1a67
FG
7
8Ubuntu will maintain those kernels till:
9
10 https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
11
12
13Additional/Updated Modules:
14---------------------------
15
ba2f1a67
FG
16- include native OpenZFS filesystem kernel modules for Linux
17
18 * https://github.com/zfsonlinux/
19
20 For licensing questions, see: http://open-zfs.org/wiki/Talk:FAQ
21
ba2f1a67 22
fd921db9
TL
23SUBMODULE
24=========
25
26We track the current upstream repository as submodule. Besides obvious
27advantages over tracking binary tar archives this also has some implications.
28
29For building the submodule directory gets copied into build/ and a few patches
30get applied with the `patch` tool. From a git point-of-view, the copied
31directory remains clean even with extra patches applied since it does not
32contain a .git directory, but a reference to the (still pristine) submodule:
33
b6512398 34$ cat build/ubuntu-hirsute/.git
fd921db9
TL
35
36If you mistakenly cloned the upstream repo as "normal" clone (not via the
37submodule mechanics) this means that you have a real .git directory with its
38independent objects and tracking info when copying for building, thus git
39operates on the copied directory - and "sees" that it was dirtied by `patch`,
40and thus the kernel buildsystem sees this too and will add a '+' to the version
41as a result. This changes the output directories for modules and other build
42artefacts and let's then the build fail on packaging.
43
44So always ensure that you really checked it out as submodule, not as full
45"normal" clone. You can also explicitly set the LOCALVERSION variable to
46undefined with: `export LOCALVERSION= but that should only be done for test
47builds.
48
44403fcc
FG
49RELATED PACKAGES:
50=================
51
52proxmox-ve
53----------
ba2f1a67 54
44403fcc 55top level meta package, depends on current default kernel series meta package.
ba2f1a67 56
44403fcc 57git clone git://git.proxmox.com/git/proxmox-ve.git
ba2f1a67 58
44403fcc
FG
59pve-kernel-meta
60---------------
ba2f1a67 61
44403fcc 62depends on latest kernel and header package within a certain kernel series,
1e99f45b 63e.g., pve-kernel-4.15 / pve-headers-4.15
ba2f1a67 64
44403fcc 65git clone git://git.proxmox.com/git/pve-kernel-meta.git
ba2f1a67 66
44403fcc
FG
67pve-firmware
68------------
ba2f1a67 69
44403fcc 70contains the firmware for all released PVE kernels.
ba2f1a67 71
44403fcc 72git clone git://git.proxmox.com/git/pve-firmware.git
ba2f1a67 73
ba2f1a67 74
44403fcc
FG
75NOTES:
76======
ba2f1a67 77
8b4e1fa9
SI
78ABI versions, package versions and package name:
79------------------------------------------------
80
81We follow debian's versioning w.r.t ABI changes:
82
83https://kernel-team.pages.debian.net/kernel-handbook/ch-versions.html
84https://wiki.debian.org/DebianKernelABIChanges
85
86The debian/rules file has a target comparing the build kernel's ABI against the
87version stored in the repository and indicates when an ABI bump is necessary.
88An ABI bump within one upstream version consists of incrementing the KREL
89variable in the Makefile, rebuilding the packages and running 'make abiupdate'
90(the 'abiupdate' target in 'Makefile' contains the steps for consistently
91updating the repository).
92
ba2f1a67
FG
93Watchdog blacklist
94------------------
95
96By default, all watchdog modules are black-listed because it is totally undefined
97which device is actually used for /dev/watchdog.
98We ship this list in /lib/modprobe.d/blacklist_pve-kernel-<VERSION>.conf
99The user typically edit /etc/modules to enable a specific watchdog device.
100
1a9e23ff
FG
101Debug kernel and modules
102------------------------
103
104In order to build a -dbgsym package containing an unstripped copy of the kernel
105image and modules, enable the 'pkg.pve-kernel.debug' build profile (e.g. by
106exporting DEB_BUILD_PROFILES='pkg.pve-kernel.debug'). The resulting package can
107be used together with 'crash'/'kdump-tools' to debug kernel crashes.
108
109Note: the -dbgsym package is only valid for the pve-kernel packages produced by
110the same build. A kernel/module from a different build will likely not match,
111even if both builds are of the same kernel and package version.
112
ba2f1a67
FG
113Additional information
114----------------------
115
116We use the default configuration provided by Ubuntu, and apply
44403fcc
FG
117the following modifications:
118
043808ec 119NOTE: For the exact and current list see debian/rules (PVE_CONFIG_OPTS)
44403fcc
FG
120
121- enable INTEL_MEI_WDT=m (to allow disabling via patch)
ba2f1a67 122
44403fcc
FG
123- disable CONFIG_SND_PCM_OSS (enabled by default in Ubuntu, not needed)
124
125- switch CONFIG_TRANSPARENT_HUGEPAGE to MADVISE from ALWAYS
ba2f1a67
FG
126
127- enable CONFIG_CEPH_FS=m (request from user)
128
129- enable common CONFIG_BLK_DEV_XXX to avoid hardware detection
0b82622c 130 problems (udev, update-initramfs have serious problems without that)
ba2f1a67
FG
131
132 CONFIG_BLK_DEV_SD=y
133 CONFIG_BLK_DEV_SR=y
134 CONFIG_BLK_DEV_DM=y
135
136- add workaround for Debian bug #807000 (see
137 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807000)
138
139 CONFIG_BLK_DEV_NVME=y
140
141- compile NBD and RBD modules
142 CONFIG_BLK_DEV_NBD=m
143 CONFIG_BLK_DEV_RBD=m
144
043808ec 145- enable IBM JFS file system as module
ba2f1a67 146
043808ec 147 enable it as requested by users (bug #64)
ba2f1a67 148
043808ec 149- enable apple HFS and HFSPLUS as module
ba2f1a67 150
043808ec 151 enable it as requested by users
ba2f1a67
FG
152
153- enable CONFIG_BCACHE=m (requested by user)
154
155- enable CONFIG_BRIDGE=y
156
157 Else we get warnings on boot, that
158 net.bridge.bridge-nf-call-iptables is an unknown key
159
160- enable CONFIG_DEFAULT_SECURITY_APPARMOR
161
162 We need this for lxc
44403fcc 163
ba2f1a67
FG
164- set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
165
166 because if not set, it can give some dynamic memory or cpu frequencies
167 change, and vms can crash (mainly windows guest).
168
169 see http://forum.proxmox.com/threads/18238-Windows-7-x64-VMs-crashing-randomly-during-process-termination?p=93273#post93273
170
171- use 'deadline' as default scheduler
172
173 This is the suggested setting for KVM. We also measure bad fsync
174 performance with ext4 and cfq.
175
176- disable CONFIG_INPUT_EVBUG
177
178 Module evbug is not blacklisted on debian, so we simply disable it
179 to avoid key-event logs (which is a big security problem)
180
44403fcc
FG
181- enable CONFIG_MODVERSIONS (needed for ABI tracking)
182
183- switch default UNWINDER to FRAME_POINTER
ba2f1a67 184
44403fcc 185 the recently introduced ORC_UNWINDER is not 100% stable yet, especially in combination with ZFS
ba2f1a67 186
44403fcc 187- enable CONFIG_PAGE_TABLE_ISOLATION (Meltdown mitigation)