Introduce pve-edge-kernel package
This change adds a Debian package for customized Proxmox kernels.
This commit is contained in:
parent
1f8e25b6af
commit
2b91eaf97f
7 changed files with 43 additions and 2005 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -1,6 +1,6 @@
|
|||
[submodule "submodules/zfsonlinux"]
|
||||
path = submodules/zfsonlinux
|
||||
url = ../zfsonlinux
|
||||
url = git://git.proxmox.com/git/zfsonlinux.git
|
||||
[submodule "submodules/ubuntu-focal"]
|
||||
path = submodules/ubuntu-focal
|
||||
url = ../mirror_ubuntu-focal-kernel
|
||||
url = git://git.proxmox.com/git/mirror_ubuntu-focal-kernel.git
|
||||
|
|
29
Makefile
29
Makefile
|
@ -11,10 +11,23 @@ PKGREL=1
|
|||
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
|
||||
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
|
||||
|
||||
EXTRAVERSION=-${KREL}-pve
|
||||
EXTRAVERSION=-${KREL}
|
||||
|
||||
# Append Linux flavor name to EXTRAVERSION
|
||||
ifdef PVE_BUILD_FLAVOR
|
||||
_ := $(info Using build flavor: ${PVE_BUILD_FLAVOR})
|
||||
EXTRAVERSION:=${EXTRAVERSION}-${PVE_BUILD_FLAVOR}
|
||||
endif
|
||||
|
||||
# Append Linux build type to EXTRAVERSION
|
||||
ifdef PVE_BUILD_TYPE
|
||||
:_ = $(info Using build type: ${PVE_BUILD_TYPE})
|
||||
EXTRAVERSION:=${EXTRAVERSION}-${PVE_BUILD_TYPE}
|
||||
endif
|
||||
|
||||
KVNAME=${KERNEL_VER}${EXTRAVERSION}
|
||||
PACKAGE=pve-kernel-${KVNAME}
|
||||
HDRPACKAGE=pve-headers-${KVNAME}
|
||||
PACKAGE=pve-edge-kernel-${KVNAME}
|
||||
HDRPACKAGE=pve-edge-headers-${KVNAME}
|
||||
|
||||
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
|
||||
|
@ -35,7 +48,7 @@ KERNEL_SRC=ubuntu-focal
|
|||
KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
|
||||
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
|
||||
|
||||
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux
|
||||
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux/
|
||||
ZFSDIR=pkg-zfs
|
||||
|
||||
MODULES=modules
|
||||
|
@ -70,7 +83,7 @@ debian.prepared: debian
|
|||
rm -rf ${BUILD_DIR}/debian
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cp -a debian ${BUILD_DIR}/debian
|
||||
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
|
||||
echo "git clone git@github.com:fabianishere/pve-kernel-edge.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
|
||||
@$(foreach dir, ${DIRS},echo "${dir}=${${dir}}" >> ${BUILD_DIR}/debian/rules.d/env.mk;)
|
||||
echo "KVNAME=${KVNAME}" >> ${BUILD_DIR}/debian/rules.d/env.mk
|
||||
echo "KERNEL_MAJMIN=${KERNEL_MAJMIN}" >> ${BUILD_DIR}/debian/rules.d/env.mk
|
||||
|
@ -100,10 +113,6 @@ ${ZFSDIR}.prepared: ${ZFSONLINUX_SUBMODULE}
|
|||
rm -rf ${BUILD_DIR}/${MODULES}/tmp
|
||||
touch ${ZFSDIR}.prepared
|
||||
|
||||
.PHONY: upload
|
||||
upload: ${DEBS}
|
||||
tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster --arch ${ARCH}
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
git submodule deinit --all
|
||||
|
@ -115,7 +124,7 @@ update_modules: submodule
|
|||
cd ${ZFSONLINUX_SUBMODULE}; git pull --ff-only origin master
|
||||
|
||||
# make sure submodules were initialized
|
||||
.PHONY: submodule
|
||||
PHONY: submodule
|
||||
submodule:
|
||||
test -f "${KERNEL_SRC_SUBMODULE}/README" || git submodule update --init ${KERNEL_SRC_SUBMODULE}
|
||||
test -f "${ZFSONLINUX_SUBMODULE}/Makefile" || git submodule update --init --recursive ${ZFSONLINUX_SUBMODULE}
|
||||
|
|
175
README
175
README
|
@ -1,175 +0,0 @@
|
|||
KERNEL SOURCE:
|
||||
==============
|
||||
|
||||
We currently use the Ubuntu kernel sources, available from:
|
||||
|
||||
http://kernel.ubuntu.com/git/ubuntu/ubuntu-eoan.git/
|
||||
|
||||
Ubuntu will maintain those kernels till:
|
||||
|
||||
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
|
||||
|
||||
|
||||
Additional/Updated Modules:
|
||||
---------------------------
|
||||
|
||||
- include native OpenZFS filesystem kernel modules for Linux
|
||||
|
||||
* https://github.com/zfsonlinux/
|
||||
|
||||
For licensing questions, see: http://open-zfs.org/wiki/Talk:FAQ
|
||||
|
||||
|
||||
SUBMODULE
|
||||
=========
|
||||
|
||||
We track the current upstream repository as submodule. Besides obvious
|
||||
advantages over tracking binary tar archives this also has some implications.
|
||||
|
||||
For building the submodule directory gets copied into build/ and a few patches
|
||||
get applied with the `patch` tool. From a git point-of-view, the copied
|
||||
directory remains clean even with extra patches applied since it does not
|
||||
contain a .git directory, but a reference to the (still pristine) submodule:
|
||||
|
||||
$ cat build/ubuntu-bionic/.git
|
||||
|
||||
If you mistakenly cloned the upstream repo as "normal" clone (not via the
|
||||
submodule mechanics) this means that you have a real .git directory with its
|
||||
independent objects and tracking info when copying for building, thus git
|
||||
operates on the copied directory - and "sees" that it was dirtied by `patch`,
|
||||
and thus the kernel buildsystem sees this too and will add a '+' to the version
|
||||
as a result. This changes the output directories for modules and other build
|
||||
artefacts and let's then the build fail on packaging.
|
||||
|
||||
So always ensure that you really checked it out as submodule, not as full
|
||||
"normal" clone. You can also explicitly set the LOCALVERSION variable to
|
||||
undefined with: `export LOCALVERSION= but that should only be done for test
|
||||
builds.
|
||||
|
||||
RELATED PACKAGES:
|
||||
=================
|
||||
|
||||
proxmox-ve
|
||||
----------
|
||||
|
||||
top level meta package, depends on current default kernel series meta package.
|
||||
|
||||
git clone git://git.proxmox.com/git/proxmox-ve.git
|
||||
|
||||
pve-kernel-meta
|
||||
---------------
|
||||
|
||||
depends on latest kernel and header package within a certain kernel series,
|
||||
e.g., pve-kernel-4.15 / pve-headers-4.15
|
||||
|
||||
git clone git://git.proxmox.com/git/pve-kernel-meta.git
|
||||
|
||||
pve-firmware
|
||||
------------
|
||||
|
||||
contains the firmware for all released PVE kernels.
|
||||
|
||||
git clone git://git.proxmox.com/git/pve-firmware.git
|
||||
|
||||
|
||||
NOTES:
|
||||
======
|
||||
|
||||
ABI versions, package versions and package name:
|
||||
------------------------------------------------
|
||||
|
||||
We follow debian's versioning w.r.t ABI changes:
|
||||
|
||||
https://kernel-team.pages.debian.net/kernel-handbook/ch-versions.html
|
||||
https://wiki.debian.org/DebianKernelABIChanges
|
||||
|
||||
The debian/rules file has a target comparing the build kernel's ABI against the
|
||||
version stored in the repository and indicates when an ABI bump is necessary.
|
||||
An ABI bump within one upstream version consists of incrementing the KREL
|
||||
variable in the Makefile, rebuilding the packages and running 'make abiupdate'
|
||||
(the 'abiupdate' target in 'Makefile' contains the steps for consistently
|
||||
updating the repository).
|
||||
|
||||
Watchdog blacklist
|
||||
------------------
|
||||
|
||||
By default, all watchdog modules are black-listed because it is totally undefined
|
||||
which device is actually used for /dev/watchdog.
|
||||
We ship this list in /lib/modprobe.d/blacklist_pve-kernel-<VERSION>.conf
|
||||
The user typically edit /etc/modules to enable a specific watchdog device.
|
||||
|
||||
Additional information
|
||||
----------------------
|
||||
|
||||
We use the default configuration provided by Ubuntu, and apply
|
||||
the following modifications:
|
||||
|
||||
NOTE: For the exact and current list see debian/rules (PVE_CONFIG_OPTS)
|
||||
|
||||
- enable INTEL_MEI_WDT=m (to allow disabling via patch)
|
||||
|
||||
- disable CONFIG_SND_PCM_OSS (enabled by default in Ubuntu, not needed)
|
||||
|
||||
- switch CONFIG_TRANSPARENT_HUGEPAGE to MADVISE from ALWAYS
|
||||
|
||||
- enable CONFIG_CEPH_FS=m (request from user)
|
||||
|
||||
- enable common CONFIG_BLK_DEV_XXX to avoid hardware detection
|
||||
problems (udev, update-initramfs have serious problems without that)
|
||||
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
|
||||
- add workaround for Debian bug #807000 (see
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807000)
|
||||
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
|
||||
- compile NBD and RBD modules
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
|
||||
- enable IBM JFS file system as module
|
||||
|
||||
enable it as requested by users (bug #64)
|
||||
|
||||
- enable apple HFS and HFSPLUS as module
|
||||
|
||||
enable it as requested by users
|
||||
|
||||
- enable CONFIG_BCACHE=m (requested by user)
|
||||
|
||||
- enable CONFIG_BRIDGE=y
|
||||
|
||||
Else we get warnings on boot, that
|
||||
net.bridge.bridge-nf-call-iptables is an unknown key
|
||||
|
||||
- enable CONFIG_DEFAULT_SECURITY_APPARMOR
|
||||
|
||||
We need this for lxc
|
||||
|
||||
- set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
|
||||
because if not set, it can give some dynamic memory or cpu frequencies
|
||||
change, and vms can crash (mainly windows guest).
|
||||
|
||||
see http://forum.proxmox.com/threads/18238-Windows-7-x64-VMs-crashing-randomly-during-process-termination?p=93273#post93273
|
||||
|
||||
- use 'deadline' as default scheduler
|
||||
|
||||
This is the suggested setting for KVM. We also measure bad fsync
|
||||
performance with ext4 and cfq.
|
||||
|
||||
- disable CONFIG_INPUT_EVBUG
|
||||
|
||||
Module evbug is not blacklisted on debian, so we simply disable it
|
||||
to avoid key-event logs (which is a big security problem)
|
||||
|
||||
- enable CONFIG_MODVERSIONS (needed for ABI tracking)
|
||||
|
||||
- switch default UNWINDER to FRAME_POINTER
|
||||
|
||||
the recently introduced ORC_UNWINDER is not 100% stable yet, especially in combination with ZFS
|
||||
|
||||
- enable CONFIG_PAGE_TABLE_ISOLATION (Meltdown mitigation)
|
1804
debian/changelog
vendored
1804
debian/changelog
vendored
File diff suppressed because it is too large
Load diff
16
debian/control.in
vendored
16
debian/control.in
vendored
|
@ -1,7 +1,7 @@
|
|||
Source: pve-kernel
|
||||
Source: pve-edge-kernel
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||
Maintainer: Fabian Mastenbroek <mail.fabianm@gmail.com>
|
||||
Build-Depends: asciidoc-base,
|
||||
automake,
|
||||
bc,
|
||||
|
@ -25,16 +25,16 @@ Build-Depends: asciidoc-base,
|
|||
lintian,
|
||||
lz4,
|
||||
perl-modules,
|
||||
python-minimal,
|
||||
python2-minimal,
|
||||
rsync,
|
||||
sed,
|
||||
sphinx-common,
|
||||
tar,
|
||||
xmlto,
|
||||
zlib1g-dev,
|
||||
Build-Conflicts: pve-headers-@KVNAME@,
|
||||
Vcs-Git: git://git.proxmox.com/git/pve-kernel
|
||||
Vcs-Browser: https://git.proxmox.com/?p=pve-kernel.git
|
||||
Build-Conflicts: pve-edge-headers-@KVNAME@,
|
||||
Vcs-Git: git://github.com/fabianishere/pve-edge-kernel.git
|
||||
Vcs-Browser: https://github.com/fabianishere/pve-edge-kernel
|
||||
|
||||
Package: linux-tools-@KVMAJMIN@
|
||||
Architecture: any
|
||||
|
@ -47,7 +47,7 @@ Description: Linux kernel version specific tools for version @KVMAJMIN@
|
|||
This package provides the architecture dependent parts for kernel
|
||||
version locked tools (such as perf and x86_energy_perf_policy)
|
||||
|
||||
Package: pve-headers-@KVNAME@
|
||||
Package: pve-edge-headers-@KVNAME@
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
|
@ -57,7 +57,7 @@ Depends: coreutils | fileutils (>= 4.0),
|
|||
Description: The Proxmox PVE Kernel Headers
|
||||
This package contains the linux kernel headers
|
||||
|
||||
Package: pve-kernel-@KVNAME@
|
||||
Package: pve-edge-kernel-@KVNAME@
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
|
|
18
debian/rules
vendored
18
debian/rules
vendored
|
@ -13,11 +13,14 @@ include debian/rules.d/${DEB_BUILD_ARCH}.mk
|
|||
|
||||
CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
|
||||
|
||||
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
|
||||
PVE_HEADER_PKG=pve-headers-${KVNAME}
|
||||
PVE_KERNEL_PKG=pve-edge-kernel-${KVNAME}
|
||||
PVE_HEADER_PKG=pve-edge-headers-${KVNAME}
|
||||
LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
|
||||
KERNEL_SRC_COPY=${KERNEL_SRC}_tmp
|
||||
|
||||
# If no custom compiler is specified, use the default
|
||||
PVE_BUILD_CC ?= ${CC}
|
||||
|
||||
# TODO: split for archs, move to files?
|
||||
PVE_CONFIG_OPTS= \
|
||||
-m INTEL_MEI_WDT \
|
||||
|
@ -91,11 +94,11 @@ binary: install
|
|||
|
||||
.config_mark:
|
||||
cd ${KERNEL_SRC}; scripts/config ${PVE_CONFIG_OPTS}
|
||||
${MAKE} -C ${KERNEL_SRC} oldconfig
|
||||
${MAKE} -C ${KERNEL_SRC} CC=${PVE_BUILD_CC} oldconfig
|
||||
touch $@
|
||||
|
||||
.compile_mark: .config_mark
|
||||
${MAKE} -C ${KERNEL_SRC} KBUILD_BUILD_VERSION_TIMESTAMP="PVE ${DEB_VERSION} (${CHANGELOG_DATE})"
|
||||
${MAKE} -C ${KERNEL_SRC} KCFLAGS=${PVE_BUILD_CFLAGS} KBUILD_BUILD_VERSION_TIMESTAMP="${KVNAME} (${CHANGELOG_DATE})"
|
||||
touch $@
|
||||
|
||||
.install_mark: .compile_mark .modules_compile_mark
|
||||
|
@ -217,9 +220,10 @@ fwcheck: fwlist-${KVNAME} fwlist-previous
|
|||
@echo "if this check fails, add fwlist-${KVNAME} to the pve-firmware repository and upload a new firmware package together with the ${KVNAME} kernel"
|
||||
sort fwlist-previous | uniq > fwlist-previous.sorted
|
||||
sort fwlist-${KVNAME} | uniq > fwlist-${KVNAME}.sorted
|
||||
diff -up -N fwlist-previous.sorted fwlist-${KVNAME}.sorted > fwlist.diff
|
||||
rm fwlist.diff fwlist-previous.sorted fwlist-${KVNAME}.sorted
|
||||
@echo "done, no need to rebuild pve-firmware"
|
||||
-diff -up -N fwlist-previous.sorted fwlist-${KVNAME}.sorted > fwlist.diff
|
||||
@test -s fwlist.diff \
|
||||
&& echo "done, no need to rebuild pve-firmware" \
|
||||
|| echo "Please rebuild pve-firmware"
|
||||
|
||||
|
||||
abi-${KVNAME}: .compile_mark
|
||||
|
|
2
debian/scripts/find-firmware.pl
vendored
2
debian/scripts/find-firmware.pl
vendored
|
@ -8,7 +8,7 @@ die "no directory to scan" if !$dir;
|
|||
|
||||
die "no such directory" if ! -d $dir;
|
||||
|
||||
die "strange directory name: $dir" if $dir !~ m|^(.*/)?(5.\d.\d+\-\d+\-pve)(/+)?$|;
|
||||
# die "strange directory name: $dir" if $dir !~ m|^(.*/)?(5.\d.\d+\-\d+\-pve)(/+)?$|;
|
||||
|
||||
my $apiver = $2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue