diff options
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix')
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix new file mode 100644 index 000000000000..c68f7630f3db --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix @@ -0,0 +1,29 @@ +# Platform specific constants +{ lib +, hostPlatform +}: + +rec { + # meta.platforms + platforms = [ + "i686-linux" + "x86_64-linux" + ]; + + # system arch as used within the stage0 project + stage0Arch = { + "i686-linux" = "x86"; + "x86_64-linux" = "AMD64"; + }.${hostPlatform.system} or (throw "Unsupported system: ${hostPlatform.system}"); + + # lower-case form is widely used by m2libc + m2libcArch = lib.toLower stage0Arch; + + # Passed to M2-Mesoplanet as --operating-system + m2libcOS = if hostPlatform.isLinux then "linux" else throw "Unsupported system: ${hostPlatform.system}"; + + baseAddress = { + "i686-linux" = "0x08048000"; + "x86_64-linux" = "0x00600000"; + }.${hostPlatform.system} or (throw "Unsupported system: ${hostPlatform.system}"); +} |