diff --git a/apple-silicon-support/modules/boot-m1n1/default.nix b/apple-silicon-support/modules/boot-m1n1/default.nix index ccbd40bd..2ac33d99 100644 --- a/apple-silicon-support/modules/boot-m1n1/default.nix +++ b/apple-silicon-support/modules/boot-m1n1/default.nix @@ -10,6 +10,7 @@ let bootUBoot = pkgs'.uboot-asahi.override { m1n1 = bootM1n1; + appendConfig = config.boot.ubootExtraConfig; }; bootFiles = { @@ -51,5 +52,14 @@ in { Custom logo to build into m1n1. The path must point to a 256x256 PNG. ''; }; + + ubootExtraConfig = lib.mkOption { + type = lib.types.str; + default = ""; + description = '' + Append extra options to the u-boot build command. Useful for customizing + the u-boot binary for custom functionality. + ''; + }; }; } diff --git a/apple-silicon-support/packages/uboot-asahi/default.nix b/apple-silicon-support/packages/uboot-asahi/default.nix index 05098ac8..c9182c47 100644 --- a/apple-silicon-support/packages/uboot-asahi/default.nix +++ b/apple-silicon-support/packages/uboot-asahi/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , buildUBoot , m1n1 +, appendConfig ? "" }: (buildUBoot rec { @@ -27,6 +28,8 @@ CONFIG_VIDEO_FONT_SUN12X22=n CONFIG_VIDEO_FONT_16X32=y CONFIG_CMD_BOOTMENU=y + + ${appendConfig} ''; }).overrideAttrs (o: { # nixos's downstream patches are not applicable