From acc167449e97f75799df5eb192e50868a6edd74a Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Tue, 17 Dec 2024 19:49:14 +0100
Subject: [PATCH] linuxManualConfig: forbid config errors on aarch64

It's not a nice experience to wait for a kernel build, only to notice
the options you set didn't actually do anything, because Nixpkgs'
kernel configuration script just prints a warning if an option that
should have been set isn't set in the final kernel config.

Ideally, I think we'd never allow config errors, but we certainly
don't have to torelate them for aarch64, when CI for kernel changes
can ensure we don't accidentally break the build with x86-specific
options.

I've tested that configuration of all mainline kernels still works on
aarch64.
---
 pkgs/os-specific/linux/kernel/generic.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index 046fb3fe612026..331d39f47800e3 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -60,7 +60,8 @@ lib.makeOverridable ({ # The kernel source tarball.
   # symbolic name and `patch' is the actual patch.  The patch may
   # optionally be compressed with gzip or bzip2.
   kernelPatches ? []
-, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc"
+, ignoreConfigErrors ?
+  !lib.elem stdenv.hostPlatform.linux-kernel.name [ "aarch64-multiplatform" "pc" ]
 , extraMeta ? {}
 
 , isZen      ? false