Add opt-in Nyx 7.4-rc1 with an NVIDIA compat patch
All checks were successful
Check and mirror to GitHub / checks (push) Successful in 22s
Check and mirror to GitHub / github-mirror (push) Successful in 11s

The live system moved from 7.3.1 to CachyOS 7.4-rc1 after 7.3 misbehaved on the
MT7925, and it boots on the RTX 3060 with KWin and Plasma running. Early check
only, so installs stay on 7.3.1.

- Bundle fiw-nyx-kernel-7.4_rc1-r1 and its virtual. Empty KEYWORDS and the
  unchanged snapshot.json keep installers from picking it.
- Add a patch for NVIDIA 595.104.02, which does not build against 7.4. It is
  ported from the unmerged NVIDIA/open-gpu-kernel-modules PR 1414, without the
  dmem hunks 595 has no code for.
- Stop fiw-nyx-bump copying or pruning rc ebuilds, and follow an rc in the mask
  only where Portage can see it.
- Document the opt-in steps.
This commit is contained in:
Fi3w0 2026-11-05 18:57:36 +01:00
parent c28992b601
commit 8dc93f7ff9
7 changed files with 408 additions and 7 deletions

View file

@ -17,7 +17,9 @@
To refresh the bundled kernel, run the helper against this checkout with To refresh the bundled kernel, run the helper against this checkout with
`FIW_NYX_REPO` pointing at `overlay` and `FIW_NYX_MASK` at a temporary file, for `FIW_NYX_REPO` pointing at `overlay` and `FIW_NYX_MASK` at a temporary file, for
example `fiw-nyx-bump 7.3`. It does not update `snapshot.json`, so review that example `fiw-nyx-bump 7.3`. It does not update `snapshot.json`, so review that
together with the new ebuild and keep only the snapshot's release in the overlay. together with the new ebuild and keep only the snapshot's release in the overlay,
plus any opt-in release candidate. The helper never copies or prunes `_rc` ebuilds;
its mask follows one only where Portage can see it.
Confirmed boot deployment installs its own refresh helper and kernel hooks. Confirmed boot deployment installs its own refresh helper and kernel hooks.
The default `keep` choice leaves them disabled. See [boot setup](boot.md). The default `keep` choice leaves them disabled. See [boot setup](boot.md).

View file

@ -76,7 +76,26 @@ for each, and failures appear in the package report.
The custom kernel is `sys-kernel/fiw-nyx-kernel` from the bundled overlay: CachyOS's The custom kernel is `sys-kernel/fiw-nyx-kernel` from the bundled overlay: CachyOS's
released 7.3.1-1 source built the Gentoo dist-kernel way, named `7.3.1-fiw-nyx-v1.2`. released 7.3.1-1 source built the Gentoo dist-kernel way, named `7.3.1-fiw-nyx-v1.2`.
`virtual/dist-kernel` and `gentoo-kernel-bin` stay masked above that release, because `virtual/dist-kernel` and `gentoo-kernel-bin` stay masked above that release, because
modules build for the newest installed kernel. Fiw's Ryzen preset also installs modules build for the newest installed kernel.
The overlay also carries `fiw-nyx-kernel-7.4_rc1-r1` (CachyOS `cachyos-7.4-rc1-1`,
named `7.4.0-rc1-fiw-nyx-v1.2`). Installs never pick it: its `KEYWORDS` is empty and
`snapshot.json` stays on the stable release. It has no Gentoo patchset and uses the
7.3.1 Fedora config as its base. To opt in on your own system:
```sh
echo '=sys-kernel/fiw-nyx-kernel-7.4_rc* **' >> /etc/portage/package.accept_keywords/fiw-dots-kernel
sed -i 's/^>virtual\/dist-kernel-.*/>virtual\/dist-kernel-7.4_rc1-r1/' /etc/portage/package.mask/fiw-dots-custom-kernel
emerge -1 =sys-kernel/fiw-nyx-kernel-7.4_rc1-r1 =virtual/dist-kernel-7.4_rc1-r1
```
NVIDIA 595.104.02 does not build against 7.4 by itself. Copy
`optional/kernel/patches/x11-drivers` to `/etc/portage/patches/x11-drivers` before
rebuilding `x11-drivers/nvidia-drivers`. The patch is ported from an unmerged
community pull request and only applies to that driver version. Keep your previous
kernel in the boot menu until 7.4 has proven itself on your hardware.
Fiw's Ryzen preset also installs
`/etc/sysctl.d/70-fiw-dots-performance.conf` (CachyOS-style memory/network `/etc/sysctl.d/70-fiw-dots-performance.conf` (CachyOS-style memory/network
values, `vm.max_map_count` for Proton games, TCP BBR with fq) and loads values, `vm.max_map_count` for Proton games, TCP BBR with fq) and loads
`tcp_bbr`. No extra packages are needed for either. `tcp_bbr`. No extra packages are needed for either.

View file

@ -10,6 +10,8 @@
# - writes /etc/portage/package.mask/fiw-nyx so virtual/dist-kernel and # - writes /etc/portage/package.mask/fiw-nyx so virtual/dist-kernel and
# gentoo-kernel-bin never run ahead of the Nyx kernel (modules build for # gentoo-kernel-bin never run ahead of the Nyx kernel (modules build for
# the newest kernel installed, which must be Nyx). # the newest kernel installed, which must be Nyx).
# Release-candidate ebuilds are opt-in: they are never copied or pruned here,
# and the mask only follows one that Portage can see (accept_keywords **).
# Run as root (the postsync hook does). Keeps the two newest Nyx versions. # Run as root (the postsync hook does). Keeps the two newest Nyx versions.
set -euo pipefail set -euo pipefail
@ -19,7 +21,7 @@ pkgdir=$repo/sys-kernel/fiw-nyx-kernel
vdir=$repo/virtual/dist-kernel vdir=$repo/virtual/dist-kernel
mask=${FIW_NYX_MASK:-/etc/portage/package.mask/fiw-nyx} mask=${FIW_NYX_MASK:-/etc/portage/package.mask/fiw-nyx}
newest=$(ls "$pkgdir"/fiw-nyx-kernel-*.ebuild | sort -V | tail -1) newest=$(ls "$pkgdir"/fiw-nyx-kernel-*.ebuild | grep -v _rc | sort -V | tail -1)
cur=$(basename "$newest" .ebuild); cur=${cur#fiw-nyx-kernel-} # 7.2.11-r1 cur=$(basename "$newest" .ebuild); cur=${cur#fiw-nyx-kernel-} # 7.2.11-r1
cur_ver=${cur%-r*} cur_ver=${cur%-r*}
series=${1:-${cur_ver%.*}} series=${1:-${cur_ver%.*}}
@ -52,7 +54,7 @@ if [[ ! -e $target ]]; then
cp "$vnewest" "$vdir/dist-kernel-${ver}-r${rel}.ebuild" cp "$vnewest" "$vdir/dist-kernel-${ver}-r${rel}.ebuild"
# Keep the two newest versions (and their virtuals), then the Manifests # Keep the two newest versions (and their virtuals), then the Manifests
# (thin: they fetch every listed version's sources, so prune first). # (thin: they fetch every listed version's sources, so prune first).
ls "$pkgdir"/fiw-nyx-kernel-*.ebuild | sort -V | head -n -2 | while read -r old; do ls "$pkgdir"/fiw-nyx-kernel-*.ebuild | grep -v _rc | sort -V | head -n -2 | while read -r old; do
v=$(basename "$old" .ebuild); v=${v#fiw-nyx-kernel-} v=$(basename "$old" .ebuild); v=${v#fiw-nyx-kernel-}
rm -f "$old" "$vdir/dist-kernel-${v}.ebuild" rm -f "$old" "$vdir/dist-kernel-${v}.ebuild"
done done
@ -61,11 +63,15 @@ if [[ ! -e $target ]]; then
chown -R --reference="$repo" "$pkgdir" "$vdir" chown -R --reference="$repo" "$pkgdir" "$vdir"
fi fi
mask_pvr=${ver}-r${rel}
best=$(portageq best_visible / ebuild sys-kernel/fiw-nyx-kernel 2>/dev/null) || true
[[ $best == *_rc* ]] && mask_pvr=${best##*/fiw-nyx-kernel-}
cat >"$mask.tmp" <<EOF cat >"$mask.tmp" <<EOF
# Written by fiw-nyx-bump: dist-kernel modules (nvidia-drivers) build for # Written by fiw-nyx-bump: dist-kernel modules (nvidia-drivers) build for
# the newest installed kernel, so nothing may get ahead of fiw-nyx-kernel. # the newest installed kernel, so nothing may get ahead of fiw-nyx-kernel.
>virtual/dist-kernel-${ver}-r${rel} >virtual/dist-kernel-${mask_pvr}
>sys-kernel/gentoo-kernel-bin-${ver} >sys-kernel/gentoo-kernel-bin-${mask_pvr%-r*}
EOF EOF
mv "$mask.tmp" "$mask" mv "$mask.tmp" "$mask"
echo "fiw-nyx-bump: Nyx is at ${ver}-r${rel} (${tag})" echo "fiw-nyx-bump: Nyx is at ${mask_pvr} (newest stable ${ver}-r${rel}, ${tag})"

View file

@ -0,0 +1,268 @@
Build NVIDIA 595.104.02 against Linux 7.4.
7.4 removes VM_SPECIAL, renames is_vm_hugetlb_page() to vma_is_hugetlb(), moves
drm_fb_helper.h to drm/clients/drm_fbdev_helper.h and replaces the plane and CRTC
.reset callbacks with .atomic_create_state. Older kernels keep their existing paths.
Ported from NVIDIA/open-gpu-kernel-modules PR 1414 (written for 615.71.09, not merged);
its dmem hunks are dropped because 595 has no dmem code. Remove this patch once
NVIDIA ships 7.4 support.
diff -ruN a/kernel-module-source/kernel-open/conftest.sh b/kernel-module-source/kernel-open/conftest.sh
--- a/kernel-module-source/kernel-open/conftest.sh 2026-09-17 18:48:23.000000000 +0200
+++ b/kernel-module-source/kernel-open/conftest.sh 2026-11-05 18:44:00.655037573 +0100
@@ -4265,7 +4265,11 @@
# in v6.11.
#
CODE="
+ #if defined(NV_DRM_CLIENTS_DRM_FBDEV_HELPER_H_PRESENT)
+ #include <drm/clients/drm_fbdev_helper.h>
+ #else
#include <drm/drm_fb_helper.h>
+ #endif
#if defined(NV_DRM_DRM_FBDEV_GENERIC_H_PRESENT)
#include <drm/drm_fbdev_generic.h>
#endif
@@ -4285,7 +4289,11 @@
# 1000634477d8 ("drm/fbdev-ttm:Convert to client-setup") in v6.13.
#
CODE="
+ #if defined(NV_DRM_CLIENTS_DRM_FBDEV_HELPER_H_PRESENT)
+ #include <drm/clients/drm_fbdev_helper.h>
+ #else
#include <drm/drm_fb_helper.h>
+ #endif
#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
#include <drm/drm_fbdev_ttm.h>
#endif
@@ -4307,7 +4315,11 @@
# in linux-next b86711c6d6e2.
#
CODE="
+ #if defined(NV_DRM_CLIENTS_DRM_FBDEV_HELPER_H_PRESENT)
+ #include <drm/clients/drm_fbdev_helper.h>
+ #else
#include <drm/drm_fb_helper.h>
+ #endif
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
#include <drm/drm_client_setup.h>
#elif defined(NV_DRM_CLIENTS_DRM_CLIENT_SETUP_H_PRESENT)
@@ -5133,6 +5145,46 @@
compile_check_conftest "$CODE" "NV_MEMORY_DEVICE_COHERENT_PRESENT" "" "types"
;;
+ drm_plane_funcs_has_atomic_create_state)
+ #
+ # Determine if drm_plane_funcs has an atomic_create_state callback.
+ #
+ CODE="
+ #include <drm/drm_plane.h>
+ int conftest_drm_plane_funcs_has_atomic_create_state(void) {
+ return offsetof(struct drm_plane_funcs, atomic_create_state);
+ }"
+
+ compile_check_conftest "$CODE" "NV_DRM_PLANE_FUNCS_HAS_ATOMIC_CREATE_STATE" "" "types"
+ ;;
+
+ drm_crtc_funcs_has_atomic_create_state)
+ #
+ # Determine if drm_crtc_funcs has an atomic_create_state callback.
+ #
+ CODE="
+ #include <drm/drm_crtc.h>
+ int conftest_drm_crtc_funcs_has_atomic_create_state(void) {
+ return offsetof(struct drm_crtc_funcs, atomic_create_state);
+ }"
+
+ compile_check_conftest "$CODE" "NV_DRM_CRTC_FUNCS_HAS_ATOMIC_CREATE_STATE" "" "types"
+ ;;
+
+ vma_is_hugetlb)
+ #
+ # Determine if the renamed hugetlb VMA helper is present.
+ # typeof requires a declaration even when implicit function
+ # declaration warnings are disabled for other conftests.
+ #
+ CODE="
+ #include <linux/mm.h>
+ typeof(vma_is_hugetlb) conftest_vma_is_hugetlb;
+ "
+
+ compile_check_conftest "$CODE" "NV_VMA_IS_HUGETLB_PRESENT" "" "types"
+ ;;
+
drm_crtc_funcs_has_get_vblank_timestamp)
#
# Determine if the 'drm_crtc_funcs' structure has a
diff -ruN a/kernel-module-source/kernel-open/header-presence-tests.mk b/kernel-module-source/kernel-open/header-presence-tests.mk
--- a/kernel-module-source/kernel-open/header-presence-tests.mk 2026-09-17 18:48:23.000000000 +0200
+++ b/kernel-module-source/kernel-open/header-presence-tests.mk 2026-11-05 18:44:00.643646321 +0100
@@ -14,6 +14,7 @@
drm/drm_client_setup.h \
drm/drm_probe_helper.h \
drm/clients/drm_client_setup.h \
+ drm/clients/drm_fbdev_helper.h \
dt-bindings/interconnect/tegra_icc_id.h \
generated/autoconf.h \
generated/compile.h \
diff -ruN a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-crtc.c b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-crtc.c
--- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-crtc.c 2026-09-17 19:19:38.000000000 +0200
+++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-crtc.c 2026-11-05 18:44:00.654796403 +0100
@@ -1944,6 +1944,27 @@
return -EINVAL;
}
+#if defined(NV_DRM_PLANE_FUNCS_HAS_ATOMIC_CREATE_STATE)
+/**
+ * nv_drm_plane_atomic_create_state - plane state creation hook
+ * @plane: DRM plane
+ *
+ * Allocate an empty DRM plane state.
+ */
+static struct drm_plane_state *
+nv_drm_plane_atomic_create_state(struct drm_plane *plane)
+{
+ struct nv_drm_plane_state *nv_plane_state =
+ nv_drm_calloc(1, sizeof(*nv_plane_state));
+
+ if (!nv_plane_state) {
+ return ERR_PTR(-ENOMEM);
+ }
+
+ __drm_atomic_helper_plane_state_init(&nv_plane_state->base, plane);
+ return &nv_plane_state->base;
+}
+#else
/**
* nv_drm_plane_atomic_reset - plane state reset hook
* @plane: DRM plane
@@ -1974,6 +1995,7 @@
kfree(nv_plane_state);
}
}
+#endif
static struct drm_plane_state *
@@ -2088,7 +2110,11 @@
.update_plane = drm_atomic_helper_update_plane,
.disable_plane = drm_atomic_helper_disable_plane,
.destroy = nv_drm_plane_destroy,
+#if defined(NV_DRM_PLANE_FUNCS_HAS_ATOMIC_CREATE_STATE)
+ .atomic_create_state = nv_drm_plane_atomic_create_state,
+#else
.reset = nv_drm_plane_atomic_reset,
+#endif
.atomic_get_property = nv_drm_plane_atomic_get_property,
.atomic_set_property = nv_drm_plane_atomic_set_property,
.atomic_duplicate_state = nv_drm_plane_atomic_duplicate_state,
@@ -2175,6 +2201,26 @@
}
+#if defined(NV_DRM_CRTC_FUNCS_HAS_ATOMIC_CREATE_STATE)
+/**
+ * nv_drm_atomic_crtc_create_state - crtc state creation hook
+ * @crtc: DRM crtc
+ *
+ * Allocate an empty DRM crtc state.
+ */
+static struct drm_crtc_state *
+nv_drm_atomic_crtc_create_state(struct drm_crtc *crtc)
+{
+ struct nv_drm_crtc_state *nv_state = nv_drm_crtc_state_alloc();
+
+ if (!nv_state) {
+ return ERR_PTR(-ENOMEM);
+ }
+
+ __drm_atomic_helper_crtc_state_init(&nv_state->base, crtc);
+ return &nv_state->base;
+}
+#else
/**
* nv_drm_atomic_crtc_reset - crtc state reset hook
* @crtc: DRM crtc
@@ -2204,6 +2250,7 @@
kfree(nv_state);
}
}
+#endif
/**
* nv_drm_atomic_crtc_duplicate_state - crtc state duplicate hook
@@ -2298,7 +2345,11 @@
static struct drm_crtc_funcs nv_crtc_funcs = {
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
+#if defined(NV_DRM_CRTC_FUNCS_HAS_ATOMIC_CREATE_STATE)
+ .atomic_create_state = nv_drm_atomic_crtc_create_state,
+#else
.reset = nv_drm_atomic_crtc_reset,
+#endif
.destroy = nv_drm_crtc_destroy,
.atomic_get_property = nv_drm_atomic_crtc_get_property,
.atomic_set_property = nv_drm_atomic_crtc_set_property,
diff -ruN a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c
--- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c 2026-09-17 19:19:38.000000000 +0200
+++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c 2026-11-05 18:44:00.643853497 +0100
@@ -64,8 +64,12 @@
#endif
#if defined(NV_DRM_FBDEV_AVAILABLE)
+#if defined(NV_DRM_CLIENTS_DRM_FBDEV_HELPER_H_PRESENT)
+#include <drm/clients/drm_fbdev_helper.h>
+#else
#include <drm/drm_fb_helper.h>
#endif
+#endif
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
#include <drm/drm_client_setup.h>
diff -ruN a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk
--- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk 2026-09-17 18:49:36.000000000 +0200
+++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk 2026-11-05 18:44:00.643898712 +0100
@@ -72,6 +72,8 @@
NV_CONFTEST_TYPE_COMPILE_TESTS += vm_fault_t
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_gem_object_has_resv
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_state_has_async_flip
+NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_funcs_has_atomic_create_state
+NV_CONFTEST_TYPE_COMPILE_TESTS += drm_plane_funcs_has_atomic_create_state
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_state_has_pageflip_flags
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_state_has_vrr_enabled
NV_CONFTEST_TYPE_COMPILE_TESTS += mm_has_mmap_lock
diff -ruN a/kernel-module-source/kernel-open/nvidia-uvm/nvidia-uvm.Kbuild b/kernel-module-source/kernel-open/nvidia-uvm/nvidia-uvm.Kbuild
--- a/kernel-module-source/kernel-open/nvidia-uvm/nvidia-uvm.Kbuild 2026-09-17 19:31:17.000000000 +0200
+++ b/kernel-module-source/kernel-open/nvidia-uvm/nvidia-uvm.Kbuild 2026-11-05 18:44:00.654859881 +0100
@@ -70,6 +70,7 @@
NV_CONFTEST_TYPE_COMPILE_TESTS += sg_dma_page_iter
NV_CONFTEST_TYPE_COMPILE_TESTS += struct_page_has_zone_device_data
NV_CONFTEST_TYPE_COMPILE_TESTS += memory_device_coherent_present
+NV_CONFTEST_TYPE_COMPILE_TESTS += vma_is_hugetlb
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_int_active_memcg
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_migrate_vma_setup
diff -ruN a/kernel-module-source/kernel-open/nvidia-uvm/uvm_hmm.c b/kernel-module-source/kernel-open/nvidia-uvm/uvm_hmm.c
--- a/kernel-module-source/kernel-open/nvidia-uvm/uvm_hmm.c 2026-09-17 19:32:07.000000000 +0200
+++ b/kernel-module-source/kernel-open/nvidia-uvm/uvm_hmm.c 2026-11-05 18:44:00.644067646 +0100
@@ -3967,14 +3967,18 @@
UVM_ASSERT(va_block->hmm.va_space->va_space_mm.mm == vma->vm_mm);
uvm_assert_mmap_lock_locked(vma->vm_mm);
- // migrate_vma_setup() can't migrate VM_SPECIAL so we have to force GPU
+ // migrate_vma_setup() can't migrate special mappings so we have to force GPU
// remote mapping.
// TODO: Bug 3660968: add support for file-backed migrations.
// TODO: Bug 3368756: add support for transparent huge page migrations.
return !vma_is_anonymous(vma) ||
- (vma->vm_flags & VM_SPECIAL) ||
+ (vma->vm_flags & (VM_IO | VM_DONTEXPAND | VM_PFNMAP | VM_MIXEDMAP)) ||
vma_is_dax(vma) ||
+#if defined(NV_VMA_IS_HUGETLB_PRESENT)
+ vma_is_hugetlb(vma);
+#else
is_vm_hugetlb_page(vma);
+#endif
}
#endif // UVM_IS_CONFIG_HMM()

View file

@ -1,4 +1,5 @@
DIST cachyos-7.3.1-1.tar.gz 269676681 BLAKE2B b744477e1202ae7c63020645fdd923625da6edd2bde61d01d9c7755e6d9628fc3fb00e615261f02a5c503d5c890cb9f8e1e9f068aea7ed01fda45b2d64e7216a SHA512 b261008e443d84a5dacd81686997b154731204c06b539216551d6cf31fc4491ef9e134966364b378c7d9a0b8010208512f88dc8b5bafea73d85535558cbc4117 DIST cachyos-7.3.1-1.tar.gz 269676681 BLAKE2B b744477e1202ae7c63020645fdd923625da6edd2bde61d01d9c7755e6d9628fc3fb00e615261f02a5c503d5c890cb9f8e1e9f068aea7ed01fda45b2d64e7216a SHA512 b261008e443d84a5dacd81686997b154731204c06b539216551d6cf31fc4491ef9e134966364b378c7d9a0b8010208512f88dc8b5bafea73d85535558cbc4117
DIST cachyos-7.4-rc1-1.tar.gz 274171425 BLAKE2B 2c3743453086a7b65ee40c72c64d7c199d3220ae98833b996736c625d82646abdf27af26d7766223903b27bd6238647ce934887c67d9b94e4e340f25cf9d8798 SHA512 b1f7778f3f1bb125f50bcc0e28154ce77ceb5d00108cf4202278b019442189c9b230d864d47a14c58a37a7a86cc4cc881d4507f9b53a46dc306c75e39e91ae29
DIST fedora-kernel-config-7.3.1-gentoo.tar.xz 272064 BLAKE2B df976c1d28108f3f7427c0535b9d28350e1dd070d050afdcb6677228f594813c2ac5ab9926e51ab53937666334879391d54563b79cb0e5c3887c61e83915ab14 SHA512 c9fb3ccc18cd2aed1d593344386e15c463806ecb909a9616576ae81a8e00b9c82860e941f0aad3c80bf1fd4ef84f3273ba1fcf7ce45520ed4372e5908affcd4f DIST fedora-kernel-config-7.3.1-gentoo.tar.xz 272064 BLAKE2B df976c1d28108f3f7427c0535b9d28350e1dd070d050afdcb6677228f594813c2ac5ab9926e51ab53937666334879391d54563b79cb0e5c3887c61e83915ab14 SHA512 c9fb3ccc18cd2aed1d593344386e15c463806ecb909a9616576ae81a8e00b9c82860e941f0aad3c80bf1fd4ef84f3273ba1fcf7ce45520ed4372e5908affcd4f
DIST gentoo-kernel-config-g19.tar.bz2 5610 BLAKE2B ad20063ac54c8b1485a06877e1d741b3b2c0a82967e8a84b1c475fc775178de3be39942e0ae00ca3bf2bb37f586da3de35df0d8229f14e1f7f77fa9819c907bf SHA512 7e4846265a3ab9f02c121b4eeeaf494f5f0568b309fc1245a47608a88c520b5b2c265c26bcebfb66710494951cefe718ce6acb4c6292138d46221003b74556b3 DIST gentoo-kernel-config-g19.tar.bz2 5610 BLAKE2B ad20063ac54c8b1485a06877e1d741b3b2c0a82967e8a84b1c475fc775178de3be39942e0ae00ca3bf2bb37f586da3de35df0d8229f14e1f7f77fa9819c907bf SHA512 7e4846265a3ab9f02c121b4eeeaf494f5f0568b309fc1245a47608a88c520b5b2c265c26bcebfb66710494951cefe718ce6acb4c6292138d46221003b74556b3
DIST linux-gentoo-patches-7.3.1.tar.xz 8932 BLAKE2B 25d8ec1cf52c1ee729e1202a30b7173ce887ca64d1b4e10791d7ef1cd43a311ebfcc570795e013464b4317799ffecb0d0cc3ec137a4f648cd4d874d9476c5bba SHA512 6ce5b26aa818370116805ea6ba4c03048178d4c1fc31ee21cc6bf1b43b537ccdfd96eda606f9af558cb65ccc4b03043c295a5546648ba09ff96fde051344673b DIST linux-gentoo-patches-7.3.1.tar.xz 8932 BLAKE2B 25d8ec1cf52c1ee729e1202a30b7173ce887ca64d1b4e10791d7ef1cd43a311ebfcc570795e013464b4317799ffecb0d0cc3ec137a4f648cd4d874d9476c5bba SHA512 6ce5b26aa818370116805ea6ba4c03048178d4c1fc31ee21cc6bf1b43b537ccdfd96eda606f9af558cb65ccc4b03043c295a5546648ba09ff96fde051344673b

View file

@ -0,0 +1,83 @@
# Copyright 2026 Fiw
# Distributed under the terms of the GNU General Public License v2
# Fiw's Nyx kernel, release-candidate variant: CachyOS's rc source tree
# (github.com/CachyOS/linux, tag cachyos-7.4-rc1-1) built the Gentoo
# distribution-kernel way.
#
# Differences from the stable fiw-nyx-kernel ebuilds:
# - no Gentoo patchset (Gentoo publishes the 7.4 one after 7.4 is out);
# - the 7.3.1 Fedora config as the base, olddefconfig fills in the new
# 7.4 options with their defaults;
# - EXTRAVERSION (-rc1) stays in the Makefile, because the dist-kernel
# eclasses expect kernel.release to start with 7.4.0-rc1.
# uname -r -> 7.4.0-rc1-fiw-nyx-v1.2 (name from /etc/kernel/config.d).
#
# Version: fiw-nyx-kernel-7.4_rcN-rM -> tag cachyos-7.4-rcN-M
# KEYWORDS is empty on purpose: rc kernels are opt-in only
# (package.accept_keywords: =sys-kernel/fiw-nyx-kernel-7.4_rc* **).
EAPI=8
KERNEL_IUSE_GENERIC_UKI=1
inherit kernel-build toolchain-funcs
MY_PV=${PV/_/-} # 7.4_rc1 -> 7.4-rc1
CACHY_TAG=cachyos-${MY_PV}-${PR#r} # cachyos-7.4-rc1-1
CONFIG_VER=7.3.1-gentoo
GENTOO_CONFIG_P=gentoo-kernel-config-g19
DESCRIPTION="CachyOS-patched Linux kernel built the Gentoo dist-kernel way (Nyx, rc)"
HOMEPAGE="
https://github.com/CachyOS/linux
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
"
SRC_URI+="
https://github.com/CachyOS/linux/releases/download/${CACHY_TAG}/${CACHY_TAG}.tar.gz
https://gitweb.gentoo.org/proj/dist-kernel/gentoo-kernel-config.git/snapshot/${GENTOO_CONFIG_P}.tar.bz2
https://distfiles.gentoo.org/pub/proj/dist-kernel/config/fedora-kernel-config-${CONFIG_VER}.tar.xz
"
S=${WORKDIR}/${CACHY_TAG}
KEYWORDS=""
IUSE="+debug"
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() {
[[ ${PR} == r0 ]] && die "Name the revision after the CachyOS release: ${PN}-${PV}-r<N> = ${CACHY_TAG%-*}-<N>"
grep -qx "PATCHLEVEL = $(ver_cut 2)" Makefile || die "${CACHY_TAG} is not ${PV}"
grep -qx "EXTRAVERSION = -${PV#*_}" Makefile || die "${CACHY_TAG} is not ${PV}"
# Your own patches from /etc/portage/patches (eapply_user).
default
cp "${WORKDIR}/fedora-kernel-config-${CONFIG_VER}/kernel-x86_64-fedora.config" .config || die
# Placeholder name; /etc/kernel/config.d/99-name.config sets the real one.
echo 'CONFIG_LOCALVERSION="-fiw-nyx"' > "${T}"/version.config || die
local dist_conf_path="${WORKDIR}/${GENTOO_CONFIG_P}"
local merge_configs=(
"${T}"/version.config
"${dist_conf_path}"/base.config
"${dist_conf_path}"/6.12+.config
)
use debug || merge_configs+=( "${dist_conf_path}"/no-debug.config )
use secureboot && merge_configs+=(
"${dist_conf_path}/secureboot.config"
"${dist_conf_path}/zboot.config"
)
kernel-build_merge_configs "${merge_configs[@]}"
}

View file

@ -0,0 +1,22 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# ::fiw copy of virtual/dist-kernel that also accepts sys-kernel/fiw-nyx-kernel,
# so dist-kernel modules (nvidia-drivers) rebuild for the Nyx kernel. Same
# version and revision as the Nyx kernel: a new CachyOS release changes the
# subslot and rebuilds the modules. fiw-nyx-bump keeps them in step.
EAPI=8
DESCRIPTION="Virtual to depend on any Distribution Kernel (incl. fiw-nyx-kernel)"
SLOT="0/${PVR}"
KEYWORDS="~amd64"
RDEPEND="
|| (
~sys-kernel/fiw-nyx-kernel-${PV}
~sys-kernel/gentoo-kernel-${PV}
~sys-kernel/gentoo-kernel-bin-${PV}
~sys-kernel/vanilla-kernel-${PV%_p*}
)
"