]> git.proxmox.com Git - pve-kernel.git/blobdiff - debian/rules
d/rules: kconfig: keep SYSFB_SIMPLEFB enabled
[pve-kernel.git] / debian / rules
index 7b1b251dd781e13ff86de3d4b932376f83d7c375..1ec1147f5f3b26a9f2dfb9b5a6948d0b40c89772 100755 (executable)
@@ -14,6 +14,7 @@ include debian/rules.d/${DEB_BUILD_ARCH}.mk
 CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
 
 PVE_KERNEL_PKG=pve-kernel-${KVNAME}
+PVE_DEBUG_KERNEL_PKG=pve-kernel-${KVNAME}-dbgsym
 PVE_HEADER_PKG=pve-headers-${KVNAME}
 PVE_USR_HEADER_PKG=pve-kernel-libc-dev
 LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
@@ -34,16 +35,20 @@ PVE_CONFIG_OPTS= \
 -m CONFIG_HFS_FS \
 -m CONFIG_HFSPLUS_FS \
 -e CIFS_SMB_DIRECT \
+-e CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU \
 -e CONFIG_BRIDGE \
 -e CONFIG_BRIDGE_NETFILTER \
 -e CONFIG_BLK_DEV_SD \
 -e CONFIG_BLK_DEV_SR \
 -e CONFIG_BLK_DEV_DM \
--e CONFIG_BLK_DEV_NVME \
+-m CONFIG_BLK_DEV_NVME \
 -e CONFIG_NLS_ISO8859_1 \
 -d CONFIG_INPUT_EVBUG \
 -d CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND \
+-d CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL \
 -e CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE \
+-e CONFIG_SYSFB_SIMPLEFB \
+-e CONFIG_DRM_SIMPLEDRM \
 -d CONFIG_MODULE_SIG \
 -d CONFIG_MEMCG_DISABLED \
 -e CONFIG_MEMCG_SWAP_ENABLED \
@@ -74,6 +79,7 @@ PVE_CONFIG_OPTS= \
 -d CONFIG_UNWINDER_GUESS \
 -e CONFIG_UNWINDER_FRAME_POINTER \
 --set-str CONFIG_SYSTEM_TRUSTED_KEYS ""\
+--set-str CONFIG_SYSTEM_REVOCATION_KEYS ""\
 -d CONFIG_SECURITY_LOCKDOWN_LSM \
 -d CONFIG_SECURITY_LOCKDOWN_LSM_EARLY \
 --set-str CONFIG_LSM yama,integrity,apparmor \
@@ -113,6 +119,9 @@ binary: install
 .config_mark:
        cd ${KERNEL_SRC}; scripts/config ${PVE_CONFIG_OPTS}
        ${MAKE} -C ${KERNEL_SRC} oldconfig
+       # copy to allow building in parallel to kernel/module compilation without interference
+       rm -rf ${KERNEL_SRC_COPY}
+       cp -ar ${KERNEL_SRC} ${KERNEL_SRC_COPY}
        touch $@
 
 .compile_mark: .config_mark
@@ -132,6 +141,20 @@ binary: install
        install -m 644 $(addprefix ${MODULES}/,zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko icp.ko zlua.ko spl.ko zzstd.ko) debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME}/zfs
        # remove firmware
        rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware
+
+ifeq ($(filter pkg.pve-kernel.debug,$(DEB_BUILD_PROFILES)),)
+       echo "'pkg.pve-kernel.debug' build profile disabled, skipping -dbgsym creation"
+else
+       echo "'pkg.pve-kernel.debug' build profile enabled, creating -dbgsym contents"
+       mkdir -p debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}
+       mkdir debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot
+       install -m 644 ${KERNEL_SRC}/vmlinux debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot/vmlinux-${KVNAME}
+       cp -r debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME} debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/
+       rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/source
+       rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/build
+       rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/modules.*
+endif
+
        # strip debug info
        find debian/${PVE_KERNEL_PKG}/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done
        # finalize
@@ -146,7 +169,7 @@ binary: install
        touch $@
 
 .tools_compile_mark: .compile_mark
-       ${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7
+       ${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python3
        echo "checking GPL-2 only perf binary for library linkage with incompatible licenses.."
        ! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibbfd'
        ! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibcrypto'
@@ -168,9 +191,6 @@ binary: install
        rm -rf debian/${PVE_HEADER_PKG}
        mkdir -p debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
        install -m 0644 ${KERNEL_SRC}/.config debian/${PVE_HEADER_PKG}/usr/src/linux-headers-${KVNAME}
-       # copy to allow building in parallel to kernel/module compilation without interference
-       rm -rf ${KERNEL_SRC_COPY}
-       cp -ar ${KERNEL_SRC} ${KERNEL_SRC_COPY}
        make -C ${KERNEL_SRC_COPY} mrproper
        cd ${KERNEL_SRC_COPY}; find . -path './debian/*' -prune \
            -o -path './include/*' -prune \