-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-kernel/asahi-kernel: add 6.12.4_p1
Signed-off-by: James Calligeros <[email protected]>
- Loading branch information
Showing
2 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
DIST genpatches-6.12-2.base.tar.xz 6548 BLAKE2B 6872ca3238aa7b9e811ce827260330850fd90bb3bb48abe7a06c5fd36acfff7ceca5983aff7cdc82da2396e27b908cb737ab77c5efc9603d03193473236ef634 SHA512 baae1ebc693f5eebb308d35d8e6571f5f00e95bd98e4aac9c84e6fceffd051b4699762dc5c1f1b02231126e7c4bafbb352e4aa011cfa71d9b0ba84fbfa766536 | ||
DIST genpatches-6.12-2.extras.tar.xz 4060 BLAKE2B ce854b442562d86627eed172c94d6766ed27a29e0c7cbd240ec7b18b3fb0965a30289640d828b603eb309f2e911dec157c206740b4f16f40ffc3ce8069fabf3e SHA512 dd14190aaf8dfd51696e0fd3751695889e9c4c6ac9eb36b288f5991f01874b3cafb29240fa115fe54b718ee741c810c154e97aad8f5eb72f988bb3bae0005222 | ||
DIST genpatches-6.12-6.base.tar.xz 365140 BLAKE2B bf281f8314de03b6ac24de430632999188ff1573f46f58cab999f92fbcf0c2e5fd14413892e5a961eb1ee8b64360a253e8cc26d24f8687b413ff9cc1df72a4c2 SHA512 ddca7ef8f67bdc182ccfeb6ed2e5fd08297287fcd5744285c549643a854c7d6148342a3ac1a13ad6cdd87c334acc5abc58a7f6e6a58f34db8ce9dca2b0802152 | ||
DIST genpatches-6.12-6.extras.tar.xz 4056 BLAKE2B 4d3a72ea884a1b6cc84034277d6cfb57f7cc3fd43e9d229b46707c07dcef1af73bbd61aa880805ca5746c3b470335ad48c10d55f442f3396f0aaaa9a7a23c73b SHA512 538ba6590f3f4ff9bcb44131393a95a677ee6c59b6ee67ad2519ff242fb182358cd217d5e0533e11225646ecc92e8efeb4688c332db70d35a977a8e3cb475787 | ||
DIST gentoo-kernel-config-g6.tar.gz 4562 BLAKE2B ad9e1b28f84916f12cd8b21feb2f4396d3d63f4cfae3e6b6fe93f919c98b0b4523b205711ab7acafa7121360f696eecb63b9f162dd12950e56dab1429cc13633 SHA512 d180122eb00d40126ea7d79224559904eb0ea574314f9a8d6be6b10f0f6a49f526eba1366ae8cd0a4fe23cd8ff5e292c8cab7e856a2c915d4162b75a03f8076b | ||
DIST kernel-aarch64-16k-fedora.config-6.12.1-404-gentoo 289048 BLAKE2B 27dd38cd41394fcb2b32fb7c750ceb8a95021a9a51011f9f2180f1ef5b65c741b5ff523ed9b166e45086a2a9008ff368d786c25a83b981a7c701c70b2e0d69e5 SHA512 94dd29e8dc868b93b537d809bfc2150497600ad36e2a4b6d7df5641e7147e88355fe598f3f16e58253840455b4e9325e15c0ec0d080b4a1742cbeff758e0e8f8 | ||
DIST kernel-aarch64-16k-fedora.config-6.12.4-400-gentoo 289090 BLAKE2B a0a741f53cff4ba7e9fd3c34c386c7f379837255129f37ec04610b89cbcf3747cfae669f293f848268efb2847846394c25d1739bfbc874682a94a28990487e4d SHA512 ec0e10f01e7477dc862c99a79a066ec698c5ec22b6e1f76debd578aef16dc66c7e9cbd70943543eabc24c6bcd5d1d70366dfd89d59c40931f32225f10fbb126d | ||
DIST linux-6.12.tar.xz 147906904 BLAKE2B b2ec2fc69218cacabbbe49f78384a5d259ca581b717617c12b000b16f4a4c59ee348ea886b37147f5f70fb9a7a01c1e2c8f19021078f6b23f5bc62d1c48d5e5e SHA512 a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548 | ||
DIST linux-asahi-6.12.1-8.diff 3407327 BLAKE2B 8ffdcd3d28878644bedef5ef0f7146d6308fc292bd410e37a34bee8791c0b1fb9b3165dfb2dc2b8c2b570b2734028fe817547c557e0429477359865eb21cca1f SHA512 53aa8309b63accd9c46b900e46e952cf34ec00b67c3caddbcfcbc320db8659220ead7af5187b80959a6c6aed555bf94d3e1a77c599e89c47eeb43d15da0d6fd9 | ||
DIST linux-asahi-6.12.4-1.diff 3408733 BLAKE2B 0afea275a9048d46d1bf21f3e9a5e8bc8c3f739c77210231e1e699cb4b74f5ba060b3ef07545f1691e67db18e2f9f90fe51007951f8c5c6993590929da249325 SHA512 fdda1186aeb504712516974b9495cdf542d788dc67ef95d1a5cb46e7773e4e8b3a8f55ce67deecc2ab8d9d7d36dcabf720edf1bec274bf187589c8336e87f62a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Copyright 2023-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI="8" | ||
K_SECURITY_UNSUPPORTED="1" | ||
ETYPE="sources" | ||
K_NODRYRUN="1" | ||
|
||
RUST_MIN_VER="1.76.0" | ||
RUST_USEDEP='rust-src,rustfmt' | ||
|
||
inherit kernel-build rust | ||
|
||
MY_P=linux-${PV%.*} | ||
GENPATCHES_P="genpatches-$(ver_cut 1-2)-6" | ||
|
||
if [[ ${PV} != ${PV/_rc} ]] ; then | ||
# $PV is expected to be of following form: 6.0_rc5_p1 | ||
MY_TAG="$(ver_cut 6)" | ||
MY_BASE="$(ver_rs 2 - $(ver_cut 1-4))" | ||
else | ||
# $PV is expected to be of following form: 5.19.0_p1 | ||
MY_TAG="$(ver_cut 5)" | ||
if [[ "$(ver_cut 3)" == "0" ]] ; then | ||
MY_BASE="$(ver_cut 1-2)" | ||
else | ||
MY_BASE="$(ver_cut 1-3)" | ||
fi | ||
fi | ||
|
||
# BASE_ASAHI_TAG is the first used TAG of specific release, i.e. usually | ||
# the first tag of a linux 6.x or linux stable 6.x.y release | ||
ASAHI_TAG="asahi-${MY_BASE}-${MY_TAG}" | ||
|
||
CONFIG_VER=6.12.4-400-gentoo | ||
GENTOO_CONFIG_VER=g6 | ||
FEDORA_CONFIG_DISTGIT="copr-dist-git.fedorainfracloud.org/cgit/@asahi/kernel" | ||
# FEDORA_CONFIG_DISTGIT="copr-dist-git.fedorainfracloud.org/cgit/ngompa/fedora-asahi-dev" | ||
FEDORA_CONFIG_SHA1=0f8f1fbbbace045751fa63ffbe6e3024bb5f195e | ||
|
||
DESCRIPTION="Asahi Linux kernel sources" | ||
SLOT="asahi/${PVR}" | ||
HOMEPAGE="https://asahilinux.org" | ||
SRC_URI=" | ||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz | ||
https://github.com/AsahiLinux/linux/compare/v${MY_BASE}...${ASAHI_TAG}.diff | ||
-> linux-${ASAHI_TAG}.diff | ||
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 | ||
https://${FEDORA_CONFIG_DISTGIT}/kernel.git/plain/kernel-aarch64-16k-fedora.config?id=${FEDORA_CONFIG_SHA1} | ||
-> kernel-aarch64-16k-fedora.config-${CONFIG_VER} | ||
" | ||
|
||
S="${WORKDIR}/${MY_P}" | ||
|
||
LICENSE="GPL-2" | ||
KEYWORDS="~arm64" | ||
|
||
IUSE="debug" | ||
|
||
# Rust is non-negotiable for the dist kernel | ||
DEPEND=" | ||
${DEPEND} | ||
dev-util/bindgen | ||
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 | ||
"${DISTDIR}/linux-${ASAHI_TAG}.diff" | ||
"${FILESDIR}/${PN}-6.8-config-gentoo-Drop-RANDSTRUCT-from-GENTOO_KERNEL_SEL.patch" | ||
) | ||
default | ||
|
||
# prepare the default config | ||
cp "${DISTDIR}/kernel-aarch64-16k-fedora.config-${CONFIG_VER}" ".config" || die | ||
|
||
# ensure a consistant version across kernel and gentoo | ||
# this passes the ${PV}-as-release check in kernel-install_pkg_preinst() | ||
# override "-asahi" in localversion.05-asahi with "_pX" to override the | ||
# kernel's base varsion to gentoo's ${PV} | ||
echo "-p${MY_TAG}" > localversion.05-asahi | ||
# use CONFIG_LOCALVERSION to provide "asahi" and "dist" annotations. | ||
local myversion="-asahi-dist" | ||
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 | ||
"${FILESDIR}"/linux-6.10_disable_debug_info_btf.config | ||
) | ||
|
||
# deselect all non APPLE arm64 ARCHs | ||
merge_configs+=( | ||
"${FILESDIR}"/linux-6.8_arm64_deselect_non_apple_arch.config | ||
) | ||
# adjust base config for Apple silicon systems | ||
merge_configs+=( | ||
"${FILESDIR}"/linux-6.8_arch_apple_overrides.config | ||
) | ||
|
||
# amdgpu no longer builds with clang (issue #113) | ||
merge_configs+=( | ||
"${FILESDIR}"/linux-6.10_drop_amdgpu.config | ||
) | ||
|
||
kernel-build_merge_configs "${merge_configs[@]}" | ||
} | ||
|
||
src_install() { | ||
# call kernel-build's scr_install | ||
kernel-build_src_install | ||
|
||
# symlink installed *.dtbs back into kernel "source" directory | ||
for dtb in ${ED}/boot/dtbs/${KV_FULL}/apple/*.dtb; do | ||
local basedtb=$(basename ${dtb}) | ||
dosym -r ${EROOT}/boot/dtbs/${KV_FULL}/apple/${basedtb} ${EROOT}/usr/src/linux-${KV_FULL}/arch/arm64/boot/dts/apple/${basedtb} | ||
done | ||
} | ||
|
||
pkg_postinst() { | ||
einfo "For more information about Asahi Linux please visit ${HOMEPAGE}," | ||
einfo "or consult the Wiki at https://github.com/AsahiLinux/docs/wiki." | ||
kernel-build_pkg_postinst | ||
} |