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.4.234.ebuild103
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-6.1.15.ebuild140
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-6.2.2.ebuild140
4 files changed, 392 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 6b8400ef6161..a4c1bb92f884 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -18,14 +18,20 @@ DIST genpatches-5.4-237.base.tar.xz 5514132 BLAKE2B 90509a99ec10e042915362652369
DIST genpatches-5.4-237.extras.tar.xz 1812 BLAKE2B 5a4e6b9593a9e9f87afd5f06f03fcdec5fb6072c6689f392821a9778e84634da193c8085ee37348adcd7059ab05ec056e9d7dc9fa27ec98c118ba18878baeeb1 SHA512 21f552b05deabff804c841247fa037e71cca35892f8d212cd5c2c0dcf8a43e455a7d4934f59e4182513dc2257a34f5a976823cf6c0f87a5bf3449365ad353769
DIST genpatches-5.4-238.base.tar.xz 5519048 BLAKE2B 9413ae97bb032e51ad570ff2c59ad9527d165563d32a8c9aeb4eea2ff9176115180c0c664f6729ea6aa9b3bfc4968c465636078c2ddf439271f18750ad048ca8 SHA512 d91f42ad1370bcd8bd8f56410abc74b964b123b42a0100c1b4d934d50903d7a4ff4eaa79f02ed85362f0eb3ae6e3e984d1ef85add8f969ca9ddf5c51917cc372
DIST genpatches-5.4-238.extras.tar.xz 1812 BLAKE2B b797329d02faf1f7bcc9bebc5f4b028e581a0c45660f15ff6010b6b8d5b920725c4697e26e8ec22fc94070723fba6e5c6fbe273fbd4a5c5245fc0a8247037e5e SHA512 b4adc55c826f9154f977e329dbacb1c5e92a2dee1d694e9b0d2b63d0ce4e3bc55ad05918678865d7964aa6e437f939e7e07652a5498e9a316f09069daae8487f
+DIST genpatches-5.4-239.base.tar.xz 5520768 BLAKE2B 9023bb6baa304282c516ae3d8ecff8753bc9b4f0f06166a9e5358d19d6c24d41df4aed6df3174071deabfa9e3224a2c11a94a1b04741c844da88e8f2843178ab SHA512 a776e9663e762d61e5646b56d705a82d17459ff657ef0ffa817b380bb62ed4ba8ca1b84dfba5700c9b33e018736f366b335769005004f9ee15645110a5751d41
+DIST genpatches-5.4-239.extras.tar.xz 1812 BLAKE2B f16995331f57d04a5e92164dcb09eab416c56184d9df7546bac597f25614af08053823f3877dcb4ffd54253ad610e9a8c39818290ffde145c3839041ca79fa7e SHA512 c0f6e320892485d8806efc553bef45b9bda7f35bf357af562136d6f10d41c2dcac767595902f2084ddce9ebce9dcc1952e9e72833b79b396dbf398a66017898d
DIST genpatches-6.1-14.base.tar.xz 774040 BLAKE2B 8e0866c762e2711b766cc75630d66c7c46221bdc47357a903c7e8506ad122b7b5ba84d102b19743d236ac5579b44d24f77b9f52f3c23695ab6a279cf7875e735 SHA512 6a753146013baf0b94d83abd690118517679d4d7dcf6e9f86cf8de35e24f80a792e9c0692f237098671c316d046d6f65f8d3512255e572daf6a8ca81853beca0
DIST genpatches-6.1-14.extras.tar.xz 3804 BLAKE2B 7f016579b130c9a4f7a8ec946254dbd682f22e5654ae777d11b265dafe2b177a4c40c5a979a760a5bd6ed3dac057b90a3120c60b958f6b748ea4731b9a5f1ea6 SHA512 2807d359459dd11b9d3356fcac609dbfb8487e8c924cc543ef37698667b1c8b74cff7b015839ca0677cf1f96b566e0b5018c057b517275886ab500cd2ca49653
DIST genpatches-6.1-15.base.tar.xz 803732 BLAKE2B 5f43fb07787e9e861b54b4977acff47c13870b24cba98296538651c656e332be2bd194b91a67d68858bb7ddf116e0e97179c5c039c64b75f4392829d091ee387 SHA512 482cb110c5d218a0b0dd4dd828862d9cfb5044b5c90f75218dd7bbf266dba1a11af11ecd913029904d6de1d572d2cbb247b5bbf1c4bb5711eb9fb03b327aaa81
DIST genpatches-6.1-15.extras.tar.xz 3808 BLAKE2B 8d7a78f6a1e8e6bbacace9cc067b1edd674611f7ba32ced894557cc48018ce708411828dcbbd71f8678f22ebf64c8913fe8c641d29bd46d7146198ebd1240f11 SHA512 0d53e3c9740cfe65b6168c624bcc99cbd16d3e196b50190be8aeeb8bf78d205dbed964e01b151a2ad03c2ad10bb4b74f84deeb4d42db4392fe52c337540e0dc6
DIST genpatches-6.1-16.base.tar.xz 820936 BLAKE2B 91554b3c532c7ba9549291a2a6c3ae531922819d896e4a9e69ef36d09ec8a444d2ba0725af6ff213ea554e6fcc9a20ccf5adce1d8e17a3c4fa9c3174a0a228ca SHA512 7bee9944db4397cdbef1cde6083970c5290d9936a9ec17bd0d6b21ba7186eeaa0bb43703ec0974f5121e6cd424817727e6be3aa5980438dee4b27d9a9ff99456
DIST genpatches-6.1-16.extras.tar.xz 3804 BLAKE2B 72e1824ad6d561359eb287c8f67d94b961c6054a4bbc66af9571caced021d6d3cf64d5d06be4977c22b4c1061b37b5f174db4713040faac069dd9e7b29fa2a6f SHA512 ac2c48ed858be0a2c844646d343de6994f1f8179b0369a6be554f1587369679b651304f967346aa1bf2f462ae62b1c8c0fcb5bca32ec12e2f6100a694aafc6b2
+DIST genpatches-6.1-18.base.tar.xz 833216 BLAKE2B f1b86487c82d4354347171df635192a6276a4d0a9561a415270a85caa46401e4b9089f847346cbf441f8c6a4d4012234d83b31fca5797cc6296010f225392990 SHA512 155207127c1c58b2497788d5b7541ba1872fefea3d2c7804356e5bb6d28dae2f0400dbab44cf39b847f89e7a058710b8528059d75f0e92b63d3d37fd0a515ca8
+DIST genpatches-6.1-18.extras.tar.xz 3804 BLAKE2B f31c07ec6318b91e6e7eabeb62bc28af362fc097297b31521d464e298effbdf52cdb94b43a1811fc10ea3dc9387fa47501c4987d6709d73603ed15ac7949dd92 SHA512 8611f8cd72f54b7c4360d314eabcccfaa99722f568da32710a39f47ffd1770b14502130be5ce3d3a14a0bd93fc9fbb73f65a9c9636a8d0e9051892d1e5221ef7
DIST genpatches-6.2-2.base.tar.xz 9540 BLAKE2B dce2bb1156f0e9a7ca19b618d13729908001939d6ec6361ca6619808a120e61900b5f4de97b2bef0e63aef81a83c7e2a0d736f3c344d9a610eb5c6a21baeb111 SHA512 50aabf4c24dbf13595556314b2ba8f1d0219355bc79c0fddf05ef7a6d244fe3c54f95c733e02fbc032a582495c59688f415af5b62b3401b436cbb5f0ef3aa9ac
DIST genpatches-6.2-2.extras.tar.xz 3804 BLAKE2B cdbf51c28ff1c3b974665f558ec774eb70874a3941b97f966ee90642f3a1c8732333348e891156a40455c8b80c2a2002fdf1515403eca7b8d075c28b09a2ed78 SHA512 cba0fe9b3d13f3b1f6ee413a44698694ef6b009918dfda76e4d8402e66f1e857bf889fd4eb7ae093e864f7015eb3fe14aa704a5a3b68b0b92ca494bfc4b43a71
+DIST genpatches-6.2-4.base.tar.xz 15256 BLAKE2B 4a6bc8f4b75be2afe87d3d29ebdd45cc6a6266717b793a611edcefad3b39c3f70f14533b538eb175f0c16e901006d52e09994072cf9375dc0606db0478472d18 SHA512 0351b19b50bff5922d916b215c8b5b04a31994973dbde9553b2f197009447c9d5dc992f0b9ee25bacdd1569477a0beed4e0359dec390ca4914ceeed3e73592f5
+DIST genpatches-6.2-4.extras.tar.xz 3804 BLAKE2B 909c69169a518c690e62cb3417a35fdcbc1f3102d388ea0f6eb5329753f50596bae769ef033d43bc9d9fc5cbddecc3ca8541f771c4e02c76fad6253594cf5e5b SHA512 c22a12ea1d3467891286d9898582d038026230181537ae40927182b9549e7a768e4ae62ddf9b402e67cd31e18cb64e9f9567c5037eebc98500d4aa21ea62b44d
DIST gentoo-kernel-config-g6.tar.gz 4562 BLAKE2B ad9e1b28f84916f12cd8b21feb2f4396d3d63f4cfae3e6b6fe93f919c98b0b4523b205711ab7acafa7121360f696eecb63b9f162dd12950e56dab1429cc13633 SHA512 d180122eb00d40126ea7d79224559904eb0ea574314f9a8d6be6b10f0f6a49f526eba1366ae8cd0a4fe23cd8ff5e292c8cab7e856a2c915d4162b75a03f8076b
DIST gentoo-kernel-config-g7.tar.gz 4625 BLAKE2B 72ba0d038ee34ca5eb26d43bd373735aef3a50d02b414993ea05485e49d83d46df98a6cb0f6f3170a8ec0c99b557432fd9a11cbb92ff7c2837625a7f4469831e SHA512 2d74a8ca9f5402b4290ed93cd3ddba04a7f2ff42c8d8d3f2cbbe22fc20daa0fca119368daa8af39b7a26b1b99e4e3187c3c5d95886a651675ad94ff98d686628
DIST kernel-aarch64-fedora.config.5.10.12 223184 BLAKE2B a0246dac2f7a4ad6a55b611538d24382ac87a8960077811a859c9595ac67f961b4bccb7e139a89abc7c0e26e80832da5c94211fc658082f2e7dde984f14dd29d SHA512 7d803b347b136331db1ad6e22e0445fe0224c3e26cd7c034cbe9794915d457b492e05f77664865079874ec001351553652646e2e08d0fee31e30b841b0008f52
@@ -63,8 +69,11 @@ EBUILD gentoo-kernel-5.15.96.ebuild 3660 BLAKE2B 9be74faea9e4a9f9460b2b002c3e503
EBUILD gentoo-kernel-5.4.231.ebuild 2860 BLAKE2B d3ce0003d8dc6fb443e53055a786c7fb45881cc6b40fd478cfbbd5bb17fe67fc1e11ee4f8e2598d4baf4832136e61623e5291908d8e1a62a12f7a96a95668ad7 SHA512 a44124e8b224f17f9c60403b9fb5f98e16feb52846bc933f56d027a75d63a126424e94b598212d64a10e923cf1fba626442130a06fda2f61a951676ad8f233c2
EBUILD gentoo-kernel-5.4.232.ebuild 2862 BLAKE2B 183eb2543904e9af875d03d4123644a6e5a77be9204cdbfaecf5e6febeb2a54215f3f451b622cb073fa28cd52f6ea389f823cab17dc9d0a38ba722d7639edb54 SHA512 4368f10a32b2356a5eba9f908d7a2d6f7d085ac06a659b58cac663e6ab5a677b69b119db6146e9dba39f40646ceb4f1f8453687e815a11887c3bb3a737ed5dc6
EBUILD gentoo-kernel-5.4.233.ebuild 2864 BLAKE2B 60a4dc88918721e8fdc979c64138ec081c4da7e01dcb2f89ab24a7b0b24ffc764030ba4b21a0bc04869509bfd6fdda910e0eb31e0b74ab1f3b3b334926de7643 SHA512 b41db6de60eaaf6a8e6b4d930699bf6731f6430b11403660041a439c8f709ed63234c2986f2c82e18f34fa15fe973201871b58f90fea8cf2a96cea81bd354756
+EBUILD gentoo-kernel-5.4.234.ebuild 2864 BLAKE2B 60a4dc88918721e8fdc979c64138ec081c4da7e01dcb2f89ab24a7b0b24ffc764030ba4b21a0bc04869509bfd6fdda910e0eb31e0b74ab1f3b3b334926de7643 SHA512 b41db6de60eaaf6a8e6b4d930699bf6731f6430b11403660041a439c8f709ed63234c2986f2c82e18f34fa15fe973201871b58f90fea8cf2a96cea81bd354756
EBUILD gentoo-kernel-6.1.12.ebuild 3915 BLAKE2B 1fbb00648a4976639ea7bb2876879465fe72675989991e981730657c741565eca29370ca8b3b9ef713840c9c18aa545d300533fb90ab09d659e4ecab0c169907 SHA512 4f17adaaa0da56f6c8a238d36d2b07b384b4ece4fd4aec5193b202524da58ace0821feae5a254bd445a179465374618acad273dfb55df28731bdd37b6c7c95ee
EBUILD gentoo-kernel-6.1.13.ebuild 3917 BLAKE2B 4b98ef355f3bbefc7cf1b715a0875cc3d75031d6717cce18f787fb818ad5be547610b903dba7deb83c11c155f4643ecfdd43621b9218b519e233136dafc04e02 SHA512 937492b4c9e9d3afa2346801d25947f55b164881b59f6d56c41110e67be3d1bc1476a05f71d9cc25533b2ad9c5db50fd51dbc5c5651a1db4f8c33643c276f8dc
EBUILD gentoo-kernel-6.1.14.ebuild 3917 BLAKE2B 4b98ef355f3bbefc7cf1b715a0875cc3d75031d6717cce18f787fb818ad5be547610b903dba7deb83c11c155f4643ecfdd43621b9218b519e233136dafc04e02 SHA512 937492b4c9e9d3afa2346801d25947f55b164881b59f6d56c41110e67be3d1bc1476a05f71d9cc25533b2ad9c5db50fd51dbc5c5651a1db4f8c33643c276f8dc
+EBUILD gentoo-kernel-6.1.15.ebuild 3919 BLAKE2B d0af04f3ff855b263afb00e61e2c03e0bd0e9a6820e246944a5d3cf8a614b13d3795d26e8bbc95f6b73bdc3701a67858eed0baab02d3ad97f81354e01b42858f SHA512 5f4803d5a8776dc5acd0513c532dcf810e0f3d19fafb3e5a4f0a4c35437e4cabf5966df9c9ffdca458be60dfa4cd23a72504d410faf5cffd7a2c0eaff1929e59
EBUILD gentoo-kernel-6.2.1.ebuild 3917 BLAKE2B 79ea19d126f3f6acb02b9c7e06fa236e32084786935f42acde73a9921ecde2ae747347813bb5d0e1379e32803795350d28af4e25065fadcbd352b964531f2090 SHA512 e7b2683919f435ef93f400d608c8a598c80d7d70752a86c04e1fe0fa2c90e964aa3a9b588e57a6553188fb09cfdd675d37769d6491b795013cce6075ae1511ef
+EBUILD gentoo-kernel-6.2.2.ebuild 3919 BLAKE2B 7c1fa5383985a9333e004bb33cfb1b71982f64a643b8ace2e411ae60af2a9fc170aa0d00ccd1a20d609b781b54c4a06f26d0e91505ce7746af4ca9d363108630 SHA512 a058f2bd702b52b0b13f1ba7e8666df2d59904e41d4ee89c7aa61b677713489dc109daf132d58fe9794f2749c82c003e67a1f9e9c97a87836bb09cad65026641
MISC metadata.xml 465 BLAKE2B ea1260a1638588a48d9dd776e9eabd9730a181af8416ba778c936fa2e80a2360be146d3cc80599e50e0a72ac709eb9538184aac87cb96528e445ed450e34f4af SHA512 c7b7b1a45fb7082b8d8d66cf5a387cc4f7207cd9488d1d5e1d6900f1e4147aa9290b5522a94d941a885f1599b5df2482b529e40912d2b2cff400ecd4b1704c41
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.234.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.234.ebuild
new file mode 100644
index 000000000000..aab83b3a5cd9
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.234.ebuild
@@ -0,0 +1,103 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit kernel-build
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 5 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.4.21
+CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea
+GENTOO_CONFIG_VER=g6
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="
+ https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
+ 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.config
+ -> kernel-x86_64.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config
+ -> kernel-aarch64.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config
+ -> kernel-ppc64le.config.${CONFIG_VER}
+ )
+ x86? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config
+ -> kernel-i686.config.${CONFIG_VER}
+ )
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ !sys-kernel/gentoo-kernel-bin:${SLOT}
+"
+BDEPEND="
+ debug? ( dev-util/pahole )
+"
+PDEPEND="
+ >=virtual/dist-kernel-${PV}
+"
+
+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.config.${CONFIG_VER}" .config || die
+ ;;
+ arm64)
+ cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die
+ ;;
+ 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.config.${CONFIG_VER}" .config || die
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686.config.${CONFIG_VER}" .config || die
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ echo 'CONFIG_LOCALVERSION="-gentoo-dist"' > "${T}"/version.config || die
+ local merge_configs=(
+ "${T}"/version.config
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config
+ )
+ use debug || merge_configs+=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config
+ )
+ [[ ${ARCH} == x86 ]] && merge_configs+=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/32-bit.config
+ )
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.15.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.15.ebuild
new file mode 100644
index 000000000000..b9c1b3f658b4
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.15.ebuild
@@ -0,0 +1,140 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit kernel-build toolchain-funcs
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 3 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.1.7-gentoo
+GENTOO_CONFIG_VER=g6
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="
+ https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
+ 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[@]}"
+}
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.2.2.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.2.2.ebuild
new file mode 100644
index 000000000000..6406ff1f6bc8
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.2.2.ebuild
@@ -0,0 +1,140 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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=6.2.0-gentoo
+GENTOO_CONFIG_VER=g7
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="
+ https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
+ 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[@]}"
+}