# also bump pve-kernel-meta if either of MAJ.MIN, PATCHLEVEL or KREL change
-KERNEL_MAJ=4
-KERNEL_MIN=15
-KERNEL_PATCHLEVEL=18
+KERNEL_MAJ=5
+KERNEL_MIN=4
+KERNEL_PATCHLEVEL=44
# increment KREL if the ABI changes (abicheck target in debian/rules)
# rebuild packages with new KREL and run 'make abiupdate'
-KREL=10
+KREL=1
-PKGREL=31
+PKGREL=1
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
SKIPABI=0
-ifeq ($(CC), cc)
-GCC=gcc
-else
-GCC=$(CC)
-endif
-
BUILD_DIR=build
-KERNEL_SRC=ubuntu-bionic
+KERNEL_SRC=ubuntu-focal
KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
-E1000EDIR=e1000e-3.4.1.1
-E1000ESRC=${E1000EDIR}.tar.gz
-
-IGBDIR=igb-5.3.5.18
-IGBSRC=${IGBDIR}.tar.gz
-
ZFSONLINUX_SUBMODULE=submodules/zfsonlinux
-SPLDIR=pkg-spl
-SPLSRC=${ZFSONLINUX_SUBMODULE}/spl-debian
ZFSDIR=pkg-zfs
-ZFSSRC=${ZFSONLINUX_SUBMODULE}/zfs-debian
MODULES=modules
-MODULE_DIRS=${E1000EDIR} ${IGBDIR} ${SPLDIR} ${ZFSDIR}
+MODULE_DIRS=${ZFSDIR}
# exported to debian/rules via debian/rules.d/dirs.mk
-DIRS=KERNEL_SRC E1000EDIR IGBDIR SPLDIR ZFSDIR MODULES
+DIRS=KERNEL_SRC ZFSDIR MODULES
DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
HDR_DEB=${HDRPACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
DEBS=${DST_DEB} ${HDR_DEB} ${LINUX_TOOLS_DEB}
-all: check_gcc deb
+all: deb
deb: ${DEBS}
-check_gcc:
- $(GCC) --version|grep "6\.3" || false
- @$(GCC) -Werror -mindirect-branch=thunk-extern -mindirect-branch-register -c -x c /dev/null -o check_gcc.o \
- || ( rm -f check_gcc.o; \
- echo "Please install gcc-6 packages with indirect thunk / RETPOLINE support"; \
- false)
- @rm -f check_gcc.o
-
${LINUX_TOOLS_DEB} ${HDR_DEB}: ${DST_DEB}
${DST_DEB}: ${BUILD_DIR}.prepared
cd ${BUILD_DIR}; dpkg-buildpackage --jobs=auto -b -uc -us
cp ${KERNEL_CFG_ORG} ${BUILD_DIR}/${KERNEL_SRC}/.config
sed -i ${BUILD_DIR}/${KERNEL_SRC}/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=${EXTRAVERSION}/'
rm -rf ${BUILD_DIR}/${KERNEL_SRC}/debian ${BUILD_DIR}/${KERNEL_SRC}/debian.master
- cd ${BUILD_DIR}/${KERNEL_SRC}; for patch in ../../patches/kernel/*.patch; do echo "applying patch '$$patch'" && patch -p1 < $${patch}; done
+ set -e; cd ${BUILD_DIR}/${KERNEL_SRC}; for patch in ../../patches/kernel/*.patch; do echo "applying patch '$$patch'" && patch -p1 < $${patch}; done
touch $@
${MODULES}.prepared: $(addsuffix .prepared,${MODULE_DIRS})
touch $@
-${E1000EDIR}.prepared: ${E1000ESRC}
- rm -rf ${BUILD_DIR}/${MODULES}/${E1000EDIR} $@
- mkdir -p ${BUILD_DIR}/${MODULES}/${E1000EDIR}
- tar --strip-components=1 -C ${BUILD_DIR}/${MODULES}/${E1000EDIR} -xf ${E1000ESRC}
- cd ${BUILD_DIR}/${MODULES}/${E1000EDIR}; patch -p1 < ../../../patches/intel/intel-module-gcc6-compat.patch
- cd ${BUILD_DIR}/${MODULES}/${E1000EDIR}; patch -p1 < ../../../patches/intel/e1000e/e1000e_4.10_max-mtu.patch
- cd ${BUILD_DIR}/${MODULES}/${E1000EDIR}; patch -p1 < ../../../patches/intel/e1000e/e1000e_4.15-new-timer.patch
- touch $@
-
-${IGBDIR}.prepared: ${IGBSRC}
- rm -rf ${BUILD_DIR}/${MODULES}/${IGBDIR} $@
- mkdir -p ${BUILD_DIR}/${MODULES}/${IGBDIR}
- tar --strip-components=1 -C ${BUILD_DIR}/${MODULES}/${IGBDIR} -xf ${IGBSRC}
- cd ${BUILD_DIR}/${MODULES}/${IGBDIR}; patch -p1 < ../../../patches/intel/igb/igb_4.15_mtu.patch
- touch $@
-
-$(SPLDIR).prepared: ${SPLSRC}
- rm -rf ${BUILD_DIR}/${MODULES}/${SPLDIR} $@
- mkdir -p ${BUILD_DIR}/${MODULES}/${SPLDIR}
- cp -a ${SPLSRC}/* ${BUILD_DIR}/${MODULES}/${SPLDIR}
- cd ${BUILD_DIR}/${MODULES}/${SPLDIR}; for patch in ../../../${SPLSRC}/../spl-patches/*.patch; do patch -p1 < $${patch}; done
- touch $@
-
-$(ZFSDIR).prepared: ${ZFSSRC}
- rm -rf ${BUILD_DIR}/${MODULES}/${ZFSDIR} $@
- mkdir -p ${BUILD_DIR}/${MODULES}/${ZFSDIR}
- cp -a ${ZFSSRC}/* ${BUILD_DIR}/${MODULES}/${ZFSDIR}
- cd ${BUILD_DIR}/${MODULES}/${ZFSDIR}; for patch in ../../../${ZFSSRC}/../zfs-patches/*.patch; do patch -p1 < $${patch}; done
- touch $@
+${ZFSDIR}.prepared: ${ZFSONLINUX_SUBMODULE}
+ rm -rf ${BUILD_DIR}/${MODULES}/${ZFSDIR} ${BUILD_DIR}/${MODULES}/tmp $@
+ mkdir -p ${BUILD_DIR}/${MODULES}/tmp
+ cp -a ${ZFSONLINUX_SUBMODULE}/* ${BUILD_DIR}/${MODULES}/tmp
+ cd ${BUILD_DIR}/${MODULES}/tmp; make kernel
+ 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 stretch --arch ${ARCH}
+ tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster --arch ${ARCH}
.PHONY: distclean
distclean: clean
.PHONY: update_modules
update_modules: submodule
git submodule foreach 'git pull --ff-only origin master'
- cd ${ZFSSRC}; git pull --ff-only origin master
- cd ${SPLSRC}; git pull --ff-only origin master
+ cd ${ZFSONLINUX_SUBMODULE}; git pull --ff-only origin master
# make sure submodules were initialized
.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 ${ZFSONLINUX_SUBMODULE}
- (test -f "${ZFSSRC}/debian/changelog" && test -f "${SPLZRC}/debian/changelog") || (cd ${ZFSONLINUX_SUBMODULE}; git submodule update --init)
+ test -f "${ZFSONLINUX_SUBMODULE}/Makefile" || git submodule update --init --recursive ${ZFSONLINUX_SUBMODULE}
# call after ABI bump with header deb in working directory
.PHONY: abiupdate