summaryrefslogtreecommitdiff
path: root/sys-kernel/gentoo-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest9
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.10.142.ebuild131
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.15.67.ebuild131
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.19.8.ebuild137
4 files changed, 408 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index c019e9421585..a9d4abb21994 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -4,12 +4,18 @@ DIST genpatches-5.10-149.base.tar.xz 4094572 BLAKE2B 45a25b910fc88f030d97ef58709
DIST genpatches-5.10-149.extras.tar.xz 3868 BLAKE2B 2667cf3c9d447c855b6b6cea4b9100a300077fe74eae84b69fa0a6ee861c787e44e96518bceb93f1c2be83fd8f04251ebfca673dcd9da4ebf2ab98041a3dee4f SHA512 73bda9933661f78482eaa048c1467d1f3acbef606676547d1ef3c64c5ff95475d6d40153a47f247868a2cbf697e5a4d21d58b57b3be6763ef3de869c31b5ede6
DIST genpatches-5.10-150.base.tar.xz 4102688 BLAKE2B 4460fa61263bc1c753f856867b4aa533a5e96be1acabb6c770b97854b90fc54022876dbaacb5acef40be6a257db914efd800f328ff5bc79b2ac3b75aca9c5f4b SHA512 2337973c65408a4c14af7f7e34e17f62b8f0e5191ffa821d17de35364724d01036ed3867a32c2b09fef8edc68769ff04d01bf01f7db2c02a2750e2019d270533
DIST genpatches-5.10-150.extras.tar.xz 3868 BLAKE2B 92e49d3a7830cc36aa27c760453024123fff849dbbea36c983f267144edce15257470937e670e5da5f9b4fb90e659095f8f839faa5e30f8317130ea7c3d2cb4c SHA512 010479e3a3c61e01ecd6dfd7ad38c34d07eb10f424505d4f30004566c3cf7066f0d2668be5d2ee86092297ba347014e3468e1cd53372ce81c73a378cf1a8fc5f
+DIST genpatches-5.10-151.base.tar.xz 4118864 BLAKE2B 2b61b0ba7ba6bf36a35b86c2f3ddeae3fb1f0e6285cf68d828aae4b99c62003727a0dd9c57263fcbc10e39a4cc1fa14a7bd4e00029e1dbc558548c4f1478f19f SHA512 0a8923710df2b03aa71a064df637b5a2e48aeb3e240c416d67054003106918953c6b23f3051971cc8afa9785140cf7b8e02670fde145d86c6e2ab86088aadcc0
+DIST genpatches-5.10-151.extras.tar.xz 3872 BLAKE2B 4d023b4fc664a09f661ae1176d25068a2a693d231ee64058cf68538737e28c6f3a8cb706689bbb39280d2d9e8f15570996e1d258cca5b184a931f2bb1c900a16 SHA512 936d693f98553978bd8c35db3b3d48be639ae039da1d76f8f2cbe5d5bd85944e61046da5e0c6ac7c5a9e10bfa605b5b4ccf02db8a1f8ce886f4010fd85c75791
DIST genpatches-5.15-67.base.tar.xz 2856328 BLAKE2B a92c3afb5e0a6605587744c68b3bec4c63848e0c09469d99080258d97d3e96a0adae175600d7dbb00e566f4383ab00c6981585acf343111218aa21e503901f7d SHA512 3d100c04ce9e440177ff2156b8ce0c0443414963a47fc1c51a86a08cce998ad0b6289e70455ecd2965009226036486c1b6ee3768b1782aaad976cd144f9b48cb
DIST genpatches-5.15-67.extras.tar.xz 3936 BLAKE2B 168a92a9db40e6014864a96aff71fb87b351d7127c5eedc8e062e753ae65d7ebc628e9b0eded328f17e88562592d80522ccdd31a549c8104aee51e2833f81134 SHA512 0f2bdfa87ec2a610870089c903b301dc86dac52f4969386074a439be90674c4835800cf9250d8844b1ec3df88cc8dc0b31e4582ea309b7c817066a1341c692b2
DIST genpatches-5.15-68.base.tar.xz 2897744 BLAKE2B e1aebd74737e787df999aabb0153b7aab4b5df05d049e9a6260a3bacf8e827b4f767fe6fe8d07bea71a0e5ee7655d864da67736c17756ec1119a66fc58a4b82a SHA512 79996709882f76cae25639f273f2829d5ae671714f699008d7fbed68595e7cdd93e9d79c801e9f1eaf6ea89fbfe9df3302773e6f728f8cb5de4bd69b36fea65d
DIST genpatches-5.15-68.extras.tar.xz 3932 BLAKE2B 34fd77b8464322ad369de5b86dd8dc83ce7510bca139d4e6036b0b2ab34d1c80698b5f965e44a09dd25ee3b4d80abbccc5920e7984803be2451281c74ff735ea SHA512 970a1e5a03f786d05bb1ae9217a467442f16344fffcf2c77a2572c6db656b0fcd5b3329eae193999c47bbb45c8b02f0fd9010760ef74a6aacc474729f0ee9369
DIST genpatches-5.15-69.base.tar.xz 2924208 BLAKE2B fc4f14592624fe2516c917425c04eaeb7e45073fb77e5830fefee93e3d25c448c8a523862ae89cab99220599c7ab5992d03cb5f81354236f77bc2e21ee802fe9 SHA512 ebfcc2c23304a6b316ecf226fab1200cedc7893093c99ca50cca4c1ad393dc5abcaaa0f2d4789909425a8eae2ebf57d4651f95eddfe40ac39522c95de59961d9
DIST genpatches-5.15-69.extras.tar.xz 3932 BLAKE2B 03a0b738dd90047356abd306bcdee18e7468d111dcff28cfe4bc39c7328d146c69178b1fdd19cef92c0076ad981e845f2ad37778a0907bcf0fa572011d747b08 SHA512 bf29f35d834d6113b68a3ab0a2c2ab2b241c2fa13e47f59669d23a6510cbfb29d24f5947582b2c24f2e4e3170e798d6d0a4171c47973399431a32b76a770488a
+DIST genpatches-5.15-71.base.tar.xz 2956404 BLAKE2B 20b54274b121a6e15d8960cc62e63e822db1d5fcf3a3e2f3810b70026015b405af6c5840702e418a13da2a712653f06a3f5d8af3de2157e40f1b41c8e0299a44 SHA512 ca2e20c2b6db7b2d064730650c1645524558d91de787aa947849541f2a6b0d29c919307373b6ab0a62cccaa0bddfed382c7aaf5d4b00620e1ce97d4983ade3c9
+DIST genpatches-5.15-71.extras.tar.xz 3932 BLAKE2B 53ae8469ceaf8524672ef9f7155dc092558135681438ca8dc233dcf99d458a538902ee805d8572b8ec47203966177e3cf199c47ba3ff48ceff7ae1e7844c2707 SHA512 c35adfff42a907787088d7756f77672f321b5311e08c639bf4fefa344517ea5f1d038e50bc3bbac3e321c16ad3b0ee9a35ca96f031820817ebe063b79a98a7fb
+DIST genpatches-5.19-10.base.tar.xz 709064 BLAKE2B 26be5a66afbbcfec3ae5c857cfd20d33ed0c6e0084411205a7a624f6f63132ffc7482328a6dc21e77575008ffd36f63f92ccb8cc3330faf367f843f348f6d5a4 SHA512 4522c43ff92ba2a8709305f06f520c1b182ebfc8bee54f17769944b5ffe6d53dbb54499ac0dc66cc021a776102933f521dbd3b0918413f97c674f2f7055055a1
+DIST genpatches-5.19-10.extras.tar.xz 3804 BLAKE2B 9f00a275e39e2f0566848c4f548e2ef338812e470056a7f07697ec4489d9cad0d065916778b04c08f00589ba3ad9b9933fa5d4e46fc694f394d441cfd2863b3c SHA512 fc590ff0a2d34eefb6204ed69aaad56ddd7c5d6d856b47fdca20510e08196303cdf440d78af77d9fe596fefd90402f961ebdaf9ae8466171db844d081dfa4ae6
DIST genpatches-5.19-8.base.tar.xz 643396 BLAKE2B c383c7efc908fa3e8ebdfb750d92df6adfa1e0d00f253eae40fb5db5b84f8848a5c1a4fdcda693da998b1ba9d1afb1019cbc2574ceff2b099d2125ead515efc3 SHA512 ebd5eaaefbd362d85fa8cb95b0ca4192bf7a0835ec58ea25def13e502f87f74bcc29219083f39b85462b262f526f771270b5a8d93ff49126e1653d948a9ccb9d
DIST genpatches-5.19-8.extras.tar.xz 3808 BLAKE2B 8cad0dd5deaca8f8b379c96cfad02add0cfe7498f17e84d11e6b809e366ae0476734bd003b287456459febe2ff4c1fa7b3e54c47243cd571a34ffb1cd927a1ea SHA512 a183d09ba7b1fc3f89b7754709df8d093ba70b09f71e237844214d65bc5821b6328c436c7ef697c30bfd38fc833bd178497190a2e73914a03ec0dfa4cbcdf7f2
DIST genpatches-5.19-9.base.tar.xz 665036 BLAKE2B 0d0f0305b82cf97240237cbde866bccd757a27ef91d23843feaa5d05be9f4d647165ad69b796d21a30bd7d92674b6be873aa529052a41ef8c200ee781a3bcc6a SHA512 e86ae26fdc5e0cedad066be47ac7d162ac7f546f253855394abf5c6da02a1c2ad99ab601fbb54775ab36720ac3e8161c9bd3fce2ddcf1ab451e30bd680ebf33b
@@ -47,11 +53,14 @@ DIST linux-5.4.tar.xz 109441440 BLAKE2B 193bc4a3147e147d5529956164ec4912fad5d5c6
EBUILD gentoo-kernel-5.10.138.ebuild 3598 BLAKE2B 4a1da3787ac4c9e0c0ad98611ae0a18f83b1c53a579fb12068abe2694bca91a6eddadae6cbfe77276bdfa04d2ed9ead45f4d45d06d6f7639b706aaee78cabfaf SHA512 8fd8455fabe8ccd439205ec71e26c4476043f48d02954ffb283f91f9e39ddc70c4cfae55bb064247fa3f9b997b4035e91812ab7faf4a7b56e3c302abb33681f1
EBUILD gentoo-kernel-5.10.140.ebuild 3602 BLAKE2B 352e6cbc7b4c3dd628368308fcd01ecf133d36603a284f0c20d8e65da3e87ef29a7097a5f03c62b8d3aa6db1b5725a079b491abae7d8e0847695ec0dd0218776 SHA512 b5f058e544388a1c99337cd517479ec508f580ac5f107d8a6c39f5e3ee2c19d6953896c7fd654bf7a726a1ac974e8eb7872e4c4a1cf884277a5818cc438647c5
EBUILD gentoo-kernel-5.10.141.ebuild 3602 BLAKE2B 352e6cbc7b4c3dd628368308fcd01ecf133d36603a284f0c20d8e65da3e87ef29a7097a5f03c62b8d3aa6db1b5725a079b491abae7d8e0847695ec0dd0218776 SHA512 b5f058e544388a1c99337cd517479ec508f580ac5f107d8a6c39f5e3ee2c19d6953896c7fd654bf7a726a1ac974e8eb7872e4c4a1cf884277a5818cc438647c5
+EBUILD gentoo-kernel-5.10.142.ebuild 3602 BLAKE2B 352e6cbc7b4c3dd628368308fcd01ecf133d36603a284f0c20d8e65da3e87ef29a7097a5f03c62b8d3aa6db1b5725a079b491abae7d8e0847695ec0dd0218776 SHA512 b5f058e544388a1c99337cd517479ec508f580ac5f107d8a6c39f5e3ee2c19d6953896c7fd654bf7a726a1ac974e8eb7872e4c4a1cf884277a5818cc438647c5
EBUILD gentoo-kernel-5.15.63.ebuild 3595 BLAKE2B 2b3462b56c821dbdd49251a7a539c15b50f4bff830f4e71de25b5b3c62c352a89ff7c7f340ba107446fe7ca00f975d6937ad04852756df9c102037e863636b28 SHA512 56c1a432f946e8bdbdbd0fdec109d39b28cd4cd124a9432af36899a60bbf74d00e401e978ab955d234cd8a50340831240bbc455d6ea5d583c1c937fd986b402c
EBUILD gentoo-kernel-5.15.64.ebuild 3599 BLAKE2B 402de31263f3c4d3ec38d2d5712e5839862840a318182603cd2ce05090b162a4a581deae6ff3416ec62ac6980fe5454e79ac55672db81653052336ada9461cfa SHA512 209ce3b8b6cbff81dc66e3211811599efd954be45ca4a85bcbf311d23a5a55d86bbc6144a7dc1509a9201f5744c3b15583eeef41641b7318e240545778897a51
EBUILD gentoo-kernel-5.15.65.ebuild 3599 BLAKE2B 402de31263f3c4d3ec38d2d5712e5839862840a318182603cd2ce05090b162a4a581deae6ff3416ec62ac6980fe5454e79ac55672db81653052336ada9461cfa SHA512 209ce3b8b6cbff81dc66e3211811599efd954be45ca4a85bcbf311d23a5a55d86bbc6144a7dc1509a9201f5744c3b15583eeef41641b7318e240545778897a51
+EBUILD gentoo-kernel-5.15.67.ebuild 3599 BLAKE2B 402de31263f3c4d3ec38d2d5712e5839862840a318182603cd2ce05090b162a4a581deae6ff3416ec62ac6980fe5454e79ac55672db81653052336ada9461cfa SHA512 209ce3b8b6cbff81dc66e3211811599efd954be45ca4a85bcbf311d23a5a55d86bbc6144a7dc1509a9201f5744c3b15583eeef41641b7318e240545778897a51
EBUILD gentoo-kernel-5.19.6.ebuild 3859 BLAKE2B 2d396f7aef1e473db78636af7485d33e0a9258eead5b2e38612694cd3720decf9eba47a6979f56f784063cc81b232742acc8fde0fd292003d73e77435622849d SHA512 1c923b0b1ecc28ce21f8cdee1c625d28ef0274b7e154d50a4aafea8c25a3718db52377c101f123a44174b34e746ef5c389576fcf7fde4185948ec5c2fa463bca
EBUILD gentoo-kernel-5.19.7.ebuild 3859 BLAKE2B 9fcc734fff4981b3b6f7e9afd63085e1938412f62a5ec6d7925ba421974024ae66619e495d3f7e39a13b58a53394a0af9aa8303f9c3aca622792501b1e1f30bb SHA512 ed7e5b5e027365b915a2c6bb2a57140ce6dcb2d9c08a641116e8542cf1202c419d5b169e3c23edbddffe59a6ea3ea67e86c4dc61bbdfb86a915a322bff6808bc
+EBUILD gentoo-kernel-5.19.8.ebuild 3859 BLAKE2B 9fcc734fff4981b3b6f7e9afd63085e1938412f62a5ec6d7925ba421974024ae66619e495d3f7e39a13b58a53394a0af9aa8303f9c3aca622792501b1e1f30bb SHA512 ed7e5b5e027365b915a2c6bb2a57140ce6dcb2d9c08a641116e8542cf1202c419d5b169e3c23edbddffe59a6ea3ea67e86c4dc61bbdfb86a915a322bff6808bc
EBUILD gentoo-kernel-5.4.211.ebuild 2799 BLAKE2B 207cd00b51009fec32423c53d9c669b1b33ecdbf344ee4f963899370322bb5ecd24e8c12ee82913fa1d0459bcfa0efc85ef219a455ee0930c06e88b9d444c4a0 SHA512 e087902f31cabcedf79fbb741f323857f9627e5060441caf0700325a6d1f1a279611bef5e5fef75db8ff418ec33c3a5a2487b1f4c6eeea5d5edf4ae47f949c38
EBUILD gentoo-kernel-5.4.212.ebuild 2803 BLAKE2B a56ad91f6edabf8645ec65291587ec72114eea6a5ee23b0f068d49aa16ad5d79faa46bba5447fb3a351826c7bb576233d7a1beece9843256ab789ef6afb696a8 SHA512 6f1a85386010497e19047e42eaa8caab33dc40089926732d5d01c826bcf91555fdb01414aaa505a1d33ca5228d903ee32c412c5b93a494815f744d68846c9ab9
MISC metadata.xml 465 BLAKE2B ea1260a1638588a48d9dd776e9eabd9730a181af8416ba778c936fa2e80a2360be146d3cc80599e50e0a72ac709eb9538184aac87cb96528e445ed450e34f4af SHA512 c7b7b1a45fb7082b8d8d66cf5a387cc4f7207cd9488d1d5e1d6900f1e4147aa9290b5522a94d941a885f1599b5df2482b529e40912d2b2cff400ecd4b1704c41
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.142.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.142.ebuild
new file mode 100644
index 000000000000..8cc3f5803876
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.142.ebuild
@@ -0,0 +1,131 @@
+# 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##*.} + 9 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.10.12
+CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530
+GENTOO_CONFIG_VER=g1
+
+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/projg2/gentoo-kernel-config/archive/${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 ~hppa ~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
+"
+
+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)
+ return
+ ;;
+ 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[@]}"
+}
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.67.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.67.ebuild
new file mode 100644
index 000000000000..64c99e19532c
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.67.ebuild
@@ -0,0 +1,131 @@
+# 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##*.} + 4 ))
+CONFIG_VER=5.15.19
+CONFIG_HASH=ec69da7a42b5b7c3da91572ef22097b069ddbd01
+GENTOO_CONFIG_VER=g1
+
+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/projg2/gentoo-kernel-config/archive/${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 ~hppa ~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)
+ return
+ ;;
+ 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[@]}"
+}
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.8.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.8.ebuild
new file mode 100644
index 000000000000..ca4fd4085837
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.8.ebuild
@@ -0,0 +1,137 @@
+# 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 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.19.6-gentoo
+GENTOO_CONFIG_VER=g2
+
+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/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ amd64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug hardened"
+REQUIRED_USE="arm? ( savedconfig )
+ hppa? ( savedconfig )
+ riscv? ( 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)
+ return
+ ;;
+ 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
+ ;;
+ riscv)
+ return
+ ;;
+ 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[@]}"
+}