Install this version:
emerge -a =sys-kernel/xanmod-kernel-7.0.12
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =sys-kernel/xanmod-kernel-7.0.12
Or alternatively:
emerge --autounmask-write -a =sys-kernel/xanmod-kernel-7.0.12
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 7.0.12 | 8 | -* ~amd64 |
# Copyright 2022-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
KERNEL_IUSE_GENERIC_UKI=1
KERNEL_IUSE_MODULES_SIGN=1
inherit kernel-build verify-sig
BASE_P=linux-${PV%.*}
PATCH_PV=${PV%_p*}
PATCHSET=linux-gentoo-patches-${PV}
GENTOO_CONFIG_P=gentoo-kernel-config-g19
SHA256SUM_DATE=20260609
XANMOD_VERSION="1"
DESCRIPTION="Linux kernel built with XanMod and Gentoo patches"
HOMEPAGE="https://www.kernel.org/ https://xanmod.org/"
SRC_URI="
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
https://downloads.sourceforge.net/xanmod/patch-${PATCH_PV}-xanmod${XANMOD_VERSION}.xz
https://distfiles.gentoo.org/pub/proj/dist-kernel/patchsets/$(ver_cut 1-2)/${PATCHSET}.tar.xz
https://gitweb.gentoo.org/proj/dist-kernel/gentoo-kernel-config.git/snapshot/${GENTOO_CONFIG_P}.tar.bz2
verify-sig? (
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/sha256sums.asc
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
)
"
S=${WORKDIR}/${BASE_P}
LICENSE="GPL-2"
KEYWORDS="-* ~amd64"
IUSE="debug"
BDEPEND="
debug? ( dev-util/pahole )
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
"
PDEPEND="
>=virtual/dist-kernel-${PV}
"
QA_FLAGS_IGNORED="
usr/src/linux-.*/scripts/gcc-plugins/.*.so
usr/src/linux-.*/vmlinux
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
src_unpack() {
if use verify-sig; then
cd "${DISTDIR}" || die
verify-sig_verify_signed_checksums \
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
sha256 "${BASE_P}.tar.xz"
cd "${WORKDIR}" || die
fi
default
}
src_prepare() {
local patch
eapply "${WORKDIR}"/patch-${PATCH_PV}-xanmod${XANMOD_VERSION}
eapply "${WORKDIR}/${PATCHSET}"
default
# add Gentoo patchset version
local extraversion=${PV#${PATCH_PV}}
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
# prepare the default config
case ${ARCH} in
amd64)
cp "${S}/CONFIGS/x86_64/config" .config || die
;;
*)
die "Unsupported arch ${ARCH}"
;;
esac
rm "${S}/localversion" || die
local myversion="-xanmod${XANMOD_VERSION}-dist"
echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
local dist_conf_path="${WORKDIR}/${GENTOO_CONFIG_P}"
local merge_configs=(
"${T}"/version.config
"${dist_conf_path}"/base.config
"${dist_conf_path}"/6.12+.config
"${FILESDIR}"/x86-64-v1.config-r1 # keep v1 for simplicity, distribution kernels support user modification.
)
use debug || merge_configs+=(
"${dist_conf_path}"/no-debug.config
)
use secureboot && merge_configs+=(
"${dist_conf_path}/secureboot.config"
"${dist_conf_path}/zboot.config"
)
kernel-build_merge_configs "${merge_configs[@]}"
}
Manage flags for this package:
euse -i <flag> -p sys-kernel/xanmod-kernel |
euse -E <flag> -p sys-kernel/xanmod-kernel |
euse -D <flag> -p sys-kernel/xanmod-kernel
debug? ( dev-util/pahole ) verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | gentoo-kernel-config-g19.tar.bz2 | 5610 bytes | https://gitweb.gentoo.org/proj/dist-kernel/gentoo-kernel-config.git/snapshot/gentoo-kernel-config-g19.tar.bz2 |
| DIST | patch-7.0.12-xanmod1.xz | 946292 bytes | https://downloads.sourceforge.net/xanmod/patch-7.0.12-xanmod1.xz |