aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-02-14 23:36:38 +0900
committersefidel <contact@sefidel.net>2023-02-14 23:38:29 +0900
commit748adbac7ca3452d0a1250c37ff4168d6ccf5ae0 (patch)
tree7be36fd9da46399b3a98bc1b3e9309bd3ce64fb3 /nixos/modules
parentadf6baa00e038e49cf477160eeddc886efced2b4 (diff)
downloadnixrc-748adbac7ca3452d0a1250c37ff4168d6ccf5ae0.zip
feat(nixos): init kompakt
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/apple-silicon-support/default.nix7
-rw-r--r--nixos/modules/apple-silicon-support/modules/boot-m1n1/default.nix55
-rw-r--r--nixos/modules/apple-silicon-support/modules/default.nix61
-rw-r--r--nixos/modules/apple-silicon-support/modules/kernel/default.nix108
-rw-r--r--nixos/modules/apple-silicon-support/modules/kernel/edge.nix52
-rw-r--r--nixos/modules/apple-silicon-support/modules/mesa/default.nix62
-rw-r--r--nixos/modules/apple-silicon-support/modules/peripheral-firmware/default.nix69
-rw-r--r--nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch31
-rwxr-xr-xnixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix36
-rw-r--r--nixos/modules/apple-silicon-support/packages/linux-asahi/config7673
-rw-r--r--nixos/modules/apple-silicon-support/packages/linux-asahi/default-pagesize-16k.patch13
-rw-r--r--nixos/modules/apple-silicon-support/packages/linux-asahi/default.nix118
-rw-r--r--nixos/modules/apple-silicon-support/packages/linux-asahi/sven-iommu-4k.patch449
-rw-r--r--nixos/modules/apple-silicon-support/packages/m1n1/default.nix100
-rw-r--r--nixos/modules/apple-silicon-support/packages/mesa-asahi-edge/default.nix22
-rw-r--r--nixos/modules/apple-silicon-support/packages/overlay.nix8
-rw-r--r--nixos/modules/apple-silicon-support/packages/uboot-asahi/default.nix54
17 files changed, 8918 insertions, 0 deletions
diff --git a/nixos/modules/apple-silicon-support/default.nix b/nixos/modules/apple-silicon-support/default.nix
new file mode 100644
index 0000000..71a5dd0
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/default.nix
@@ -0,0 +1,7 @@
+{ ... }:
+
+{
+ imports = [
+ ./modules/default.nix
+ ];
+}
diff --git a/nixos/modules/apple-silicon-support/modules/boot-m1n1/default.nix b/nixos/modules/apple-silicon-support/modules/boot-m1n1/default.nix
new file mode 100644
index 0000000..39e94c5
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/modules/boot-m1n1/default.nix
@@ -0,0 +1,55 @@
+{ config, pkgs, lib, ... }:
+let
+ pkgs' = config.hardware.asahi.pkgs;
+
+ bootM1n1 = pkgs'.m1n1.override {
+ isRelease = true;
+ withTools = false;
+ customLogo = config.boot.m1n1CustomLogo;
+ };
+
+ bootUBoot = pkgs'.uboot-asahi.override {
+ m1n1 = bootM1n1;
+ };
+
+ bootFiles = {
+ "m1n1/boot.bin" = pkgs.runCommand "boot.bin" {} ''
+ cat ${bootM1n1}/build/m1n1.bin > $out
+ cat ${config.boot.kernelPackages.kernel}/dtbs/apple/*.dtb >> $out
+ cat ${bootUBoot}/u-boot-nodtb.bin.gz >> $out
+ if [ -n "${config.boot.m1n1ExtraOptions}" ]; then
+ echo '${config.boot.m1n1ExtraOptions}' >> $out
+ fi
+ '';
+ };
+in {
+ config = {
+ # install m1n1 with the boot loader
+ boot.loader.grub.extraFiles = bootFiles;
+ boot.loader.systemd-boot.extraFiles = bootFiles;
+
+ # ensure the installer has m1n1 in the image
+ system.extraDependencies = lib.mkForce [ bootM1n1 bootUBoot ];
+ system.build.m1n1 = bootFiles."m1n1/boot.bin";
+ };
+
+ options.boot = {
+ m1n1ExtraOptions = lib.mkOption {
+ type = lib.types.str;
+ default = "";
+ description = ''
+ Append extra options to the m1n1 boot binary. Might be useful for fixing
+ display problems on Mac minis.
+ https://github.com/AsahiLinux/m1n1/issues/159
+ '';
+ };
+
+ m1n1CustomLogo = lib.mkOption {
+ type = lib.types.nullOr lib.types.path;
+ default = null;
+ description = ''
+ Custom logo to build into m1n1. The path must point to a 256x256 PNG.
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/apple-silicon-support/modules/default.nix b/nixos/modules/apple-silicon-support/modules/default.nix
new file mode 100644
index 0000000..1ae87bb
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/modules/default.nix
@@ -0,0 +1,61 @@
+{ config, pkgs, lib, ... }:
+{
+ imports = [
+ ./kernel
+ ./mesa
+ ./peripheral-firmware
+ ./boot-m1n1
+ ];
+
+ config =
+ let
+ cfg = config.hardware.asahi;
+ in {
+ nixpkgs.overlays = lib.mkBefore [ cfg.overlay ];
+
+ hardware.asahi.pkgs =
+ if cfg.pkgsSystem != "aarch64-linux"
+ then
+ import (pkgs.path) {
+ crossSystem.system = "aarch64-linux";
+ localSystem.system = cfg.pkgsSystem;
+ overlays = [ cfg.overlay ];
+ }
+ else pkgs;
+ };
+
+ options.hardware.asahi = {
+ pkgsSystem = lib.mkOption {
+ type = lib.types.str;
+ default = "aarch64-linux";
+ description = ''
+ System architecture that should be used to build the major Asahi
+ packages, if not the default aarch64-linux. This allows installing from
+ a cross-built ISO without rebuilding them during installation.
+ '';
+ };
+
+ pkgs = lib.mkOption {
+ type = lib.types.raw;
+ description = ''
+ Package set used to build the major Asahi packages. Defaults to the
+ ambient set if not cross-built, otherwise re-imports the ambient set
+ with the system defined by `hardware.asahi.pkgsSystem`.
+ '';
+ };
+
+ overlay = lib.mkOption {
+ type = lib.mkOptionType {
+ name = "nixpkgs-overlay";
+ description = "nixpkgs overlay";
+ check = lib.isFunction;
+ merge = lib.mergeOneOption;
+ };
+ default = import ../packages/overlay.nix;
+ defaultText = "overlay provided with the module";
+ description = ''
+ The nixpkgs overlay for asahi packages.
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/apple-silicon-support/modules/kernel/default.nix b/nixos/modules/apple-silicon-support/modules/kernel/default.nix
new file mode 100644
index 0000000..7e60b47
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/modules/kernel/default.nix
@@ -0,0 +1,108 @@
+# the Asahi Linux kernel and options that must go along with it
+
+{ config, pkgs, lib, ... }:
+{
+ config = {
+ boot.kernelPackages = let
+ pkgs' = config.hardware.asahi.pkgs;
+ in
+ pkgs'.linux-asahi.override {
+ inherit (config.boot) kernelPatches;
+ _4KBuild = config.hardware.asahi.use4KPages;
+ withRust = config.hardware.asahi.withRust;
+ };
+
+ # we definitely want to use CONFIG_ENERGY_MODEL, and
+ # schedutil is a prerequisite for using it
+ # source: https://www.kernel.org/doc/html/latest/scheduler/sched-energy.html
+ powerManagement.cpuFreqGovernor = lib.mkOverride 800 "schedutil";
+
+ boot.initrd.includeDefaultModules = false;
+ boot.initrd.availableKernelModules = [
+ # list of initrd modules stolen from
+ # https://github.com/AsahiLinux/asahi-scripts/blob/f461f080a1d2575ae4b82879b5624360db3cff8c/initcpio/install/asahi
+ "apple-mailbox"
+ "nvme_apple"
+ "pinctrl-apple-gpio"
+ "macsmc"
+ "macsmc-rtkit"
+ "i2c-apple"
+ "tps6598x"
+ "apple-dart"
+ "dwc3"
+ "dwc3-of-simple"
+ "xhci-pci"
+ "pcie-apple"
+ "gpio_macsmc"
+ "phy-apple-atc"
+ "nvmem_apple_efuses"
+ "spi-apple"
+ "spi-hid-apple"
+ "spi-hid-apple-of"
+ "rtc-macsmc"
+ "simple-mfd-spmi"
+ "spmi-apple-controller"
+ "nvmem_spmi_mfd"
+ "apple-dockchannel"
+ "dockchannel-hid"
+ "apple-rtkit-helper"
+
+ # additional stuff necessary to boot off USB for the installer
+ # and if the initrd (i.e. stage 1) goes wrong
+ "usb-storage"
+ "xhci-plat-hcd"
+ "usbhid"
+ "hid_generic"
+ ];
+
+ boot.kernelParams = [
+ "earlycon"
+ "console=ttySAC0,1500000"
+ "console=tty0"
+ "boot.shell_on_fail"
+ # Apple's SSDs are slow (~dozens of ms) at processing flush requests which
+ # slows down programs that make a lot of fsync calls. This parameter sets
+ # a delay in ms before actually flushing so that such requests can be
+ # coalesced. Be warned that increasing this parameter above zero (default
+ # is 1000) has the potential, though admittedly unlikely, risk of
+ # UNBOUNDED data corruption in case of power loss!!!! Don't even think
+ # about it on desktops!!
+ "nvme_apple.flush_interval=0"
+ ];
+
+ # U-Boot does not support EFI variables
+ boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
+
+ # U-Boot does not support switching console mode
+ boot.loader.systemd-boot.consoleMode = "0";
+
+ # GRUB has to be installed as removable if the user chooses to use it
+ boot.loader.grub = lib.mkDefault {
+ version = 2;
+ efiSupport = true;
+ efiInstallAsRemovable = true;
+ device = "nodev";
+ };
+ };
+
+ imports = [
+ ./edge.nix
+ ];
+
+ options.hardware.asahi.use4KPages = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = ''
+ Build the Asahi Linux kernel with 4K pages to improve compatibility in
+ some cases at the cost of performance in others.
+ '';
+ };
+
+ options.hardware.asahi.withRust = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = ''
+ Build the Asahi Linux kernel with Rust support.
+ '';
+ };
+}
diff --git a/nixos/modules/apple-silicon-support/modules/kernel/edge.nix b/nixos/modules/apple-silicon-support/modules/kernel/edge.nix
new file mode 100644
index 0000000..9137e3b
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/modules/kernel/edge.nix
@@ -0,0 +1,52 @@
+# the Asahi Linux edge config and options that must go along with it
+
+{ config, pkgs, lib, ... }:
+{
+ config = lib.mkIf config.hardware.asahi.addEdgeKernelConfig {
+ boot.kernelPatches = [
+ {
+ name = "edge-config";
+ patch = null;
+ # derived from
+ # https://github.com/AsahiLinux/PKGBUILDs/blob/stable/linux-asahi/config.edge
+ extraConfig = ''
+ DRM_SIMPLEDRM_BACKLIGHT n
+ BACKLIGHT_GPIO n
+ DRM_APPLE m
+ APPLE_SMC m
+ APPLE_SMC_RTKIT m
+ APPLE_RTKIT m
+ APPLE_MAILBOX m
+ GPIO_MACSMC m
+ DRM_VGEM n
+ DRM_SCHED y
+ DRM_GEM_SHMEM_HELPER y
+ DRM_ASAHI m
+ SUSPEND y
+ '';
+ }
+ ];
+
+ # required for proper DRM setup even without GPU driver
+ services.xserver.config = ''
+ Section "OutputClass"
+ Identifier "appledrm"
+ MatchDriver "apple"
+ Driver "modesetting"
+ Option "PrimaryGPU" "true"
+ EndSection
+ '';
+
+ # required for edge drivers
+ hardware.asahi.withRust = true;
+ };
+
+ options.hardware.asahi.addEdgeKernelConfig = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = ''
+ Build the Asahi Linux kernel with additional experimental "edge"
+ configuration options.
+ '';
+ };
+}
diff --git a/nixos/modules/apple-silicon-support/modules/mesa/default.nix b/nixos/modules/apple-silicon-support/modules/mesa/default.nix
new file mode 100644
index 0000000..7dfea55
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/modules/mesa/default.nix
@@ -0,0 +1,62 @@
+{ config, pkgs, lib, ... }:
+{
+ config = let
+ isMode = mode: (config.hardware.asahi.useExperimentalGPUDriver
+ && config.hardware.asahi.experimentalGPUInstallMode == mode);
+ in lib.mkMerge [
+ (lib.mkIf config.hardware.asahi.useExperimentalGPUDriver {
+
+ # install the drivers
+ hardware.opengl.package = pkgs.mesa-asahi-edge.drivers;
+
+ # required for GPU kernel driver
+ hardware.asahi.addEdgeKernelConfig = true;
+ })
+ (lib.mkIf (isMode "replace") {
+ # replace the Mesa linked into system packages with the Asahi version
+ # without rebuilding them to avoid rebuilding the world.
+ system.replaceRuntimeDependencies = [
+ { original = pkgs.mesa;
+ replacement = pkgs.mesa-asahi-edge;
+ }
+ ];
+ })
+ (lib.mkIf (isMode "overlay") {
+ # replace the Mesa used in Nixpkgs with the Asahi version using an overlay,
+ # which requires rebuilding the world but ensures it is done faithfully
+ # (and in a way compatible with pure evaluation)
+ nixpkgs.overlays = [
+ (final: prev: {
+ mesa = final.mesa-asahi-edge;
+ })
+ ];
+ })
+ ];
+
+ options.hardware.asahi.useExperimentalGPUDriver = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = ''
+ Use the experimental Asahi Mesa GPU driver.
+
+ Do not report issues using this driver under NixOS to the Asahi project.
+ '';
+ };
+
+ options.hardware.asahi.experimentalGPUInstallMode = lib.mkOption {
+ type = lib.types.enum [ "driver" "replace" "overlay" ];
+ default = "replace";
+ description = ''
+ Mode to use to install the experimental GPU driver into the system.
+
+ driver: install only as a driver, do not replace system Mesa.
+ Causes issues with certain programs like Plasma Wayland.
+
+ replace (default): use replaceRuntimeDependencies to replace system Mesa with Asahi Mesa.
+ Does not work in pure evaluation context (i.e. in flakes by default).
+
+ overlay: overlay system Mesa with Asahi Mesa
+ Requires rebuilding the world.
+ '';
+ };
+}
diff --git a/nixos/modules/apple-silicon-support/modules/peripheral-firmware/default.nix b/nixos/modules/apple-silicon-support/modules/peripheral-firmware/default.nix
new file mode 100644
index 0000000..2a478e6
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/modules/peripheral-firmware/default.nix
@@ -0,0 +1,69 @@
+{ config, pkgs, lib, ... }:
+{
+ config = {
+ assertions = lib.mkIf config.hardware.asahi.extractPeripheralFirmware [
+ { assertion = config.hardware.asahi.peripheralFirmwareDirectory != null;
+ message = ''
+ Asahi peripheral firmware extraction is enabled but the firmware
+ location appears incorrect.
+ '';
+ }
+ ];
+
+ hardware.firmware = let
+ pkgs' = config.hardware.asahi.pkgs;
+ in
+ lib.mkIf ((config.hardware.asahi.peripheralFirmwareDirectory != null)
+ && config.hardware.asahi.extractPeripheralFirmware) [
+ (pkgs.stdenv.mkDerivation {
+ name = "asahi-peripheral-firmware";
+
+ nativeBuildInputs = [ pkgs'.asahi-fwextract pkgs.cpio ];
+
+ buildCommand = ''
+ mkdir extracted
+ asahi-fwextract ${config.hardware.asahi.peripheralFirmwareDirectory} extracted
+
+ mkdir -p $out/lib/firmware
+ cat extracted/firmware.cpio | cpio -id --quiet --no-absolute-filenames
+ mv vendorfw/* $out/lib/firmware
+ '';
+ })
+ ];
+ };
+
+ options.hardware.asahi = {
+ extractPeripheralFirmware = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ description = ''
+ Automatically extract the non-free non-redistributable peripheral
+ firmware necessary for features like Wi-Fi.
+ '';
+ };
+
+ peripheralFirmwareDirectory = lib.mkOption {
+ type = lib.types.nullOr lib.types.path;
+
+ default = lib.findFirst (path: builtins.pathExists (path + "/all_firmware.tar.gz")) null
+ [
+ # path when the system is operating normally
+ /boot/asahi
+ # path when the system is mounted in the installer
+ /mnt/boot/asahi
+ ];
+
+ description = ''
+ Path to the directory containing the non-free non-redistributable
+ peripheral firmware necessary for features like Wi-Fi. Ordinarily, this
+ will automatically point to the appropriate location on the ESP. Flake
+ users and those interested in maximum purity will want to copy those
+ files elsewhere and specify this manually.
+
+ Currently, this consists of the files `all-firmware.tar.gz` and
+ `kernelcache*`. The official Asahi Linux installer places these files
+ in the `asahi` directory of the EFI system partition when creating it.
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch b/nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch
new file mode 100644
index 0000000..3c808fe
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/packages/asahi-fwextract/add_entry_point.patch
@@ -0,0 +1,31 @@
+diff --git a/asahi_firmware/update.py b/asahi_firmware/update.py
+index 45f1acf..e87e26e 100644
+--- a/asahi_firmware/update.py
++++ b/asahi_firmware/update.py
+@@ -35,7 +35,7 @@ def update_firmware(source, dest):
+
+ pkg.save_manifest(os.path.join(dest, "manifest.txt"))
+
+-if __name__ == "__main__":
++def main():
+ import argparse
+ import logging
+ logging.basicConfig()
+@@ -49,3 +49,7 @@ if __name__ == "__main__":
+ args = parser.parse_args()
+
+ update_firmware(args.source, args.dest)
++
++if __name__ == "__main__":
++ main()
++
+diff --git a/setup.py b/setup.py
+index 45ada19..1b371ba 100644
+--- a/setup.py
++++ b/setup.py
+@@ -9,4 +9,5 @@ setup(name='asahi_firmware',
+ author_email='marcan@marcan.st',
+ url='https://github.com/AsahiLinux/asahi-installer/',
+ packages=['asahi_firmware'],
++ entry_points={"console_scripts": ["asahi-fwextract = asahi_firmware.update:main"]}
+ )
diff --git a/nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix b/nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix
new file mode 100755
index 0000000..992d250
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/packages/asahi-fwextract/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, python3
+, fetchFromGitHub
+, gzip
+, gnutar
+, lzfse
+}:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "asahi-fwextract";
+ version = "0.5pre2";
+
+ # tracking version: https://github.com/AsahiLinux/PKGBUILDs/blob/main/asahi-fwextract/PKGBUILD
+ src = fetchFromGitHub {
+ owner = "AsahiLinux";
+ repo = "asahi-installer";
+ rev = "v${version}";
+ hash = "sha256-p34eN2iE1s8rupdysjyf6GN8kHkVG9NDw31YKPDNXbk=";
+ };
+
+ patches = [
+ ./add_entry_point.patch
+ ];
+
+ postPatch = ''
+ substituteInPlace asahi_firmware/img4.py \
+ --replace 'liblzfse.so' '${lzfse}/lib/liblzfse.so'
+ substituteInPlace asahi_firmware/update.py \
+ --replace '"tar"' '"${gnutar}/bin/tar"' \
+ --replace '"xf"' '"-x", "-I", "${gzip}/bin/gzip", "-f"'
+ '';
+
+ nativeBuildInputs = [ python3.pkgs.setuptools ];
+
+ doCheck = false;
+}
diff --git a/nixos/modules/apple-silicon-support/packages/linux-asahi/config b/nixos/modules/apple-silicon-support/packages/linux-asahi/config
new file mode 100644
index 0000000..1306cf3
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/packages/linux-asahi/config
@@ -0,0 +1,7673 @@
+# from https://github.com/AsahiLinux/PKGBUILDs/blob/stable/linux-asahi/config
+# note that this file is not passed to the kernel verbatim, it is parsed and run through `make config`, so stuff below like compiler version will be automatically adjusted for NixOS
+
+#
+# Automatically generated file; DO NOT EDIT.
+# Linux/arm64 6.1.0-rc7 Kernel Configuration
+#
+CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.1.0"
+CONFIG_CC_IS_GCC=y
+CONFIG_GCC_VERSION=120100
+CONFIG_CLANG_VERSION=0
+CONFIG_AS_IS_GNU=y
+CONFIG_AS_VERSION=23800
+CONFIG_LD_IS_BFD=y
+CONFIG_LD_VERSION=23800
+CONFIG_LLD_VERSION=0
+CONFIG_RUST_IS_AVAILABLE=y
+CONFIG_CC_CAN_LINK=y
+CONFIG_CC_CAN_LINK_STATIC=y
+CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
+CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
+CONFIG_CC_HAS_ASM_INLINE=y
+CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
+CONFIG_PAHOLE_VERSION=124
+CONFIG_CONSTRUCTORS=y
+CONFIG_IRQ_WORK=y
+CONFIG_BUILDTIME_TABLE_SORT=y
+CONFIG_THREAD_INFO_IN_TASK=y
+
+#
+# General setup
+#
+CONFIG_INIT_ENV_ARG_LIMIT=32
+# CONFIG_COMPILE_TEST is not set
+# CONFIG_WERROR is not set
+# CONFIG_LOCALVERSION="-ARCH"
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_BUILD_SALT=""
+CONFIG_DEFAULT_INIT=""
+CONFIG_DEFAULT_HOSTNAME="(none)"
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
+CONFIG_WATCH_QUEUE=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+# CONFIG_USELIB is not set
+CONFIG_AUDIT=y
+CONFIG_HAVE_ARCH_AUDITSYSCALL=y
+CONFIG_AUDITSYSCALL=y
+
+#
+# IRQ subsystem
+#
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_INJECTION=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_GENERIC_IRQ_IPI=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_IRQ_MSI_IOMMU=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_SPARSE_IRQ=y
+# CONFIG_GENERIC_IRQ_DEBUGFS is not set
+# end of IRQ subsystem
+
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_ARCH_HAS_TICK_BROADCAST=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y
+CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+
+#
+# Timers subsystem
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ_COMMON=y
+# CONFIG_HZ_PERIODIC is not set
+# CONFIG_NO_HZ_IDLE is not set
+CONFIG_NO_HZ_FULL=y
+CONFIG_CONTEXT_TRACKING_USER=y
+# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
+# CONFIG_NO_HZ is not set
+CONFIG_HIGH_RES_TIMERS=y
+# end of Timers subsystem
+
+CONFIG_BPF=y
+CONFIG_HAVE_EBPF_JIT=y
+CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
+
+#
+# BPF subsystem
+#
+CONFIG_BPF_SYSCALL=y
+CONFIG_BPF_JIT=y
+# CONFIG_BPF_JIT_ALWAYS_ON is not set
+CONFIG_BPF_JIT_DEFAULT_ON=y
+# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
+CONFIG_USERMODE_DRIVER=y
+# CONFIG_BPF_PRELOAD is not set
+# end of BPF subsystem
+
+CONFIG_PREEMPT_BUILD=y
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_COUNT=y
+CONFIG_PREEMPTION=y
+CONFIG_PREEMPT_DYNAMIC=y
+# CONFIG_SCHED_CORE is not set
+
+#
+# CPU/Task time and stats accounting
+#
+CONFIG_VIRT_CPU_ACCOUNTING=y
+CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_HAVE_SCHED_AVG_IRQ=y
+CONFIG_SCHED_THERMAL_PRESSURE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_PSI=y
+# CONFIG_PSI_DEFAULT_DISABLED is not set
+# end of CPU/Task time and stats accounting
+
+CONFIG_CPU_ISOLATION=y
+
+#
+# RCU Subsystem
+#
+CONFIG_TREE_RCU=y
+CONFIG_PREEMPT_RCU=y
+# CONFIG_RCU_EXPERT is not set
+CONFIG_SRCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_TASKS_RCU_GENERIC=y
+CONFIG_TASKS_RCU=y
+CONFIG_TASKS_TRACE_RCU=y
+CONFIG_RCU_STALL_COMMON=y
+CONFIG_RCU_NEED_SEGCBLIST=y
+CONFIG_RCU_NOCB_CPU=y
+# CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set
+# end of RCU Subsystem
+
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_IKHEADERS is not set
+CONFIG_LOG_BUF_SHIFT=18
+CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
+CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
+# CONFIG_PRINTK_INDEX is not set
+CONFIG_GENERIC_SCHED_CLOCK=y
+
+#
+# Scheduler features
+#
+# CONFIG_UCLAMP_TASK is not set
+# end of Scheduler features
+
+CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
+CONFIG_CC_HAS_INT128=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_GCC12_NO_ARRAY_BOUNDS=y
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_ARCH_SUPPORTS_INT128=y
+CONFIG_CGROUPS=y
+CONFIG_PAGE_COUNTER=y
+# CONFIG_CGROUP_FAVOR_DYNMODS is not set
+CONFIG_MEMCG=y
+CONFIG_MEMCG_KMEM=y
+CONFIG_BLK_CGROUP=y
+CONFIG_CGROUP_WRITEBACK=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_CFS_BANDWIDTH=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_CGROUP_PIDS=y
+CONFIG_CGROUP_RDMA=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_HUGETLB=y
+CONFIG_CPUSETS=y
+CONFIG_PROC_PID_CPUSET=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_CGROUP_PERF=y
+CONFIG_CGROUP_BPF=y
+CONFIG_CGROUP_MISC=y
+# CONFIG_CGROUP_DEBUG is not set
+CONFIG_SOCK_CGROUP_DATA=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_TIME_NS=y
+CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
+CONFIG_PID_NS=y
+CONFIG_NET_NS=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_SCHED_AUTOGROUP=y
+# CONFIG_SYSFS_DEPRECATED is not set
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_RD_XZ=y
+CONFIG_RD_LZO=y
+CONFIG_RD_LZ4=y
+CONFIG_RD_ZSTD=y
+CONFIG_BOOT_CONFIG=y
+# CONFIG_BOOT_CONFIG_EMBED is not set
+CONFIG_INITRAMFS_PRESERVE_MTIME=y
+CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_LD_ORPHAN_WARN=y
+CONFIG_SYSCTL=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_EXPERT=y
+CONFIG_MULTIUSER=y
+# CONFIG_SGETMASK_SYSCALL is not set
+CONFIG_SYSFS_SYSCALL=y
+CONFIG_FHANDLE=y
+CONFIG_POSIX_TIMERS=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_FUTEX_PI=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_IO_URING=y
+CONFIG_ADVISE_SYSCALLS=y
+CONFIG_MEMBARRIER=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_BASE_RELATIVE=y
+CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
+CONFIG_KCMP=y
+CONFIG_RSEQ=y
+# CONFIG_DEBUG_RSEQ is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_GUEST_PERF_EVENTS=y
+# CONFIG_PC104 is not set
+
+#
+# Kernel Performance Events And Counters
+#
+CONFIG_PERF_EVENTS=y
+# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
+# end of Kernel Performance Events And Counters
+
+CONFIG_SYSTEM_DATA_VERIFICATION=y
+CONFIG_PROFILING=y
+CONFIG_RUST=y
+CONFIG_RUSTC_VERSION_TEXT="rustc 1.65.0 (Arch Linux rust 1:1.65.0-1.1)"
+CONFIG_BINDGEN_VERSION_TEXT="bindgen 0.63.0"
+# end of General setup
+
+CONFIG_ARM64=y
+CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_64BIT=y
+CONFIG_MMU=y
+CONFIG_ARM64_PAGE_SHIFT=14
+CONFIG_ARM64_CONT_PTE_SHIFT=7
+CONFIG_ARM64_CONT_PMD_SHIFT=5
+CONFIG_ARCH_MMAP_RND_BITS_MIN=16
+CONFIG_ARCH_MMAP_RND_BITS_MAX=31
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=9
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
+CONFIG_SMP=y
+CONFIG_KERNEL_MODE_NEON=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_PGTABLE_LEVELS=4
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_PROC_KCORE_TEXT=y
+
+#
+# Platform selection
+#
+# CONFIG_ARCH_ACTIONS is not set
+# CONFIG_ARCH_SUNXI is not set
+# CONFIG_ARCH_ALPINE is not set
+CONFIG_ARCH_APPLE=y
+# CONFIG_ARCH_BCM is not set
+# CONFIG_ARCH_BERLIN is not set
+# CONFIG_ARCH_BITMAIN is not set
+# CONFIG_ARCH_EXYNOS is not set
+# CONFIG_ARCH_SPARX5 is not set
+# CONFIG_ARCH_K3 is not set
+# CONFIG_ARCH_LG1K is not set
+# CONFIG_ARCH_HISI is not set
+# CONFIG_ARCH_KEEMBAY is not set
+# CONFIG_ARCH_MEDIATEK is not set
+# CONFIG_ARCH_MESON is not set
+# CONFIG_ARCH_MVEBU is not set
+# CONFIG_ARCH_NXP is not set
+# CONFIG_ARCH_NPCM is not set
+# CONFIG_ARCH_QCOM is not set
+# CONFIG_ARCH_REALTEK is not set
+# CONFIG_ARCH_RENESAS is not set
+# CONFIG_ARCH_ROCKCHIP is not set
+# CONFIG_ARCH_SEATTLE is not set
+# CONFIG_ARCH_INTEL_SOCFPGA is not set
+# CONFIG_ARCH_SYNQUACER is not set
+# CONFIG_ARCH_TEGRA is not set
+# CONFIG_ARCH_SPRD is not set
+# CONFIG_ARCH_THUNDER is not set
+# CONFIG_ARCH_THUNDER2 is not set
+# CONFIG_ARCH_UNIPHIER is not set
+# CONFIG_ARCH_VEXPRESS is not set
+# CONFIG_ARCH_VISCONTI is not set
+# CONFIG_ARCH_XGENE is not set
+# CONFIG_ARCH_ZYNQMP is not set
+# end of Platform selection
+
+#
+# Kernel Features
+#
+
+#
+# ARM errata workarounds via the alternatives framework
+#
+# CONFIG_ARM64_ERRATUM_826319 is not set
+# CONFIG_ARM64_ERRATUM_827319 is not set
+# CONFIG_ARM64_ERRATUM_824069 is not set
+# CONFIG_ARM64_ERRATUM_819472 is not set
+# CONFIG_ARM64_ERRATUM_832075 is not set
+# CONFIG_ARM64_ERRATUM_834220 is not set
+# CONFIG_ARM64_ERRATUM_843419 is not set
+CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
+# CONFIG_ARM64_ERRATUM_1024718 is not set
+# CONFIG_ARM64_ERRATUM_1165522 is not set
+# CONFIG_ARM64_ERRATUM_1319367 is not set
+# CONFIG_ARM64_ERRATUM_1530923 is not set
+# CONFIG_ARM64_ERRATUM_2441007 is not set
+# CONFIG_ARM64_ERRATUM_1286807 is not set
+# CONFIG_ARM64_ERRATUM_1463225 is not set
+# CONFIG_ARM64_ERRATUM_1542419 is not set
+# CONFIG_ARM64_ERRATUM_1508412 is not set
+# CONFIG_ARM64_ERRATUM_2051678 is not set
+# CONFIG_ARM64_ERRATUM_2077057 is not set
+# CONFIG_ARM64_ERRATUM_2658417 is not set
+# CONFIG_ARM64_ERRATUM_2054223 is not set
+# CONFIG_ARM64_ERRATUM_2067961 is not set
+# CONFIG_ARM64_ERRATUM_2441009 is not set
+# CONFIG_ARM64_ERRATUM_2457168 is not set
+# CONFIG_CAVIUM_ERRATUM_22375 is not set
+# CONFIG_CAVIUM_ERRATUM_23154 is not set
+# CONFIG_CAVIUM_ERRATUM_27456 is not set
+# CONFIG_CAVIUM_ERRATUM_30115 is not set
+# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set
+# CONFIG_FUJITSU_ERRATUM_010001 is not set
+# CONFIG_HISILICON_ERRATUM_161600802 is not set
+# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set
+# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set
+# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set
+# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set
+# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set
+# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set
+# end of ARM errata workarounds via the alternatives framework
+
+# CONFIG_ARM64_4K_PAGES is not set
+CONFIG_ARM64_16K_PAGES=y
+# CONFIG_ARM64_64K_PAGES is not set
+# CONFIG_ARM64_VA_BITS_36 is not set
+# CONFIG_ARM64_VA_BITS_47 is not set
+CONFIG_ARM64_VA_BITS_48=y
+CONFIG_ARM64_VA_BITS=48
+CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_PA_BITS=48
+# CONFIG_CPU_BIG_ENDIAN is not set
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_CLUSTER=y
+CONFIG_SCHED_SMT=y
+CONFIG_NR_CPUS=64
+CONFIG_HOTPLUG_CPU=y
+# CONFIG_NUMA is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
+CONFIG_SCHED_HRTICK=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_HW_PERF_EVENTS=y
+CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
+CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_TIME_ACCOUNTING=y
+CONFIG_KEXEC_FILE=y
+# CONFIG_KEXEC_SIG is not set
+# CONFIG_CRASH_DUMP is not set
+CONFIG_TRANS_TABLE=y
+# CONFIG_XEN is not set
+CONFIG_ARCH_FORCE_MAX_ORDER=12
+CONFIG_UNMAP_KERNEL_AT_EL0=y
+CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y
+CONFIG_RODATA_FULL_DEFAULT_E