From 863045b86bc0052932d1a323b4455fed9fa25044 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 5 Nov 2023 15:11:58 +0000 Subject: [PATCH] added hardware.ram.startAddress config it's not 0 on arm32, so this will be useful for qemu --- modules/arch/mips.nix | 1 + modules/hardware.nix | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/arch/mips.nix b/modules/arch/mips.nix index 7ef1a3ac..956abf4b 100644 --- a/modules/arch/mips.nix +++ b/modules/arch/mips.nix @@ -10,6 +10,7 @@ OF = "y"; USE_OF = "y"; }; + hardware.ram.startAddress = 0; boot.commandLine = [ "console=ttyS0,115200" # true of all mips we've yet encountered ]; diff --git a/modules/hardware.nix b/modules/hardware.nix index 7ad33bcc..aa20d65b 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -29,6 +29,12 @@ in { description = "\"Default\" output: what gets built for this device when outputs.default is requested. Typically this is \"flashimage\" or \"vmroot\""; type = types.nonEmptyStr; }; + ram = { + startAddress = mkOption { + type = types.int; + }; + }; + flash = { # start address and size of whichever partition (often # called "firmware") we're going to overwrite with our