From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 46746158176 for ; Sun, 12 Oct 2025 16:22:15 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 290F93417E7 for ; Sun, 12 Oct 2025 16:22:15 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 39522110576; Sun, 12 Oct 2025 16:21:58 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 2CA84110577 for ; Sun, 12 Oct 2025 16:21:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CF825340FE4 for ; Sun, 12 Oct 2025 16:21:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 501253ADD for ; Sun, 12 Oct 2025 16:21:55 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1760286106.2bbf0274047de8b2943fafb9af55e133d18834eb.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/gentoo-kernel-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/gentoo-kernel-bin/Manifest sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.12.52.ebuild X-VCS-Directories: sys-kernel/gentoo-kernel-bin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 2bbf0274047de8b2943fafb9af55e133d18834eb X-VCS-Branch: master Date: Sun, 12 Oct 2025 16:21:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 32ad199e-f8e4-4294-8545-a3f584fc48c2 X-Archives-Hash: 81c1ca2ae7740bb747c3037fbca903e5 commit: 2bbf0274047de8b2943fafb9af55e133d18834eb Author: Michał Górny gentoo org> AuthorDate: Sun Oct 12 15:54:17 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Oct 12 16:21:46 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bbf0274 sys-kernel/gentoo-kernel-bin: Bump to 6.12.52 Signed-off-by: Michał Górny gentoo.org> sys-kernel/gentoo-kernel-bin/Manifest | 6 + .../gentoo-kernel-bin-6.12.52.ebuild | 237 +++++++++++++++++++++ 2 files changed, 243 insertions(+) diff --git a/sys-kernel/gentoo-kernel-bin/Manifest b/sys-kernel/gentoo-kernel-bin/Manifest index 9c6fb3249c07..30afbef2ca2f 100644 --- a/sys-kernel/gentoo-kernel-bin/Manifest +++ b/sys-kernel/gentoo-kernel-bin/Manifest @@ -66,6 +66,10 @@ DIST gentoo-kernel-6.12.51-1.amd64.gpkg.tar 307343360 BLAKE2B ceb100309440770f1d DIST gentoo-kernel-6.12.51-1.arm64.gpkg.tar 280545280 BLAKE2B 299b4bbfe9ded71dab48892ca359ab7cf47021e4ec4b5b5ae3d1f870769daea74200e932d407f0146c48ce2d53b72848236d03a3535f5e2ae6ff396835d1a3e5 SHA512 0c53780fd4acf6317ece323c2cee3d3b67aeaadb39fc525ec1e941bae300bf3e1e9c164a0687a955d012ad8e533f2a8f1b03ec16b929a22525bdc360f9d2c21e DIST gentoo-kernel-6.12.51-1.ppc64le.gpkg.tar 72509440 BLAKE2B 0fd28bfa212c960e31718f1ed82a3cf8d1f4652d35384c75dfc2b24ec7cce42df34014e87aae0b9efb8cb8c9fd6c429a7d0456d7db6bd05b962fe3cc6452b114 SHA512 5a8745fc6af3f20a4ab965fc2a4d4f11a794fc6fe2c6ea54ea5c8f46e47bcbb86265746b828249e083bdaaf4ccc497f5aca8f6a048a742331be63de2015afe9d DIST gentoo-kernel-6.12.51-1.x86.gpkg.tar 77690880 BLAKE2B 3ece6ef3521967236001a750ccf0e0e224840d21bb2b9643e846c8bd057a5e9fe677c719ba2c3625db54a5cad562241f2a2b76e3027e9221cd6d13f08cdc9ea5 SHA512 67806f07c934962601e52da8e8b274f3886d5f9f59098446b62007f828c28ddc65d38831ab2864173ffe91e908c8f63a2dc6d0e8849e117c5b21bf255c9d1512 +DIST gentoo-kernel-6.12.52-1.amd64.gpkg.tar 307425280 BLAKE2B b4abce5c8354410162680109eaaf948502c52971ff3a36468f36fffd75ce226d122af62bcbf4385d60ec20ab304384fa99cebd328a00791ea9d2497ef1b9a240 SHA512 628b6d45c2f01a0f3d3f4fafe1a747d12377d84601973d5aec3a7ce9dbc8cd2cd285b48d977eb4ebb77a34f8da94419959d9c958bbd8d68b4e54025bf712360e +DIST gentoo-kernel-6.12.52-1.arm64.gpkg.tar 280555520 BLAKE2B d5ad239cddfdcf5c236b8b09d2e548a2ead002f3e4fa228d9b3d39a6fc18923dcddcfa16891e8c814b5959aca45456d0a341a843262ec20d33879b47e5ebda0b SHA512 799bf4324f4e98fed3fce7ad9beff924f68c6c83d3b047e6a90193734dc7b60fa387ad46790f087773230976559d93fc9950314626543ceb241928058964d8bb +DIST gentoo-kernel-6.12.52-1.ppc64le.gpkg.tar 72529920 BLAKE2B 35c4dad300fe13156c600d3ce513cd0f6f989a7e631955c7e1989ab189c04335a88562106266efac27fb755bb2d760ff98c15b8071e8a0cb92565aa65f2223cc SHA512 1c1077377d73f528fb318a634ab99a85eed36e2ef8f2ec4efbc9fc6dff5067c30542d8aa6c9b441b5323f97e43f319859ca2e3463a0c16f7e805873ead53b30a +DIST gentoo-kernel-6.12.52-1.x86.gpkg.tar 77701120 BLAKE2B 8c309e51cf47679edc83e2847f0097e153e9cf0141fc1fcbeab84ab7b6e549b4ceb010a1ba35add43cbb318a33cadb7ff6861ee97b68b4c786862b3dde3a2322 SHA512 7c0e80936d1d2d7ef3e966f6826ca502343af9a1e5bf8fea6f55a0fc8c31d3753925d47890557827fefa087a4b8b91600cb1feb0feedacec1cf1c60160feeedd DIST gentoo-kernel-6.16.10-1.amd64.gpkg.tar 329789440 BLAKE2B 5930008f0259614a8ed7bb584d2699dc99fef63f6016650d58dcb005992dc687df42aa4bc0dba895f1381e0f26b0ffd7a5135b25cbc18dc6d65bb4a89d0ed009 SHA512 656d39cf124ef10c171410566001eca9fc3c2835d465afa12723d2dc950d77ef88313d191e90bccfb114e3cf789f3bda8a7ea247e351ac83c74f2ce18e9310a3 DIST gentoo-kernel-6.16.10-1.arm64.gpkg.tar 293253120 BLAKE2B 0591b2849b70d03484e04c6be0b7b35cf922bd1160183e4544dc5b99445728569495386059995099f21b5814e06cca422dc9c925a7f0d35acf7f49c869bdc3b4 SHA512 b4b678d25f4a56dcff9fb3225110ca996434272989f8dda7b7042c838e193fc74f7bbc3a1ad5880b190005b2bcf4f78b853add51f4c9f59ca0224e4471839e12 DIST gentoo-kernel-6.16.10-1.ppc64le.gpkg.tar 75110400 BLAKE2B b9afc6272632d40c3ba02d78ae644e183a00600ad6dacb79c460b80ec6783349676c399a15bb04e7da94f107c0b8ec7e76f941f73d264a771b4ab6b9937fe7cb SHA512 949f7930f34f8aa4f84346e406e57e32c1c4454a36105d97f2a1322066d2b225ce2f2affe4057b606c67854e0753d6e031e42913e01f60cc708408bb8e1c7600 @@ -154,6 +158,7 @@ DIST linux-gentoo-patches-6.1.153.tar.xz 29056 BLAKE2B 4a00d70119f3444d4e3fdbffb DIST linux-gentoo-patches-6.12.40.tar.xz 19240 BLAKE2B 2e5bdafcbe44cab520c86d7ab37c48c5b032693cee5674d1625432e4ac6285137a3df2aec24abe4cf795247f76226ff236f09f7e748ba3bd7db81cc76af03526 SHA512 dfb551b87530b0509293e87cd70d2d91f1c669c62adc6c7f34395ffdd5fbfc19bbfe943f84c188653a71bd627bea95f5f9391f4edbf0e269a8da98e191477fe2 DIST linux-gentoo-patches-6.12.46.tar.xz 19724 BLAKE2B edf0bc009a30dcf5d22c517bdfbab4ab7e4df3510e2102071fd24788d5cfc610434da2e92092ca5424e12e1676149b510f2de7e937be1ed96d0db4e2260ad42f SHA512 dd9d7c48767f3db0a8a6a33e8ffa9ecad4345044586d76de65d42e8985ef794bf7ab547852a1653bc1d66dbf4accdfc06cd5e35265cd2d2cccb0aafde21d8950 DIST linux-gentoo-patches-6.12.48.tar.xz 19224 BLAKE2B 9265bc0cc7be0ac7bc51677f750bfa642dbc7530979ad5a743f6e29ca4514b79dc0a906fcc324482a26f53111d7a7f660071857aab875b25ca3e1dd9086a6407 SHA512 63c4b64e5ca1857ab71e92633ca32941f9e4c2ca37f53897d5f257effb9452721be5606770cafaae6ce238cc9cf3a5054c56a519111713c0d462b79549aea669 +DIST linux-gentoo-patches-6.12.52.tar.xz 21836 BLAKE2B 7b39c3a97fdcfe76e12f2e481ae1c9d6c339ffe133cac956ba485bb82d8766d26d88295c8672eac07162c2968c42cfa12d7705b37dbb8f2f6b09c499ce2b4ac2 SHA512 8005072e872b78e364b15e1f32c8b6bfc0d1f96c8c051b01d4ae60e33250e842cc7ddef602a1caeba2e3914100fe3f319f3e8b171c2079967565efd169d8c558 DIST linux-gentoo-patches-6.16.10.tar.xz 86452 BLAKE2B c38938afd6493812dfe89b9212fe8aaf8617397468406ec97b7604848847b0cc9ede75ec55d1072d92d811a80edba8dd3aac796013ae981cb459ea50f5f57074 SHA512 092b77273757bbc713471834d076e0aeab489e34b371cf708ad978cc2f9d1a3eb8470d8d8b2d2276240ddf54f518aa0a20f2cca55ed5e209761ac87d0a446404 DIST linux-gentoo-patches-6.16.12.tar.xz 88116 BLAKE2B df60dd2678e852f25d7c1f5c2f75351b2100c1034095f20c1895e56f81a7fe155c6ef35103e7074c34900c48677972e93a4fca862e91a8022c7023af240fb96c SHA512 40fda7e21d467c06ddcc4e9010d7bdfbe44bf64d6086571e2c61e27ecb2b3968ba3be520c73600eec95fd602b5009d7beb6681d8abf1e10dbbee1cd1b5819329 DIST linux-gentoo-patches-6.16.6.tar.xz 86164 BLAKE2B a8d0590281c9e10008558979d3018fa5582ce052b8fbeda56b11115ae38ad3a8b3e5059513da86e89b2e8c1b4ac7525b3ce0260e3a25fbd0ac825b80edf697fa SHA512 799014df1f30fb9ccffcb6620611e6e11a94d9917d9ae7905e3647b0f1cb6699276c29d37efcf258465ca05819c3a457f334ef339761a2543c494f148b50eca0 @@ -181,6 +186,7 @@ DIST patch-6.12.48.xz 2931416 BLAKE2B 888711e5a4b9578bdd09379aac0b385b901e9784e1 DIST patch-6.12.49.xz 2955076 BLAKE2B 8f333d832ea1fe060000b3b14fb2e91ee2302df73f3e84a49a4813f59a254f56b51e7d7b8ad0a1f6c83655f34eaad41f97d70111c12ecd781d62b273a91c1af1 SHA512 38d48f5d76489936562b1ea0b62482ecfea1b2e1ccde07742f93950ce5f059897904b2c4342b6e91d2b647c283485c6f69d56719a9a3ed41a9e35f282b5e1dd1 DIST patch-6.12.50.xz 2972204 BLAKE2B 589b11a26af4f14181e12f156a4d34e884e7b8310802c22a63d3494b9a4507d275e3a437aaef7c7c5e2736ddbf71fc91ee4a9ab11acb252c89a16697c8964ed0 SHA512 3ec4639bec29bfe04765efa90abbda5ec5384ce616114b926e0c4bc7601a43ddf45c71634d8e846e1b5189460210099ccf4a4c0f20278a2e564cc25767543a7b DIST patch-6.12.51.xz 2974844 BLAKE2B cfb7242811febee3e506aa8775189f90cb1501341ca7aea7153aca28553cb5e953902f1c7bc23b2872f3f4617ee76641888c0cc0ae7a4611399a892030832b58 SHA512 5e04752b3432809212315b24c8fc18764b367e9e3282325d3d52b75190b4e0eeca48a10dc3baf09abfde3a633a7b14e03b4224251ae4e0b6206085683cce5dd2 +DIST patch-6.12.52.xz 2981340 BLAKE2B c3317e774812d88811d8e2aaac2f0ac076e819a012a28966a7f7ab0efe8aa5bd0b96fad848333121c681df5d9867740d8f4f61b39359a88a007b66481970b4a0 SHA512 a26009f2fe4a9c0d64685ffc7567ec2a817dc649093b8f50a20742e4f7db49a0752def2a8d4c2261df111160dbc97278357bc8f66685a87f5bf55eb9fd626baf DIST patch-6.16.10.xz 796140 BLAKE2B fb1868512d250eded50e32cbe9233e8a89e63d9004d0ca6cb1c5f156c128358bc294da6e0e7fe011cfbcac1358b1ef6b860d82628e34e15ac141a45465109c53 SHA512 0a2c34c2f64cd87f7079388295d120c81ad6bf3797873bac5bdaf4baeb0ae419f1beccb4f5415ed4a6b14f583f671073f7db2b7de92930ccf5bf59169a714e8f DIST patch-6.16.11.xz 799032 BLAKE2B 5e0a522494c81839a9a0c06825ebdbdce4c7a802ce62c337dd819cfe04012ecfed7bab3d93574aa6a3e66477971d687d0ef1971dff409ff49d0d18e09d68df21 SHA512 46423abc9bd8aaf0611f285947726dba54c24c73966cbfd03203314a6c235e98b110681335c2a1d0528c43abd13f285edec73a43f4df872c0cc7221677fd318c DIST patch-6.16.12.xz 808544 BLAKE2B 0fbd9b63869a73e5f4f1ba4dab26167faaeb9c178ef7ab0b0b9e158f493929eba9b70ca8681e05cb4b2d8e8983ee8ffa4b1845ad90cbef93671868fc9fa4c989 SHA512 64079698b0ad170b99f59db0ed119eb9920e2df7887c1738434583128cec578901e31f7f6002a7f397670d4d51ff2c2ac3f414c9896de9c7ba4f55e694364c11 diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.12.52.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.12.52.ebuild new file mode 100644 index 000000000000..505a63acbe71 --- /dev/null +++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.12.52.ebuild @@ -0,0 +1,237 @@ +# Copyright 2020-2025 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-install toolchain-funcs unpacker verify-sig + +BASE_P=linux-${PV%.*} +PATCH_PV=${PV%_p*} +PATCHSET=linux-gentoo-patches-6.12.52 +BINPKG=${P/-bin}-1 +SHA256SUM_DATE=20251012 + +DESCRIPTION="Pre-built Linux kernel 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/${BASE_P}.tar.xz + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz + https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz + 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 + ) + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.amd64.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.arm64.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.ppc64le.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.x86.gpkg.tar + ) +" +S=${WORKDIR} + +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="debug" + +RDEPEND=" + !sys-kernel/gentoo-kernel:${SLOT} +" +PDEPEND=" + >=virtual/dist-kernel-${PV} +" +BDEPEND=" + app-alternatives/bc + app-alternatives/lex + dev-util/pahole + virtual/libelf + app-alternatives/yacc + amd64? ( app-crypt/sbsigntools ) + arm64? ( app-crypt/sbsigntools ) + verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 ) +" + +KV_LOCALVERSION='-gentoo-dist' +KV_FULL=${PV/_p/-p}${KV_LOCALVERSION} + +QA_PREBUILT='*' + +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 patch-${PATCH_PV}.xz" + cd "${WORKDIR}" || die + fi + + unpacker +} + +src_prepare() { + local patch + cd "${BASE_P}" || die + eapply "${WORKDIR}/patch-${PATCH_PV}" + for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do + eapply "${patch}" + # non-experimental patches always finish with Gentoo Kconfig + # we built -bins without them + if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] + then + break + fi + done + + default + + # add Gentoo patchset version + local extraversion=${PV#${PATCH_PV}} + sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die +} + +src_configure() { + # force ld.bfd if we can find it easily + local HOSTLD="$(tc-getBUILD_LD)" + if type -P "${HOSTLD}.bfd" &>/dev/null; then + HOSTLD+=.bfd + fi + local LD="$(tc-getLD)" + if type -P "${LD}.bfd" &>/dev/null; then + LD+=.bfd + fi + tc-export_build_env + local makeargs=( + V=1 + WERROR=0 + + HOSTCC="$(tc-getBUILD_CC)" + HOSTCXX="$(tc-getBUILD_CXX)" + HOSTLD="${HOSTLD}" + HOSTAR="$(tc-getBUILD_AR)" + HOSTCFLAGS="${BUILD_CFLAGS}" + HOSTLDFLAGS="${BUILD_LDFLAGS}" + + CROSS_COMPILE=${CHOST}- + AS="$(tc-getAS)" + CC="$(tc-getCC)" + LD="${LD}" + AR="$(tc-getAR)" + NM="$(tc-getNM)" + STRIP="$(tc-getSTRIP)" + OBJCOPY="$(tc-getOBJCOPY)" + OBJDUMP="$(tc-getOBJDUMP)" + READELF="$(tc-getREADELF)" + + # we need to pass it to override colliding Gentoo envvar + ARCH="$(tc-arch-kernel)" + + O="${WORKDIR}"/modprep + ) + + local kernel_dir="${BINPKG}/image/usr/src/linux-${KV_FULL}" + + # If this is set it will have an effect on the name of the output + # image. Set this variable to track this setting. + if grep -q "CONFIG_EFI_ZBOOT=y" "${kernel_dir}/.config"; then + KERNEL_EFI_ZBOOT=1 + elif use arm64 && use generic-uki; then + die "USE=generic-uki requires a CONFIG_EFI_ZBOOT enabled build" + fi + + local image="${kernel_dir}/$(dist-kernel_get_image_path)" + local uki="${image%/*}/uki.efi" + + # Override user variable with the cert used during build + openssl x509 \ + -inform DER -in "${kernel_dir}/certs/signing_key.x509" \ + -outform PEM -out "${T}/cert.pem" || + die "Failed to convert pcrpkey to PEM format" + export SECUREBOOT_SIGN_CERT=${T}/cert.pem + + if [[ -s ${uki} ]]; then + # We need to extract the plain image for the test phase + # and USE=-generic-uki. + kernel-install_extract_from_uki linux "${uki}" "${image}" + fi + + mkdir modprep || die + cp "${kernel_dir}/.config" modprep/ || die + emake -C "${BASE_P}" "${makeargs[@]}" modules_prepare +} + +src_test() { + local kernel_dir="${BINPKG}/image/usr/src/linux-${KV_FULL}" + kernel-install_test "${KV_FULL}" \ + "${WORKDIR}/${kernel_dir}/$(dist-kernel_get_image_path)" \ + "${BINPKG}/image/lib/modules/${KV_FULL}" +} + +src_install() { + local rel_kernel_dir=/usr/src/linux-${KV_FULL} + local kernel_dir="${BINPKG}/image${rel_kernel_dir}" + local image="${kernel_dir}/$(dist-kernel_get_image_path)" + local uki="${image%/*}/uki.efi" + if [[ -s ${uki} ]]; then + # Keep the kernel image type we don't want out of install tree + # Replace back with placeholder + if use generic-uki; then + > "${image}" || die + else + > "${uki}" || die + fi + fi + + # Overwrite the identifier in the prebuilt package + echo "${CATEGORY}/${PF}:${SLOT}" > "${kernel_dir}/dist-kernel" || die + + mv "${BINPKG}"/image/{lib,usr} "${ED}"/ || die + + # FIXME: requires proper mount-boot + if [[ -d ${BINPKG}/image/boot/dtbs ]]; then + mv "${BINPKG}"/image/boot "${ED}"/ || die + fi + + # strip out-of-source build stuffs from modprep + # and then copy built files + find modprep -type f '(' \ + -name Makefile -o \ + -name '*.[ao]' -o \ + '(' -name '.*' -a -not -name '.config' ')' \ + ')' -delete || die + rm modprep/source || die + cp -p -R modprep/. "${ED}${rel_kernel_dir}"/ || die + + # Update timestamps on all modules to ensure cleanup works correctly + # when switching USE=modules-compress. + find "${ED}/lib" -name '*.ko' -exec touch {} + || die + + # Modules were already stripped before signing + dostrip -x /lib/modules + kernel-install_compress_modules + + # Mirror the logic from kernel-build_src_install, for architectures + # where USE=debug is used. + if use ppc64; then + dostrip -x "${rel_kernel_dir}/$(dist-kernel_get_image_path)" + elif use debug && { use amd64 || use arm64; }; then + dostrip -x "${rel_kernel_dir}/vmlinux" + dostrip -x "${rel_kernel_dir}/vmlinux.ctfa" + fi +}