summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.15.16.ebuild125
2 files changed, 127 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 0a0f80a022e1..7785b86ace82 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -22,6 +22,8 @@ DIST genpatches-5.15-16.base.tar.xz 681884 BLAKE2B 49b0e8eb54e610648cc101eb889ec
DIST genpatches-5.15-16.extras.tar.xz 3852 BLAKE2B 8e4e3c1404ca66fd2e0c5587d08f000fa40a68f11e7717b1ee5b2c74ce28269da0ff0dabe59235ca4d2581e71bf3b642cbf0346101bba1c6ebb4b214cfa452fa SHA512 5ab2818e93612703d5c39e37eb9f7dea773a104280fcb1c09cf643ef24c691c337cf139d2f59060597f3cb4528efc31793bb577e8cae4ea7d6d3a6a4686bc83e
DIST genpatches-5.15-17.base.tar.xz 689440 BLAKE2B 518d67ff7cde6796dd7018ec15e403c094fe029968ff9454cf3595158c1e49215f6df9ed7f7e9fec3e4d4991b32aa0b268699dd4b0da2386167675d48d377776 SHA512 fb9880b15ee392f86e32304f135a46dc10497e7eb61f47c187ab80af5712940e89d50a32b5451669be08ed28a8afb27519cb845d8252ca406e13a187f4296079
DIST genpatches-5.15-17.extras.tar.xz 3856 BLAKE2B f9b45f83358962c168d971bed4c73ff1e2c0aa66174f42744babb1ba549a2134cf299dcd33562d2d7977aff9428019051ecbb212e0f9a687a098ccacd8683d6c SHA512 f0c9fb8d40150d8d5ab801d0eb08fc39654dc97e1d08bc6c32c3624cb717f65b12dc387ca0a0422f25216ccb43a0b07b3cfc0f50b7201581b0a9ab428827b2bd
+DIST genpatches-5.15-18.base.tar.xz 697228 BLAKE2B 01a377a9c1f2709ad2cde18e3094d37ba2414c7c3d949f236d41f5d36e8c4513331c4859740ec34bc8418d6fb2457fbb7d9f7c64f6f596795e1abc9a02c9e340 SHA512 14a652cf64e8e22539a61f14af715fd1a59644875a8a61473b5eb66bcc7b5f4bb34602463b208114bb4dbb73f159932983d48c0567a44b5090b9ff8f52920eaf
+DIST genpatches-5.15-18.extras.tar.xz 3852 BLAKE2B d3521142bf5ece893429ec7e1b6aec724fff15fbba2f80e9fb092af4d40bc258e034226989d2502ee258faa0c7e0aacd885499d22f4317060d61cd916e00e7fa SHA512 f1a98d3875541ec4b8f3461c1af8a9b37fd4f5a64e7d717e906f851bf4e976e4509df4b8cb67b9e210215cc33924d039599cecc8f4892dcbed510e00f8119df8
DIST genpatches-5.4-172.base.tar.xz 4281140 BLAKE2B 438ad10331e709a85f1ee2a8907a982cd545579940431220f763b1f68280d007d344627b0d1cf4406e2a439b76d20497e1f4aa6d103bb5569f119bc5174c545f SHA512 faa28b056e48873b41b78b540afe7db3200020f85f1ae516f7949f3cef453eccae9b6b8631d594ba8b1dc1b4d6b55b1e9c9379c4880eb4697bed956b0217bef4
DIST genpatches-5.4-172.extras.tar.xz 1784 BLAKE2B 9d185d1ff33c56417bf9cfbe33efc6ce4b743a0ab9bdf419dbee14cde34d7c2d6d17884ace56880f75cc28a16b7e18a5e7b87f110c64bc7c84ceb81c7df85831 SHA512 cee6e49804ebc200dd7e308d2a59bfa0e381428caf69678bb6d406357a86398327a354bc2900096f82a77b47beea7fca7e5709cb390fbc1e0b7575c01d062024
DIST genpatches-5.4-173.base.tar.xz 4294304 BLAKE2B 7622b34b82e901d2823f84ef4ccf282a9224dadf5a5248bbdc9b1328aaf476b50df5ea6d359af64507c30623d57a0a61f9205b5d48eb1137a404ef2ca4ec31c4 SHA512 34ce4139ccc9119546a88efb71f46b1172039f536e5072337270ab93b83429b2975a3c9cf4f112f280e62eaf506e62b48f775a4fb772a1a4de8681333be76a02
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.16.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.16.ebuild
new file mode 100644
index 000000000000..03539a92d62e
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.16.ebuild
@@ -0,0 +1,125 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build toolchain-funcs
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 2 ))
+CONFIG_VER=5.15.14
+CONFIG_HASH=8cc461d9cfb256bb831225bb38e29fa944bd890f
+GENTOO_CONFIG_VER=5.15.5
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz
+ https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
+ https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ amd64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="debug hardened"
+REQUIRED_USE="arm? ( savedconfig )"
+
+RDEPEND="
+ !sys-kernel/gentoo-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/pahole )"
+PDEPEND="
+ >=virtual/dist-kernel-${PV}"
+
+QA_FLAGS_IGNORED="
+ usr/src/linux-.*/scripts/gcc-plugins/.*.so
+ usr/src/linux-.*/vmlinux
+ usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
+"
+
+src_prepare() {
+ local PATCHES=(
+ # meh, genpatches have no directory
+ "${WORKDIR}"/*.patch
+ )
+ default
+
+ local biendian=false
+
+ # prepare the default config
+ case ${ARCH} in
+ amd64)
+ cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ arm)
+ return
+ ;;
+ arm64)
+ cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
+ biendian=true
+ ;;
+ hppa)
+ ;;
+ ppc)
+ # assume powermac/powerbook defconfig
+ # we still package.use.force savedconfig
+ cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ biendian=true
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ local myversion="-gentoo-dist"
+ use hardened && myversion+="-hardened"
+ echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
+ local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
+
+ local merge_configs=(
+ "${T}"/version.config
+ "${dist_conf_path}"/base.config
+ )
+ use debug || merge_configs+=(
+ "${dist_conf_path}"/no-debug.config
+ )
+ if use hardened; then
+ merge_configs+=( "${dist_conf_path}"/hardened-base.config )
+
+ tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
+
+ if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
+ merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
+ fi
+ fi
+
+ # this covers ppc64 and aarch64_be only for now
+ if [[ ${biendian} == true && $(tc-endian) == big ]]; then
+ merge_configs+=( "${dist_conf_path}/big-endian.config" )
+ fi
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}