2024-06-30 15:58:29 +00:00
|
|
|
{ config, lib, ... }:
|
2023-03-17 12:22:20 +00:00
|
|
|
let
|
2024-06-29 21:59:27 +00:00
|
|
|
inherit (lib) mkIf mkEnableOption; # types concatStringsSep;
|
2025-02-10 21:55:08 +00:00
|
|
|
in
|
|
|
|
{
|
2023-03-17 12:22:20 +00:00
|
|
|
options = {
|
|
|
|
boot = {
|
|
|
|
ramdisk = {
|
2023-08-04 19:19:27 +00:00
|
|
|
enable = mkEnableOption ''
|
|
|
|
reserving part of memory as
|
2025-01-05 17:22:30 +00:00
|
|
|
an MTD-based RAM disk. Needed for TFTP booting
|
2023-08-04 19:19:27 +00:00
|
|
|
'';
|
2023-03-17 12:22:20 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf config.boot.ramdisk.enable {
|
|
|
|
kernel = {
|
|
|
|
config = {
|
|
|
|
MTD = "y";
|
|
|
|
MTD_PHRAM = "y";
|
|
|
|
MTD_CMDLINE_PARTS = "y";
|
|
|
|
MTD_OF_PARTS = "y";
|
|
|
|
PARTITION_ADVANCED = "y";
|
|
|
|
MTD_BLKDEVS = "y";
|
|
|
|
MTD_BLOCK = "y";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|