EAC Linux v2 on Gentoo with OpenRC: ebuilds, host config, tools, docs

This commit is contained in:
2026-12-04 06:57:53 +01:00
commit dec92adb08
29 changed files with 1566 additions and 0 deletions
+97
View File
@@ -0,0 +1,97 @@
# Fortnite on Gentoo with OpenRC (EAC Linux v2)
Easy Anti-Cheat Linux v2 needs two things Gentoo with OpenRC does not have:
1. **A boot chain signed by a key Epic trusts.** Gentoo has none, so a separate
boot entry runs CachyOS's signed EAC kernel through CachyOS's signed
systemd-boot, with Secure Boot, TPM measurement and `lockdown=integrity`.
2. **systemd for EAC's anti-cheat service.** On the first protected launch, EAC
installs a socket-activated systemd service with `systemd-run`, `pkexec` and
`systemctl`. A small compatibility layer maps those calls to OpenRC.
This repository holds the two ebuilds, the host configuration, the debugging
tools used to work out the service install, and the documentation.
**Status (2026-12-03): working** on the author's desktop (Gentoo, OpenRC,
elogind, Hyprland, Intel Raptor Lake + AMD eGPU). EAC accepted the boot, the
service installed itself, and Fortnite ran creative islands with active
anti-cheat sessions. Battle Royale matchmaking is untested.
## How the pieces fit
```
firmware: Secure Boot on, db = own sbctl key + Microsoft certs + CachyOS EAC CA
-> firmware entry "CachyOS EAC": CachyOS-signed systemd-boot (measures into the TPM)
-> CachyOS-signed linux-cachyos-eac + host-built dracut initramfs
cmdline + lockdown=integrity lsm=...,bpf iommu.passthrough=0 intel_iommu=on
module.sig_enforce=1 sysctl.kernel.kexec_load_disabled=1
-> Hyprland session: hyprpolkitagent + systemd-run-agent (autostarted)
-> Epic Games Launcher -> Proton -> Fortnite + EAC bootstrapper
first launch: EAC setup -> systemd-run --user -> pkexec -> install -> systemctl start
every launch: game connects to @easyanticheat_eos -> service starts, stops after the game
```
The normal Gentoo boot stays the default. The EAC entry is last in BootOrder
and is started once with `eac-boot boot` or from the firmware's boot menu.
## Contents
| Path | What it is |
| --- | --- |
| [`AGENTS.md`](AGENTS.md) | installation runbook for agents, for the author's machine |
| [`docs/troubleshooting.md`](docs/troubleshooting.md) | error messages and their causes, log locations, debugging tools |
| [`docs/progress.md`](docs/progress.md) | how it got here, decisions, open items |
| `overlay/` | Portage overlay (`repo_name` `eac-gentoo-openrc`) with both packages; snapshot of the author's `febuild` overlay |
| `overlay/sys-kernel/cachyos-eac-kernel-bin/` | CachyOS's EAC kernel, signed systemd-boot, EAC CA and `eac-status`, repackaged byte for byte, plus the `eac-boot` tool. [README](overlay/sys-kernel/cachyos-eac-kernel-bin/files/README.md) |
| `overlay/sys-apps/eac-openrc-compat/` | the systemd compatibility layer for EAC's service on OpenRC. [README](overlay/sys-apps/eac-openrc-compat/files/README.md) |
| `host/udev/61-dri-igpu.rules` | stable `/dev/dri/igpu` name for the iGPU at PCI `0000:00:02.0`; goes to `/etc/udev/rules.d/` |
| `host/portage/package.use/intel-microcode` | `initramfs` USE flag, so dracut puts early microcode into the EAC initramfs; goes to `/etc/portage/package.use/` |
| `tools/` | debugging tools, not installed by anything. [README](tools/README.md) |
## The two packages
**`sys-kernel/cachyos-eac-kernel-bin`** installs, unchanged, from
`mirror.cachyos.org/repo/x86_64/cachyos/`: `linux-cachyos-eac` (kernel and
signed modules to `/lib/modules/<ver>-cachyos-eac/`),
`systemd-boot-cachyos-signed`, `cachyos-eac-signing-key` and `eac-status` from
`cachyos-settings`. Nothing is stripped or re-signed: a second signature fails
EAC. `eac-boot` enrolls the db, puts kernel, dracut initramfs and systemd-boot on
the ESP, creates the firmware entry and boots it once.
**`sys-apps/eac-openrc-compat`** provides exactly what EAC's setup
(`EasyAntiCheat_EOS_Setup` 0.1.7) calls:
| Installed file | Replaces |
| --- | --- |
| `/usr/lib64/libsystemd.so.0` -> `libelogind.so.0` | libsystemd (the setup uses only `sd_listen_fds`, `sd_is_socket_unix`, `sd_notify`) |
| `/usr/bin/systemd-run` + `/usr/libexec/eac-openrc-compat/systemd-run-agent` | `systemd-run --user`: the agent runs commands in the graphical session, outside Proton's no_new_privs sandbox, so `pkexec` works |
| `/usr/bin/systemctl` | `systemctl` for `NAME.socket`/`NAME.service` when the OpenRC service `socket-activate.NAME` exists; other units fail as on a non-systemd host |
| `/usr/libexec/eac-openrc-compat/socket-activate`, `/etc/init.d/socket-activate`, `socket-activate.easyanticheat_eos` | systemd socket activation of `@easyanticheat_eos` |
It does not pretend that systemd booted the machine: `/run/systemd/system`
stays absent and `sd_booted()` returns 0.
## systemd distributions
On a systemd system the compatibility layer is not needed, and it blocks
`sys-apps/systemd`. EAC's setup uses the real `systemd-run`, `systemctl` and
socket activation there. A Gentoo systemd install should work with only
`cachyos-eac-kernel-bin` and a polkit agent in the desktop session (untested).
Other distributions use their own signed kernel or CachyOS's packages directly;
see [AGENTS.md](AGENTS.md#systemd-systems).
## Safety
- Never re-sign, strip or `sbctl sign` the CachyOS kernel or systemd-boot.
- Never use `sbctl enroll-keys --append`: it enrolls every key a second time.
- In the firmware, only toggle Secure Boot. "Reset to Setup Mode", "Restore
Factory Keys" and "Clear All Keys" erase the custom db.
- A BitLocker Windows install asks for its recovery key after db or Secure Boot
changes.
## Maintenance
The author's `febuild` overlay is canonical for the packages. After changing an
ebuild there, copy the package directory into `overlay/` and commit both.
CachyOS deletes old packages from its mirror; bumping is described in the
[kernel package README](overlay/sys-kernel/cachyos-eac-kernel-bin/files/README.md#bumping).