lib/systems: Add Genode platform definitions
Add platform definitions for 64-bit ARM and x86. This is sufficient for for building Genode where a toolchain is provided as an overlay. Toolchain: git+https://git.sr.ht/~ehmry/genodepkgs?rev=14fc773ac9ecd2cbb30cb4612b284eee83d83546
This commit is contained in:
parent
5ee77aa47c
commit
9f91fa02a6
|
@ -65,6 +65,7 @@ rec {
|
||||||
freebsd = "FreeBSD";
|
freebsd = "FreeBSD";
|
||||||
openbsd = "OpenBSD";
|
openbsd = "OpenBSD";
|
||||||
wasi = "Wasi";
|
wasi = "Wasi";
|
||||||
|
genode = "Genode";
|
||||||
}.${final.parsed.kernel.name} or null;
|
}.${final.parsed.kernel.name} or null;
|
||||||
|
|
||||||
# uname -p
|
# uname -p
|
||||||
|
|
|
@ -35,6 +35,8 @@ let
|
||||||
"vc4-none"
|
"vc4-none"
|
||||||
|
|
||||||
"js-ghcjs"
|
"js-ghcjs"
|
||||||
|
|
||||||
|
"aarch64-genode" "x86_64-genode"
|
||||||
];
|
];
|
||||||
|
|
||||||
allParsed = map parse.mkSystemFromString all;
|
allParsed = map parse.mkSystemFromString all;
|
||||||
|
@ -68,6 +70,7 @@ in {
|
||||||
unix = filterDoubles predicates.isUnix;
|
unix = filterDoubles predicates.isUnix;
|
||||||
wasi = filterDoubles predicates.isWasi;
|
wasi = filterDoubles predicates.isWasi;
|
||||||
windows = filterDoubles predicates.isWindows;
|
windows = filterDoubles predicates.isWindows;
|
||||||
|
genode = filterDoubles predicates.isGenode;
|
||||||
|
|
||||||
embedded = filterDoubles predicates.isNone;
|
embedded = filterDoubles predicates.isNone;
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ rec {
|
||||||
isMinGW = { kernel = kernels.windows; abi = abis.gnu; };
|
isMinGW = { kernel = kernels.windows; abi = abis.gnu; };
|
||||||
isWasi = { kernel = kernels.wasi; };
|
isWasi = { kernel = kernels.wasi; };
|
||||||
isGhcjs = { kernel = kernels.ghcjs; };
|
isGhcjs = { kernel = kernels.ghcjs; };
|
||||||
|
isGenode = { kernel = kernels.genode; };
|
||||||
isNone = { kernel = kernels.none; };
|
isNone = { kernel = kernels.none; };
|
||||||
|
|
||||||
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
|
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
|
||||||
|
|
|
@ -279,6 +279,7 @@ rec {
|
||||||
wasi = { execFormat = wasm; families = { }; };
|
wasi = { execFormat = wasm; families = { }; };
|
||||||
windows = { execFormat = pe; families = { }; };
|
windows = { execFormat = pe; families = { }; };
|
||||||
ghcjs = { execFormat = unknown; families = { }; };
|
ghcjs = { execFormat = unknown; families = { }; };
|
||||||
|
genode = { execFormat = elf; families = { }; };
|
||||||
} // { # aliases
|
} // { # aliases
|
||||||
# 'darwin' is the kernel for all of them. We choose macOS by default.
|
# 'darwin' is the kernel for all of them. We choose macOS by default.
|
||||||
darwin = kernels.macos;
|
darwin = kernels.macos;
|
||||||
|
@ -395,6 +396,8 @@ rec {
|
||||||
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 1; abi = elemAt l 2; }
|
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 1; abi = elemAt l 2; }
|
||||||
else if (elemAt l 2 == "ghcjs")
|
else if (elemAt l 2 == "ghcjs")
|
||||||
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 2; }
|
then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 2; }
|
||||||
|
else if hasPrefix "genode" (elemAt l 2)
|
||||||
|
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
|
||||||
else throw "Target specification with 3 components is ambiguous";
|
else throw "Target specification with 3 components is ambiguous";
|
||||||
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
|
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
|
||||||
}.${toString (length l)}
|
}.${toString (length l)}
|
||||||
|
|
|
@ -12,16 +12,17 @@ let
|
||||||
expected = lib.sort lib.lessThan y;
|
expected = lib.sort lib.lessThan y;
|
||||||
};
|
};
|
||||||
in with lib.systems.doubles; lib.runTests {
|
in with lib.systems.doubles; lib.runTests {
|
||||||
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ js);
|
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ js ++ genode);
|
||||||
|
|
||||||
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv6l-none" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
|
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv6l-none" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
|
||||||
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
|
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
|
||||||
testmips = mseteq mips [ "mipsel-linux" ];
|
testmips = mseteq mips [ "mipsel-linux" ];
|
||||||
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
|
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-genode" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
|
||||||
|
|
||||||
testcygwin = mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ];
|
testcygwin = mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ];
|
||||||
testdarwin = mseteq darwin [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ];
|
testdarwin = mseteq darwin [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ];
|
||||||
testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ];
|
testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ];
|
||||||
|
testgenode = mseteq genode [ "aarch64-genode" "x86_64-genode" ];
|
||||||
testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */);
|
testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */);
|
||||||
testillumos = mseteq illumos [ "x86_64-solaris" ];
|
testillumos = mseteq illumos [ "x86_64-solaris" ];
|
||||||
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
|
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
|
||||||
|
|
Loading…
Reference in a new issue