Skip to content

Commit

Permalink
Make it possible to pass the flash commands
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGillion <[email protected]>
  • Loading branch information
brianmcgillion committed Dec 19, 2024
1 parent f3c691d commit 4dc2542
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions modules/flash-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,18 @@ in
default = [ ];
description = "A list of paths to compiled .dtbo files to include with the UEFI image while flashing. These overlays are applied by UEFI at runtime";
};

preFlashCommands = mkOption {
type = types.lines;
default = "";
description = "Additional commands to be added to the flash script while it is being constructed.";
};

postFlashCommands = mkOption {
type = types.lines;
default = "";
description = "Additional commands to be added to the flash script while it is being constructed.";
};
};

flashScript = mkOption {
Expand Down
2 changes: 1 addition & 1 deletion overlay-with-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ final: prev: (
mkFlashScript = flash-tools: args: import ./device-pkgs/flash-script.nix ({
inherit lib flash-tools;
inherit (cfg.firmware) eksFile;
inherit (cfg.flashScriptOverrides) flashArgs partitionTemplate;
inherit (cfg.flashScriptOverrides) flashArgs partitionTemplate preFlashCommands postFlashCommands;
inherit (finalJetpack) tosImage socType uefi-firmware;

additionalDtbOverlays = args.additionalDtbOverlays or cfg.flashScriptOverrides.additionalDtbOverlays;
Expand Down

0 comments on commit 4dc2542

Please sign in to comment.