2
0
Fork 0

Update flake

This commit is contained in:
Ehmry - 2020-01-14 12:16:02 +01:00
parent e14f33934e
commit 7388091a3e
11 changed files with 233 additions and 194 deletions

View File

@ -15,41 +15,60 @@
"url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b" "url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b"
} }
}, },
"narHash": "sha256-NGbS2bymVuCQcanlBO41I6ZjSAZSLXhACK3qQU25zUs=", "narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=",
"originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake", "originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake",
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=256810cd5adf1ae5862eed0ffdaab4cf49f6fe67" "url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
}, },
"genode": { "genode": {
"inputs": { "inputs": {
"dhall-haskell": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-wJg4DA700SoQbEz61448sR6BgxRa1R92K3vvCV1g+HY=",
"originalUrl": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148",
"url": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148"
},
"nixpkgsStaticLinux": {
"inputs": {},
"narHash": "sha256-famU3pJZ4vkElV9qc71HmyRVSvcrAhfMZ0UJKpmmKP8=",
"originalUrl": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working",
"url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b"
}
},
"narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=",
"originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake",
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
},
"nixpkgs": { "nixpkgs": {
"inputs": {}, "inputs": {},
"narHash": "sha256-aFixJLbJ9ubH5I6ST8k9NRjb/d7o/MAu1Qc/1Sv6eRY=", "narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode", "originalUrl": "github:ehmry/nixpkgs",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=489c8ae221fde2b011ebfc207eb3acb6573816ce" "url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
} }
}, },
"narHash": "sha256-7X6XqNVzCzMRqq0LV+NLdfS1h7gWi+psnRNl4mwdPCY=", "narHash": "sha256-nQ42ujMS0QcOk0xCGzdsjZNQS2z3RuxthIRE8na5YL0=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git", "originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=32f8b603cb09bd85b8ad9092b55b4f3869da19d5" "url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=8c8606b375fb913864b0e51892da51eccf97df5f"
}, },
"genode-depot": { "genode-depot": {
"inputs": { "inputs": {
"nixpkgs": { "nixpkgs": {
"inputs": {}, "inputs": {},
"narHash": "sha256-aFixJLbJ9ubH5I6ST8k9NRjb/d7o/MAu1Qc/1Sv6eRY=", "narHash": "sha256-NB+H7zK3BB//zM127FqgbG4iAfY+nS/IOyO+uGWA5Ho=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode", "originalUrl": "nixpkgs",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=489c8ae221fde2b011ebfc207eb3acb6573816ce" "url": "github:edolstra/nixpkgs/7845bf5f4b3013df1cf036e9c9c3a55a30331db9"
} }
}, },
"narHash": "sha256-oPigZTib2kL1FVllm4xkf1l8eS9peXi1PFSdvrbYRK0=", "narHash": "sha256-72QPBUP9EaIPGneWDLYIb6Wo5XR/lmijobDlaX8iKHA=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git", "originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=a951bb013b0c053e858ccaf3672b7ab85580695d" "url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=4e85cc4dd28d868d28815be4c925b1bb64d19939"
}, },
"nixpkgs": { "nixpkgs": {
"inputs": {}, "inputs": {},
"narHash": "sha256-aFixJLbJ9ubH5I6ST8k9NRjb/d7o/MAu1Qc/1Sv6eRY=", "narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs?ref=genode", "originalUrl": "github:ehmry/nixpkgs",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs?ref=genode&rev=489c8ae221fde2b011ebfc207eb3acb6573816ce" "url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
} }
}, },
"version": 3 "version": 3

View File

@ -8,7 +8,7 @@
"git+https://github.com/dhall-lang/dhall-haskell?ref=flake"; "git+https://github.com/dhall-lang/dhall-haskell?ref=flake";
genode-depot.uri = "git+https://gitea.c3d2.de/ehmry/genode-depot.git"; genode-depot.uri = "git+https://gitea.c3d2.de/ehmry/genode-depot.git";
genode.uri = "git+https://gitea.c3d2.de/ehmry/genode.git"; genode.uri = "git+https://gitea.c3d2.de/ehmry/genode.git";
nixpkgs.uri = "git+https://gitea.c3d2.de/ehmry/nixpkgs?ref=genode"; nixpkgs.uri = "github:ehmry/nixpkgs";
}; };
outputs = { self, dhall-haskell, genode-depot, genode, nixpkgs }: outputs = { self, dhall-haskell, genode-depot, genode, nixpkgs }:

View File

@ -1,11 +1,15 @@
{ system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell, genode-depot }: { system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell, genode-depot }:
let let
thisSystem = builtins.getAttr system;
hostPkgs = import nixpkgs { hostPkgs = import nixpkgs {
system = localSystem; system = localSystem;
overlays = [ (self: super: { inherit (dhall-haskell.packages) dhall; }) ]; overlays = [
(self: super: {
inherit (builtins.getAttr localSystem dhall-haskell.packages) dhall;
})
];
}; };
thisSystem = builtins.getAttr system;
testPkgs = thisSystem genodepkgs.packages; testPkgs = thisSystem genodepkgs.packages;
depot = thisSystem genode-depot.packages; depot = thisSystem genode-depot.packages;
@ -132,7 +136,7 @@ in {
strip boot/image.elf strip boot/image.elf
# build ISO image # build ISO image
cp ${testPkgs.nova}/hypervisor* boot/hypervisor cp ${testPkgs.NOVA}/hypervisor* boot/hypervisor
cp ${./nova-isolinux.cfg} boot/syslinux/isolinux.cfg cp ${./nova-isolinux.cfg} boot/syslinux/isolinux.cfg
cp \ cp \
${syslinuxDir}/isolinux.bin \ ${syslinuxDir}/isolinux.bin \

View File

@ -3,12 +3,11 @@
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1 # SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
let let
tests = call: { tests = call:
fs_report = call ./fs_report.nix { }; {
log = call ./log.nix { }; fs_report = call ./fs_report.nix { };
signal = call ./signal.nix { }; signal = call ./signal.nix { };
# solo5 = call ./solo5 { }; } // call ./solo5 { };
};
in { self, system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell, genode-depot, lib }: in { self, system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell, genode-depot, lib }:

View File

@ -1,8 +0,0 @@
let Genode = env:DHALL_GENODE ? ../dhall-genode/package.dhall
in λ(_ : {})
→ Genode.Init::{
, verbose = True
, children =
toMap { test-log = Genode.Init.Start::{ binary = "test-log" } }
}

View File

@ -1,13 +0,0 @@
{ testEnv, pkgs, ... }:
with pkgs;
testEnv.mkTest rec {
name = "log";
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ];
testConfig = testEnv.lib.renderDhallInit ./log.dhall "{=}";
bootModules.test-log = "${base}/bin/test-log";
testScript = "run_genode_until {Test done.} 10";
}

View File

@ -1,24 +1,30 @@
let Genode = env:DHALL_GENODE let Genode = env:DHALL_GENODE
in λ(_ : {}) in λ(_ : {})
→ { solo5 = → Genode.Init::{
Genode.Init.Start::{ , children =
, binary = "test" toMap
, resources = { caps = 256, ram = Genode.units.MiB 3 } { solo5 =
, routes = Genode.Init.Start::{
[ Genode.ServiceRoute.parent "Timer" , binary = "test"
, Genode.ServiceRoute.child "Block" "block" , resources = { caps = 256, ram = Genode.units.MiB 3 }
] , routes =
} [ Genode.ServiceRoute.parent "Timer"
, block = , Genode.ServiceRoute.child "Block" "block"
Genode.Init.Start::{ ]
, binary = "ram_block" }
, provides = [ "Block" ] , block =
, resources = { caps = 96, ram = Genode.units.MiB 9 } Genode.Init.Start::{
, config = , binary = "ram_block"
Genode.Prelude.XML.text , provides = [ "Block" ]
'' , resources = { caps = 96, ram = Genode.units.MiB 9 }
<config size="8M" block_size="4096"/> , config =
'' Some
} ( Genode.Prelude.XML.text
''
<config size="8M" block_size="4096"/>
''
)
}
}
} }

View File

@ -1,4 +1,4 @@
{ testEnv, pkgs }: { testEnv, pkgs, ... }:
with pkgs; with pkgs;
let let
@ -28,7 +28,7 @@ let
name = "blk"; name = "blk";
bootModules = { bootModules = {
test = "${solo5.tests}/bin/solo5-test_blk"; test = "${solo5.tests}/bin/solo5-test_blk";
ram_block = "${genode-os}/bin/ram_block"; ram_block = "${os}/bin/ram_block";
}; };
testConfig = testEnv.lib.renderDhallInit ./blk.dhall "{=}"; testConfig = testEnv.lib.renderDhallInit ./blk.dhall "{=}";
} }
@ -69,7 +69,7 @@ let
name = "mft_maxdevices"; name = "mft_maxdevices";
bootModules = { bootModules = {
test = "${solo5.tests}/bin/solo5-test_mft_maxdevices"; test = "${solo5.tests}/bin/solo5-test_mft_maxdevices";
rom_block = "${genode-os}/bin/rom_block"; rom_block = "${os}/bin/rom_block";
}; };
testConfig = testEnv.lib.renderDhallInit ./mft_maxdevices.dhall "{=}"; testConfig = testEnv.lib.renderDhallInit ./mft_maxdevices.dhall "{=}";
} }
@ -79,9 +79,9 @@ let
name = "net"; name = "net";
bootModules = { bootModules = {
test = "${solo5.tests}/bin/solo5-test_net"; test = "${solo5.tests}/bin/solo5-test_net";
nic_bridge = "${genode-os}/bin/nic_bridge"; nic_bridge = "${os}/bin/nic_bridge";
nic_loopback = "${genode-os}/bin/nic_loopback"; nic_loopback = "${os}/bin/nic_loopback";
ping = "${genode-os}/bin/ping"; ping = "${os}/bin/ping";
}; };
testConfig = testEnv.lib.renderDhallInit ./net.dhall "{=}"; testConfig = testEnv.lib.renderDhallInit ./net.dhall "{=}";
testScript = '' testScript = ''
@ -93,10 +93,10 @@ let
name = "net_2if"; name = "net_2if";
bootModules = { bootModules = {
test = "${solo5.tests}/bin/solo5-test_net_2if"; test = "${solo5.tests}/bin/solo5-test_net_2if";
sequence = "${genode-os}/bin/sequence"; sequence = "${os}/bin/sequence";
nic_bridge = "${genode-os}/bin/nic_bridge"; nic_bridge = "${os}/bin/nic_bridge";
nic_loopback = "${genode-os}/bin/nic_loopback"; nic_loopback = "${os}/bin/nic_loopback";
ping = "${genode-os}/bin/ping"; ping = "${os}/bin/ping";
}; };
testConfig = testEnv.lib.renderDhallInit ./net_2if.dhall "{=}"; testConfig = testEnv.lib.renderDhallInit ./net_2if.dhall "{=}";
testScript = '' testScript = ''
@ -151,7 +151,7 @@ let
name = "time"; name = "time";
bootModules = { bootModules = {
test = "${solo5.tests}/bin/solo5-test_time"; test = "${solo5.tests}/bin/solo5-test_time";
rtc_drv = "${genode-os}/bin/rtc_drv"; rtc_drv = "${os}/bin/rtc_drv";
}; };
testConfig = testEnv.lib.renderDhallInit ./time.dhall "{=}"; testConfig = testEnv.lib.renderDhallInit ./time.dhall "{=}";
} }

View File

@ -1,53 +1,66 @@
let Genode = env:DHALL_GENODE let Genode = env:DHALL_GENODE
in λ(_ : {}) in λ(_ : {})
→ { nic = → Genode.Init::{
Genode.Init.Start::{ binary = "nic_loopback", provides = [ "Nic" ] } , children =
, bridge = toMap
Genode.Init.Start::{ { nic =
, binary = "nic_bridge" Genode.Init.Start::{
, resources = { caps = 200, ram = Genode.units.MiB 6 } , binary = "nic_loopback"
, provides = [ "Nic" ] , provides = [ "Nic" ]
, routes = [ Genode.ServiceRoute.child "Nic" "nic" ] }
, config = , bridge =
Genode.Prelude.XML.text Genode.Init.Start::{
'' , binary = "nic_bridge"
<config mac="02:02:02:02:03:00" verbose="no"> , resources = { caps = 200, ram = Genode.units.MiB 6 }
<policy label_prefix="solo5" ip_addr="10.0.0.2"/> , provides = [ "Nic" ]
<default-policy/> , routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
</config> , config =
'' Some
} ( Genode.Prelude.XML.text
, solo5 = ''
Genode.Init.Start::{ <config mac="02:02:02:02:03:00" verbose="no">
, binary = "test" <policy label_prefix="solo5" ip_addr="10.0.0.2"/>
, resources = { caps = 256, ram = Genode.units.MiB 3 } <default-policy/>
, routes = </config>
[ Genode.ServiceRoute.parent "Timer" ''
, Genode.ServiceRoute.child "Nic" "bridge" )
] }
, config = , solo5 =
Genode.Prelude.XML.text Genode.Init.Start::{
'' , binary = "test"
<config><cmdline>limit</cmdline></config> , resources = { caps = 256, ram = Genode.units.MiB 3 }
'' , routes =
} [ Genode.ServiceRoute.parent "Timer"
, ping = , Genode.ServiceRoute.child "Nic" "bridge"
Genode.Init.Start::{ ]
, binary = "ping" , config =
, resources = { caps = 128, ram = Genode.units.MiB 6 } Some
, routes = ( Genode.Prelude.XML.text
[ Genode.ServiceRoute.parent "Timer" ''
, Genode.ServiceRoute.child "Nic" "bridge" <config><cmdline>limit</cmdline></config>
] ''
, config = )
Genode.Prelude.XML.text }
'' , ping =
<config interface="10.0.0.72/24" Genode.Init.Start::{
dst_ip="10.0.0.2" , binary = "ping"
period_sec="1" , resources = { caps = 128, ram = Genode.units.MiB 6 }
verbose="no" , routes =
count="8"/> [ Genode.ServiceRoute.parent "Timer"
'' , Genode.ServiceRoute.child "Nic" "bridge"
} ]
, config =
Some
( Genode.Prelude.XML.text
''
<config interface="10.0.0.72/24"
dst_ip="10.0.0.2"
period_sec="1"
verbose="no"
count="8"/>
''
)
}
}
} }

View File

@ -3,59 +3,72 @@ let Genode = env:DHALL_GENODE
in λ ( _ in λ ( _
: {} : {}
) )
→ { nic = → Genode.Init::{
Genode.Init.Start::{ binary = "nic_loopback", provides = [ "Nic" ] } , children =
, bridge = toMap
Genode.Init.Start::{ { nic =
, binary = "nic_bridge" Genode.Init.Start::{
, resources = { caps = 200, ram = Genode.units.MiB 8 } , binary = "nic_loopback"
, provides = [ "Nic" ] , provides = [ "Nic" ]
, routes = [ Genode.ServiceRoute.child "Nic" "nic" ] }
, config = , bridge =
Genode.Prelude.XML.text Genode.Init.Start::{
'' , binary = "nic_bridge"
<config mac="02:02:02:02:03:00" verbose="no"> , resources = { caps = 200, ram = Genode.units.MiB 8 }
<policy label="solo5 -> service0" ip_addr="10.0.0.2"/> , provides = [ "Nic" ]
<policy label="solo5 -> service1" ip_addr="10.1.0.2"/> , routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
<default-policy/> , config =
</config> Some
'' ( Genode.Prelude.XML.text
} ''
, solo5 = <config mac="02:02:02:02:03:00" verbose="no">
Genode.Init.Start::{ <policy label="solo5 -> service0" ip_addr="10.0.0.2"/>
, binary = "test" <policy label="solo5 -> service1" ip_addr="10.1.0.2"/>
, resources = { caps = 256, ram = Genode.units.MiB 4 } <default-policy/>
, routes = </config>
[ Genode.ServiceRoute.parent "Timer" ''
, Genode.ServiceRoute.child "Nic" "bridge" )
] }
, config = , solo5 =
Genode.Prelude.XML.text Genode.Init.Start::{
'' , binary = "test"
<config><cmdline>limit</cmdline></config> , resources = { caps = 256, ram = Genode.units.MiB 4 }
'' , routes =
} [ Genode.ServiceRoute.parent "Timer"
, clients = , Genode.ServiceRoute.child "Nic" "bridge"
Genode.Init.Start::{ ]
, binary = "sequence" , config =
, resources = { caps = 256, ram = Genode.units.MiB 8 } Some
, routes = ( Genode.Prelude.XML.text
[ Genode.ServiceRoute.parent "Timer" ''
, Genode.ServiceRoute.child "Nic" "bridge" <config><cmdline>limit</cmdline></config>
] ''
, config = )
Genode.Prelude.XML.text }
'' , clients =
<config> Genode.Init.Start::{
<start name="ping0"> , binary = "sequence"
<binary name="ping"/> , resources = { caps = 256, ram = Genode.units.MiB 8 }
<config interface="10.0.0.72/24" dst_ip="10.0.0.2" period_sec="1" count="4"/> , routes =
</start> [ Genode.ServiceRoute.parent "Timer"
<start name="ping1"> , Genode.ServiceRoute.child "Nic" "bridge"
<binary name="ping"/> ]
<config interface="10.1.0.72/24" dst_ip="10.1.0.2" period_sec="1" count="4"/> , config =
</start> Some
</config> ( Genode.Prelude.XML.text
'' ''
} <config>
<start name="ping0">
<binary name="ping"/>
<config interface="10.0.0.72/24" dst_ip="10.0.0.2" period_sec="1" count="4"/>
</start>
<start name="ping1">
<binary name="ping"/>
<config interface="10.1.0.72/24" dst_ip="10.1.0.2" period_sec="1" count="4"/>
</start>
</config>
''
)
}
}
} }

View File

@ -1,17 +1,23 @@
let Genode = env:DHALL_GENODE let Genode = env:DHALL_GENODE
in λ(_ : {}) in λ(_ : {})
→ { solo5 = → Genode.Init::{
Genode.Init.Start::{ , children =
, binary = "test" toMap
, resources = { caps = 256, ram = Genode.units.MiB 3 } { solo5 =
, routes = [ Genode.ServiceRoute.parent "Timer" ] Genode.Init.Start::{
, config = , binary = "test"
Genode.Prelude.XML.text , resources = { caps = 256, ram = Genode.units.MiB 3 }
'' , routes = [ Genode.ServiceRoute.parent "Timer" ]
<config> , config =
<cmdline>Hello_Solo5</cmdline> Some
</config> ( Genode.Prelude.XML.text
'' ''
} <config>
<cmdline>Hello_Solo5</cmdline>
</config>
''
)
}
}
} }