summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.14.20.ebuild106
2 files changed, 108 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 79705ae1c0ac..e93142ab10ca 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -24,6 +24,8 @@ DIST genpatches-5.14-20.base.tar.xz 634440 BLAKE2B 44ad4acf9c899d22a6f02c722ae18
DIST genpatches-5.14-20.extras.tar.xz 3844 BLAKE2B 26b9e372ce744f8a6af8858edbdfc23be85123ba6de3d273d11ce67be3ba2bad1c4c7611039bfb41796bf49de14bd5c2769cbf49bee4cdc0bf5148d34261cd47 SHA512 c51a656e02e5438d61eddfae64c7b62277e30c9d1f8e1d563f812d484c931c37de5a04c4ed23afabde7c39e3e2844aeb25923e7cefc1a948a6617bd9c72277d3
DIST genpatches-5.14-21.base.tar.xz 862764 BLAKE2B 9ac9818d497117fd980cf21959aaa16eba144b7b48d5f5a5f0ad33062b83a6f1a6f15174a2eff71959e31cde4bc68980bc47378b30e6b1b72b2503e4cd7b62d8 SHA512 483f4a6753d56197ab16f7ff4c793d5cc6413d87e04d848ae48c856fcb05adc1499ea0a4358806198841318497f99b49adfde991df6436b646a0106db28ba4bb
DIST genpatches-5.14-21.extras.tar.xz 3840 BLAKE2B 32c192fb758d1f9c232bddfc125f2fbaf1ae268c204f1fb1c6ca5651e90b95f9a7cfecc746d7a6a54d02ff7ffd7da3b077d60f9830371c391ac5b8d4b415dfb8 SHA512 3c749cd0c4a19a3c7c26eb7e56a444e56170c5de2205085857fe9df23bdd624220a2fb531b5ce8c58b9636fa3430c6036ab860edd3c34c5ff15329abf042e2b0
+DIST genpatches-5.14-22.base.tar.xz 864000 BLAKE2B 0a2ef4aa3504d23bc2ad1047d76d705ef4fb15e15ccfc59f343bb1f817ba98940d9bcf7151cac74cb02db4e946344e43679ecfd848aca65951764ede5288ad59 SHA512 b597484d880cdcb1e8e7450c48cb5ca6a5902109182ac01725be00c264450e7e0d24e54940d3d55084383725398ee05159dc71ce7c152850a57aabbe5c26b1c7
+DIST genpatches-5.14-22.extras.tar.xz 3844 BLAKE2B d8934cf97acf49434a817afbe3260da98f3bf52c3bb93d09e510d5c90b592af25da702cb1d6cb2c4ca463428bb35b7aba248f13ae48c094544460650c0d7da6f SHA512 d33c4adac4ebdc6a122ec60b37b8e8e1b3f8b47bc6808707c4fba9d2c8d89ded193bfe0cb0929c23fd0fc82ea1cf3d11fa739555606e6313712265e84a7cf033
DIST genpatches-5.15-3.base.tar.xz 9472 BLAKE2B 209b41dbff1afc55ce8a56332805019848e52d736b90806cafdf966d73f278f301ec466078b6b17c3d558e976c8ccf950bc802e365b06e412bf4f08434b7a9e8 SHA512 fc489ceea8f768cdfca365fb821e7234e7e3a9e650170e81e182b96754494f840971acd29c0902cd1ff3d192dc059755212d0618118b63cd1b62a822182bddf5
DIST genpatches-5.15-3.extras.tar.xz 3840 BLAKE2B 9fb781e2ac7afd8c56ec3af5d4dc8ba8c1577716b429b04d81cf070debd3f8762933a8388e836007ce4fff0a10be76f97e9707b6f2893f1767e105169b0a3c41 SHA512 93191bce6b2c6d029b1a703b9edc77f8f9567b791a425ad9e4be108747f398083fa9adf0a4dcc92b5b140f60fdf74ed59260ca7bd630837a88bd4645812dc94b
DIST genpatches-5.15-4.base.tar.xz 20904 BLAKE2B 01add5a35e7eb969a41239254c8a5f3a70f7ff2775e2c3b8e6c3fccf756795a11c5645c0382c03f8225a36231671570cb984382355844c080c7607dc4a5901cf SHA512 6482bbe1af3c60b065541f6cfe1eb44e4aa3ef375533397c58372ef68fd418dd1eac21d2505d78950953c833a28fe2a03105b6ee5f7128e4685d7f4f568a596b
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.14.20.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.14.20.ebuild
new file mode 100644
index 000000000000..5a245d29d9d1
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.14.20.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2020-2021 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 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.14.14
+CONFIG_HASH=072218102fd9274725c08fe0686fa387ddf02371
+GENTOO_CONFIG_VER=5.13.4
+
+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 ~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"
+
+src_prepare() {
+ local PATCHES=(
+ # meh, genpatches have no directory
+ "${WORKDIR}"/*.patch
+ )
+ default
+
+ # 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
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ 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
+ kernel-build_merge_configs "${merge_configs[@]}"
+}