Update to latest Dhall in Nixpkgs master
This commit is contained in:
parent
6d6d585f0f
commit
818014787f
|
@ -1,20 +1,62 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ nixpkgs, dhallApps, packages }:
|
{ self, nixpkgs, nixpkgsLocal, packages }:
|
||||||
|
|
||||||
rec {
|
let
|
||||||
|
dhallApps = let
|
||||||
linux-image =
|
mkApp = { drv, name ? drv.pname or drv.name, exe ? name }: {
|
||||||
let drv = import ./linux-image { inherit nixpkgs dhallApps packages; };
|
inherit name;
|
||||||
in {
|
value = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${drv}/bin/linux-image";
|
program = "${drv}/bin/${exe}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
in builtins.listToAttrs [
|
||||||
|
(mkApp { drv = nixpkgsLocal.dhall; })
|
||||||
|
|
||||||
|
(mkApp {
|
||||||
|
drv = nixpkgsLocal.dhall-bash;
|
||||||
|
name = "dhall-to-bash";
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkApp {
|
||||||
|
drv = nixpkgsLocal.dhall-json;
|
||||||
|
name = "dhall-to-json";
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkApp {
|
||||||
|
drv = nixpkgsLocal.dhall-json;
|
||||||
|
name = "json-to-dhall";
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkApp {
|
||||||
|
drv = nixpkgsLocal.dhall-json;
|
||||||
|
name = "dhall-to-yaml";
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkApp {
|
||||||
|
drv = nixpkgsLocal.dhall-json;
|
||||||
|
name = "yaml-to-dhall";
|
||||||
|
})
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
in dhallApps // {
|
||||||
|
|
||||||
|
linux-image = let
|
||||||
|
drv = import ./linux-image {
|
||||||
|
apps = self;
|
||||||
|
inherit nixpkgs packages;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
type = "app";
|
||||||
|
program = "${drv}/bin/linux-image";
|
||||||
|
};
|
||||||
|
|
||||||
generate-manifest = let
|
generate-manifest = let
|
||||||
drv = import ./generate-manifest {
|
drv = import ./generate-manifest {
|
||||||
stdenv = packages.stdenv;
|
stdenv = packages.stdenv;
|
||||||
inherit nixpkgs dhallApps;
|
inherit nixpkgs;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
@ -24,7 +66,8 @@ rec {
|
||||||
hw-image = let
|
hw-image = let
|
||||||
drv = import ./hw-image {
|
drv = import ./hw-image {
|
||||||
stdenv = packages.stdenv;
|
stdenv = packages.stdenv;
|
||||||
inherit nixpkgs dhallApps packages;
|
apps = self;
|
||||||
|
inherit nixpkgs packages;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
@ -37,7 +80,8 @@ rec {
|
||||||
nova-image = let
|
nova-image = let
|
||||||
drv = import ./nova-image {
|
drv = import ./nova-image {
|
||||||
stdenv = packages.stdenv;
|
stdenv = packages.stdenv;
|
||||||
inherit nixpkgs dhallApps packages;
|
apps = self;
|
||||||
|
inherit nixpkgs packages;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
@ -50,7 +94,8 @@ rec {
|
||||||
hw-iso = let
|
hw-iso = let
|
||||||
drv = import ./hw-iso {
|
drv = import ./hw-iso {
|
||||||
stdenv = packages.stdenv;
|
stdenv = packages.stdenv;
|
||||||
inherit nixpkgs packages hw-image;
|
inherit nixpkgs packages;
|
||||||
|
inherit (self) hw-image;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
@ -63,7 +108,8 @@ rec {
|
||||||
nova-iso = let
|
nova-iso = let
|
||||||
drv = import ./nova-iso {
|
drv = import ./nova-iso {
|
||||||
stdenv = packages.stdenv;
|
stdenv = packages.stdenv;
|
||||||
inherit nixpkgs packages nova-image;
|
inherit nixpkgs packages;
|
||||||
|
inherit (self) nova-image;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
@ -73,11 +119,14 @@ rec {
|
||||||
''XDG_CACHE_HOME=$TMPDIR ${drv}/bin/nova-iso "${bootDesc}" > $out'';
|
''XDG_CACHE_HOME=$TMPDIR ${drv}/bin/nova-iso "${bootDesc}" > $out'';
|
||||||
};
|
};
|
||||||
|
|
||||||
render-init =
|
render-init = let
|
||||||
let drv = import ./render-init { inherit nixpkgs dhallApps packages; };
|
drv = import ./render-init {
|
||||||
in {
|
apps = self;
|
||||||
type = "app";
|
inherit nixpkgs packages;
|
||||||
program = "${drv}/bin/render-init";
|
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
|
type = "app";
|
||||||
|
program = "${drv}/bin/render-init";
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ stdenv, nixpkgs, dhallApps }:
|
{ stdenv, nixpkgs }:
|
||||||
|
|
||||||
with nixpkgs.buildPackages;
|
with nixpkgs.buildPackages;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ stdenv, nixpkgs, dhallApps, packages }:
|
{ stdenv, nixpkgs, apps, packages }:
|
||||||
|
|
||||||
let inherit (packages) genodeSources base-hw-pc;
|
let inherit (packages) genodeSources base-hw-pc;
|
||||||
in nixpkgs.writeScriptBin "hw-image" (with nixpkgs.buildPackages;
|
in nixpkgs.writeScriptBin "hw-image" (with nixpkgs.buildPackages;
|
||||||
|
@ -16,14 +16,13 @@ in nixpkgs.writeScriptBin "hw-image" (with nixpkgs.buildPackages;
|
||||||
TMPDIR="$(${coreutils}/bin/mktemp -d)"
|
TMPDIR="$(${coreutils}/bin/mktemp -d)"
|
||||||
trap "rm -rf $TMPDIR" err exit
|
trap "rm -rf $TMPDIR" err exit
|
||||||
|
|
||||||
export DHALL_PRELUDE=${packages.dhallPrelude}/package.dhall
|
export DHALL_GENODE=${packages.dhallGenode}/source.dhall
|
||||||
export DHALL_GENODE=${packages.dhallGenode}/package.dhall
|
|
||||||
|
|
||||||
build_core() {
|
build_core() {
|
||||||
local lib="$1"
|
local lib="$1"
|
||||||
local modules="$2"
|
local modules="$2"
|
||||||
local link_address="$3"
|
local link_address="$3"
|
||||||
${dhallApps.dhall.program} text <<< \
|
${apps.dhall.program} text <<< \
|
||||||
"(${../modules.as.dhall}).to64bitImage ($modules)" \
|
"(${../modules.as.dhall}).to64bitImage ($modules)" \
|
||||||
> "$TMPDIR/modules.as"
|
> "$TMPDIR/modules.as"
|
||||||
|
|
||||||
|
@ -40,14 +39,14 @@ in nixpkgs.writeScriptBin "hw-image" (with nixpkgs.buildPackages;
|
||||||
cat a.out
|
cat a.out
|
||||||
}
|
}
|
||||||
|
|
||||||
${dhallApps.dhall.program} text \
|
${apps.dhall.program} text \
|
||||||
<<< "(env:DHALL_GENODE).Init.render ($@).config" \
|
<<< "(env:DHALL_GENODE).Init.render ($@).config" \
|
||||||
| ${nixpkgs.buildPackages.libxml2}/bin/xmllint \
|
| ${nixpkgs.buildPackages.libxml2}/bin/xmllint \
|
||||||
-schema ${packages.genodeSources}/repos/os/src/init/config.xsd - \
|
-schema ${packages.genodeSources}/repos/os/src/init/config.xsd - \
|
||||||
| sed 's/>/>/g' \
|
| sed 's/>/>/g' \
|
||||||
> $TMPDIR/config
|
> $TMPDIR/config
|
||||||
|
|
||||||
${dhallApps.dhall.program} \
|
${apps.dhall.program} \
|
||||||
<<< "${../insert-config-rom.dhall} \"$TMPDIR/config\" ($@).rom" \
|
<<< "${../insert-config-rom.dhall} \"$TMPDIR/config\" ($@).rom" \
|
||||||
> "$TMPDIR/modules.dhall"
|
> "$TMPDIR/modules.dhall"
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ nixpkgs, dhallApps, packages }:
|
{ nixpkgs, apps, packages }:
|
||||||
|
|
||||||
nixpkgs.writeScriptBin "linux-image" (with nixpkgs.buildPackages; ''
|
nixpkgs.writeScriptBin "linux-image" (with nixpkgs.buildPackages; ''
|
||||||
#!${runtimeShell}
|
#!${runtimeShell}
|
||||||
set -eu
|
set -eu
|
||||||
export DHALL_PRELUDE=''${DHALL_PRELUDE:-${packages.dhallPrelude}/package.dhall}
|
export DHALL_GENODE=''${DHALL_GENODE:-${packages.dhallGenode}/source.dhall}
|
||||||
export DHALL_GENODE=''${DHALL_GENODE:-${packages.dhallGenode}/package.dhall}
|
${apps.dhall.program} text <<< "${./script.dhall} ($@)" > boot.sh
|
||||||
${dhallApps.dhall.program} text <<< "${./script.dhall} ($@)" > boot.sh
|
|
||||||
source boot.sh
|
source boot.sh
|
||||||
rm boot.sh
|
rm boot.sh
|
||||||
'')
|
'')
|
||||||
|
|
|
@ -9,17 +9,14 @@ let BootModules = Genode.BootModules
|
||||||
let RomEntry = Prelude.Map.Entry Text BootModules.ROM.Type
|
let RomEntry = Prelude.Map.Entry Text BootModules.ROM.Type
|
||||||
|
|
||||||
let compile =
|
let compile =
|
||||||
λ ( addressType
|
λ(addressType : Text)
|
||||||
: Text
|
|
||||||
)
|
|
||||||
→ λ(rom : Prelude.Map.Type Text BootModules.ROM.Type)
|
→ λ(rom : Prelude.Map.Type Text BootModules.ROM.Type)
|
||||||
→ let NaturalIndex =
|
→ let NaturalIndex = { index : Natural, value : Text }
|
||||||
{ index : Natural, value : Text }
|
|
||||||
|
|
||||||
let TextIndex = { index : Text, value : Text }
|
let TextIndex = { index : Text, value : Text }
|
||||||
|
|
||||||
let moduleKeys = Prelude.Map.keys Text BootModules.ROM.Type rom
|
let moduleKeys = Prelude.Map.keys Text BootModules.ROM.Type rom
|
||||||
|
|
||||||
let moduleValues =
|
let moduleValues =
|
||||||
let f =
|
let f =
|
||||||
λ(e : RomEntry)
|
λ(e : RomEntry)
|
||||||
|
@ -28,14 +25,14 @@ let compile =
|
||||||
, RomPath = λ(path : Text) → ".incbin ${Text/show path}"
|
, RomPath = λ(path : Text) → ".incbin ${Text/show path}"
|
||||||
}
|
}
|
||||||
e.mapValue
|
e.mapValue
|
||||||
|
|
||||||
in Prelude.List.map RomEntry Text f rom
|
in Prelude.List.map RomEntry Text f rom
|
||||||
|
|
||||||
let map =
|
let map =
|
||||||
λ(list : List Text)
|
λ(list : List Text)
|
||||||
→ λ(f : TextIndex → Text)
|
→ λ(f : TextIndex → Text)
|
||||||
→ let indexedNatural = Prelude.List.indexed Text list
|
→ let indexedNatural = Prelude.List.indexed Text list
|
||||||
|
|
||||||
let indexed =
|
let indexed =
|
||||||
Prelude.List.map
|
Prelude.List.map
|
||||||
NaturalIndex
|
NaturalIndex
|
||||||
|
@ -46,30 +43,28 @@ let compile =
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
indexedNatural
|
indexedNatural
|
||||||
|
|
||||||
let texts = Prelude.List.map TextIndex Text f indexed
|
let texts = Prelude.List.map TextIndex Text f indexed
|
||||||
|
|
||||||
in Prelude.Text.concatSep "\n" texts
|
in Prelude.Text.concatSep "\n" texts
|
||||||
|
|
||||||
let mapNames = map moduleKeys
|
let mapNames = map moduleKeys
|
||||||
|
|
||||||
let mapValues = map moduleValues
|
let mapValues = map moduleValues
|
||||||
|
|
||||||
in ''
|
in ''
|
||||||
.set MIN_PAGE_SIZE_LOG2, 12
|
.set MIN_PAGE_SIZE_LOG2, 12
|
||||||
.set DATA_ACCESS_ALIGNM_LOG2, 3
|
.set DATA_ACCESS_ALIGNM_LOG2, 3
|
||||||
|
|
||||||
.section .data
|
.section .data
|
||||||
|
|
||||||
.p2align DATA_ACCESS_ALIGNM_LOG2
|
.p2align DATA_ACCESS_ALIGNM_LOG2
|
||||||
.global _boot_modules_headers_begin
|
.global _boot_modules_headers_begin
|
||||||
_boot_modules_headers_begin:
|
_boot_modules_headers_begin:
|
||||||
|
|
||||||
''
|
''
|
||||||
++ mapNames
|
++ mapNames
|
||||||
( λ ( m
|
( λ(m : TextIndex)
|
||||||
: TextIndex
|
|
||||||
)
|
|
||||||
→ ''
|
→ ''
|
||||||
${addressType} _boot_module_${m.index}_name
|
${addressType} _boot_module_${m.index}_name
|
||||||
${addressType} _boot_module_${m.index}_begin
|
${addressType} _boot_module_${m.index}_begin
|
||||||
|
@ -79,7 +74,7 @@ let compile =
|
||||||
++ ''
|
++ ''
|
||||||
.global _boot_modules_headers_end
|
.global _boot_modules_headers_end
|
||||||
_boot_modules_headers_end:
|
_boot_modules_headers_end:
|
||||||
|
|
||||||
''
|
''
|
||||||
++ mapNames
|
++ mapNames
|
||||||
( λ(m : TextIndex)
|
( λ(m : TextIndex)
|
||||||
|
@ -88,15 +83,15 @@ let compile =
|
||||||
_boot_module_${m.index}_name:
|
_boot_module_${m.index}_name:
|
||||||
.string "${m.value}"
|
.string "${m.value}"
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
++ ''
|
++ ''
|
||||||
.section .data.boot_modules_binaries
|
.section .data.boot_modules_binaries
|
||||||
|
|
||||||
.global _boot_modules_binaries_begin
|
.global _boot_modules_binaries_begin
|
||||||
_boot_modules_binaries_begin:
|
_boot_modules_binaries_begin:
|
||||||
|
|
||||||
''
|
''
|
||||||
++ mapValues
|
++ mapValues
|
||||||
( λ(m : TextIndex)
|
( λ(m : TextIndex)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ stdenv, nixpkgs, dhallApps, packages }:
|
{ stdenv, nixpkgs, apps, packages }:
|
||||||
|
|
||||||
let inherit (packages) genodeSources base-nova;
|
let inherit (packages) genodeSources base-nova;
|
||||||
in nixpkgs.writeScriptBin "nova-image" (with nixpkgs.buildPackages;
|
in nixpkgs.writeScriptBin "nova-image" (with nixpkgs.buildPackages;
|
||||||
|
@ -16,17 +16,16 @@ in nixpkgs.writeScriptBin "nova-image" (with nixpkgs.buildPackages;
|
||||||
TMPDIR="$(${coreutils}/bin/mktemp -d)"
|
TMPDIR="$(${coreutils}/bin/mktemp -d)"
|
||||||
trap "rm -rf $TMPDIR" err exit
|
trap "rm -rf $TMPDIR" err exit
|
||||||
|
|
||||||
export DHALL_PRELUDE=${packages.dhallPrelude}/package.dhall
|
export DHALL_GENODE=${packages.dhallGenode}/source.dhall
|
||||||
export DHALL_GENODE=${packages.dhallGenode}/package.dhall
|
|
||||||
|
|
||||||
${dhallApps.dhall.program} text \
|
${apps.dhall.program} text \
|
||||||
<<< "(env:DHALL_GENODE).Init.render ($@).config" \
|
<<< "(env:DHALL_GENODE).Init.render ($@).config" \
|
||||||
| ${nixpkgs.buildPackages.libxml2}/bin/xmllint \
|
| ${nixpkgs.buildPackages.libxml2}/bin/xmllint \
|
||||||
-schema ${packages.genodeSources}/repos/os/src/init/config.xsd - \
|
-schema ${packages.genodeSources}/repos/os/src/init/config.xsd - \
|
||||||
| sed 's/>/>/g' \
|
| sed 's/>/>/g' \
|
||||||
> $TMPDIR/config
|
> $TMPDIR/config
|
||||||
|
|
||||||
${dhallApps.dhall.program} text \
|
${apps.dhall.program} text \
|
||||||
<<< "(${../modules.as.dhall}).to64bitImage (${
|
<<< "(${../modules.as.dhall}).to64bitImage (${
|
||||||
../insert-config-rom.dhall
|
../insert-config-rom.dhall
|
||||||
} \"$TMPDIR/config\" ($@).rom)" \
|
} \"$TMPDIR/config\" ($@).rom)" \
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ nixpkgs, dhallApps, packages }:
|
{ nixpkgs, apps, packages }:
|
||||||
|
|
||||||
nixpkgs.writeScriptBin "render-init" (with nixpkgs.buildPackages; ''
|
nixpkgs.writeScriptBin "render-init" (with nixpkgs.buildPackages; ''
|
||||||
#!${runtimeShell}
|
#!${runtimeShell}
|
||||||
set -eu
|
set -eu
|
||||||
export DHALL_PRELUDE=''${DHALL_PRELUDE:-${packages.dhallPrelude}/package.dhall}
|
export DHALL_GENODE=''${DHALL_GENODE:-${packages.dhallGenode}/source.dhall}
|
||||||
export DHALL_GENODE=''${DHALL_GENODE:-${packages.dhallGenode}/package.dhall}
|
${apps.dhall.program} text \
|
||||||
${dhallApps.dhall.program} text \
|
|
||||||
<<< "(env:DHALL_GENODE).Init.render ($(cat))" \
|
<<< "(env:DHALL_GENODE).Init.render ($(cat))" \
|
||||||
| ${nixpkgs.buildPackages.libxml2}/bin/xmllint \
|
| ${nixpkgs.buildPackages.libxml2}/bin/xmllint \
|
||||||
-format \
|
-format \
|
||||||
|
|
|
@ -8,7 +8,7 @@ let render =
|
||||||
Genode.BootModules.toRomTexts
|
Genode.BootModules.toRomTexts
|
||||||
(toMap { config = Genode.Init.render boot.config })
|
(toMap { config = Genode.Init.render boot.config })
|
||||||
# boot.rom
|
# boot.rom
|
||||||
|
|
||||||
in rom
|
in rom
|
||||||
|
|
||||||
in render
|
in render
|
||||||
|
|
|
@ -26,236 +26,238 @@ let relabel =
|
||||||
let drivers =
|
let drivers =
|
||||||
Init::{
|
Init::{
|
||||||
, services =
|
, services =
|
||||||
[ ServiceRoute.child "Framebuffer" "dynamic"
|
[ ServiceRoute.child "Framebuffer" "dynamic"
|
||||||
, ServiceRoute.child "Block" "dynamic"
|
, ServiceRoute.child "Block" "dynamic"
|
||||||
, ServiceRoute.child "Usb" "usb_drv"
|
, ServiceRoute.child "Usb" "usb_drv"
|
||||||
, ServiceRoute.child "Platform" "platform_drv"
|
, ServiceRoute.child "Platform" "platform_drv"
|
||||||
, ServiceRoute.child "Input" "input_filter"
|
, ServiceRoute.child "Input" "input_filter"
|
||||||
, ServiceRoute.child "Rtc" "rtc"
|
, ServiceRoute.child "Rtc" "rtc"
|
||||||
]
|
]
|
||||||
, children =
|
, children = toMap
|
||||||
toMap
|
{ rtc =
|
||||||
{ rtc =
|
Child.flat
|
||||||
Child.flat
|
Child.Attributes::{
|
||||||
Child.Attributes::{
|
, binary = "rtc_drv"
|
||||||
, binary = "rtc_drv"
|
, provides = [ "Rtc" ]
|
||||||
, provides = [ "Rtc" ]
|
, routes =
|
||||||
, routes =
|
[ ServiceRoute.parent "IO_PORT"
|
||||||
[ ServiceRoute.parent "IO_PORT"
|
, ServiceRoute.parent "IO_MEM"
|
||||||
, ServiceRoute.parent "IO_MEM"
|
]
|
||||||
]
|
}
|
||||||
|
, rom_reporter =
|
||||||
|
Child.flat
|
||||||
|
Child.Attributes::{
|
||||||
|
, binary = "rom_reporter"
|
||||||
|
, config = Init.Config::{
|
||||||
|
, content =
|
||||||
|
[ XML.text
|
||||||
|
''
|
||||||
|
<rom label="acpi"/>
|
||||||
|
<rom label="pci_devices"/>
|
||||||
|
<rom label="usb_devices"/>
|
||||||
|
''
|
||||||
|
]
|
||||||
}
|
}
|
||||||
, rom_reporter =
|
, reportRoms =
|
||||||
Child.flat
|
[ label "acpi", label "pci_devices", label "usb_devices" ]
|
||||||
Child.Attributes::{
|
, routes =
|
||||||
, binary = "rom_reporter"
|
let routeReportToParent =
|
||||||
, config =
|
λ(label : Text)
|
||||||
Init.Config::{
|
→ ServiceRoute.parentLabel
|
||||||
, content =
|
"Report"
|
||||||
[ XML.text
|
(Some label)
|
||||||
''
|
(Some label)
|
||||||
<rom label="acpi"/>
|
|
||||||
<rom label="pci_devices"/>
|
in [ routeReportToParent "acpi"
|
||||||
<rom label="usb_devices"/>
|
, routeReportToParent "pci_devices"
|
||||||
''
|
, routeReportToParent "usb_devices"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, reportRoms =
|
, acpi_drv =
|
||||||
[ label "acpi", label "pci_devices", label "usb_devices" ]
|
Child.flat
|
||||||
, routes =
|
Child.Attributes::{
|
||||||
let routeReportToParent =
|
, binary = "acpi_drv"
|
||||||
λ(label : Text)
|
, priority = 1
|
||||||
→ ServiceRoute.parentLabel
|
, resources = Resources::{
|
||||||
"Report"
|
, caps = 350
|
||||||
(Some label)
|
, ram = Genode.units.MiB 4
|
||||||
(Some label)
|
|
||||||
|
|
||||||
in [ routeReportToParent "acpi"
|
|
||||||
, routeReportToParent "pci_devices"
|
|
||||||
, routeReportToParent "usb_devices"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
, acpi_drv =
|
, romReports = [ label "acpi" ]
|
||||||
Child.flat
|
, routes =
|
||||||
Child.Attributes::{
|
[ ServiceRoute.parent "IO_MEM"
|
||||||
, binary = "acpi_drv"
|
, ServiceRoute.parentLabel
|
||||||
, priority = 1
|
"Report"
|
||||||
, resources =
|
(Some "smbios_table")
|
||||||
Resources::{ caps = 350, ram = Genode.units.MiB 4 }
|
(Some "smbios_table")
|
||||||
, romReports = [ label "acpi" ]
|
]
|
||||||
, routes =
|
}
|
||||||
[ ServiceRoute.parent "IO_MEM"
|
, platform_drv =
|
||||||
, ServiceRoute.parentLabel
|
Child.flat
|
||||||
"Report"
|
Child.Attributes::{
|
||||||
(Some "smbios_table")
|
, binary = "platform_drv"
|
||||||
(Some "smbios_table")
|
, resources = Resources::{
|
||||||
]
|
, caps = 400
|
||||||
|
, ram = Genode.units.MiB 4
|
||||||
|
, constrainPhys = True
|
||||||
}
|
}
|
||||||
, platform_drv =
|
, provides = [ "Acpi", "Platform" ]
|
||||||
Child.flat
|
, reportRoms = [ label "acpi" ]
|
||||||
Child.Attributes::{
|
, romReports = [ relabel "pci" "pci_devices" ]
|
||||||
, binary = "platform_drv"
|
, routes =
|
||||||
, resources =
|
[ ServiceRoute.parent "IRQ"
|
||||||
Resources::{
|
, ServiceRoute.parent "IO_MEM"
|
||||||
, caps = 400
|
, ServiceRoute.parent "IO_PORT"
|
||||||
, ram = Genode.units.MiB 4
|
, ServiceRoute.parent "Timer"
|
||||||
, constrainPhys = True
|
, ServiceRoute.parentLabel
|
||||||
}
|
"ROM"
|
||||||
, provides = [ "Acpi", "Platform" ]
|
(Some "system")
|
||||||
, reportRoms = [ label "acpi" ]
|
(Some "system")
|
||||||
, romReports = [ relabel "pci" "pci_devices" ]
|
]
|
||||||
, routes =
|
, config = Init.Config::{
|
||||||
[ ServiceRoute.parent "IRQ"
|
, attributes = toMap { system = "yes" }
|
||||||
, ServiceRoute.parent "IO_MEM"
|
, content =
|
||||||
, ServiceRoute.parent "IO_PORT"
|
[ XML.text
|
||||||
, ServiceRoute.parent "Timer"
|
''
|
||||||
, ServiceRoute.parentLabel
|
<report pci="yes"/>
|
||||||
"ROM"
|
<policy label_prefix="ps2_drv">
|
||||||
(Some "system")
|
<device name="PS2"/>
|
||||||
(Some "system")
|
</policy>
|
||||||
]
|
<policy label_prefix="dynamic -> vesa_fb_drv">
|
||||||
, config =
|
<pci class="VGA"/>
|
||||||
Init.Config::{
|
</policy>
|
||||||
, attributes = toMap { system = "yes" }
|
<policy label_prefix="dynamic -> ahci_drv">
|
||||||
, content =
|
<pci class="AHCI"/>
|
||||||
[ XML.text
|
</policy>
|
||||||
''
|
<policy label_prefix="dynamic -> nvme_drv">
|
||||||
<report pci="yes"/>
|
<pci class="NVME"/>
|
||||||
<policy label_prefix="ps2_drv">
|
</policy>
|
||||||
<device name="PS2"/>
|
<policy label_prefix="usb_drv">
|
||||||
</policy>
|
<pci class="USB"/>
|
||||||
<policy label_prefix="dynamic -> vesa_fb_drv">
|
</policy>
|
||||||
<pci class="VGA"/>
|
<policy label_prefix="dynamic -> intel_fb_drv">
|
||||||
</policy>
|
<pci class="VGA"/>
|
||||||
<policy label_prefix="dynamic -> ahci_drv">
|
<pci bus="0" device="0" function="0"/>
|
||||||
<pci class="AHCI"/>
|
<pci class="ISABRIDGE"/>
|
||||||
</policy>
|
</policy>
|
||||||
<policy label_prefix="dynamic -> nvme_drv">
|
<policy label_suffix="-> wifi">
|
||||||
<pci class="NVME"/>
|
<pci class="WIFI"/>
|
||||||
</policy>
|
</policy>
|
||||||
<policy label_prefix="usb_drv">
|
<policy label_suffix="-> nic">
|
||||||
<pci class="USB"/>
|
<pci class="ETHERNET"/>
|
||||||
</policy>
|
</policy>
|
||||||
<policy label_prefix="dynamic -> intel_fb_drv">
|
<policy label_suffix="-> audio">
|
||||||
<pci class="VGA"/>
|
<pci class="AUDIO"/>
|
||||||
<pci bus="0" device="0" function="0"/>
|
<pci class="HDAUDIO"/>
|
||||||
<pci class="ISABRIDGE"/>
|
</policy>
|
||||||
</policy>
|
<policy label="acpica"/>
|
||||||
<policy label_suffix="-> wifi">
|
''
|
||||||
<pci class="WIFI"/>
|
]
|
||||||
</policy>
|
|
||||||
<policy label_suffix="-> nic">
|
|
||||||
<pci class="ETHERNET"/>
|
|
||||||
</policy>
|
|
||||||
<policy label_suffix="-> audio">
|
|
||||||
<pci class="AUDIO"/>
|
|
||||||
<pci class="HDAUDIO"/>
|
|
||||||
</policy>
|
|
||||||
<policy label="acpica"/>
|
|
||||||
''
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
, usb_drv =
|
}
|
||||||
Child.flat
|
, usb_drv =
|
||||||
Child.Attributes::{
|
Child.flat
|
||||||
, binary = "usb_drv"
|
Child.Attributes::{
|
||||||
, priority = 1
|
, binary = "usb_drv"
|
||||||
, resources =
|
, priority = 1
|
||||||
Resources::{ caps = 200, ram = Genode.units.MiB 16 }
|
, resources = Resources::{
|
||||||
, provides = [ "Input", "Usb" ]
|
, caps = 200
|
||||||
, reportRoms = [ relabel "config" "usb_drv.config" ]
|
, ram = Genode.units.MiB 16
|
||||||
, romReports = [ relabel "devices" "usb_devices" ]
|
|
||||||
, routes =
|
|
||||||
[ ServiceRoute.child "Platform" "platform_drv"
|
|
||||||
, ServiceRoute.parentLabel
|
|
||||||
"Report"
|
|
||||||
(Some "config")
|
|
||||||
(Some "usb_active_config")
|
|
||||||
, ServiceRoute.parent "Timer"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
, ps2_drv =
|
, provides = [ "Input", "Usb" ]
|
||||||
Child.flat
|
, reportRoms = [ relabel "config" "usb_drv.config" ]
|
||||||
Child.Attributes::{
|
, romReports = [ relabel "devices" "usb_devices" ]
|
||||||
, binary = "ps2_drv"
|
, routes =
|
||||||
, provides = [ "Input" ]
|
[ ServiceRoute.child "Platform" "platform_drv"
|
||||||
, routes =
|
, ServiceRoute.parentLabel
|
||||||
[ ServiceRoute.child "Platform" "platform_drv"
|
"Report"
|
||||||
, ServiceRoute.parent "Timer"
|
(Some "config")
|
||||||
]
|
(Some "usb_active_config")
|
||||||
|
, ServiceRoute.parent "Timer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
, ps2_drv =
|
||||||
|
Child.flat
|
||||||
|
Child.Attributes::{
|
||||||
|
, binary = "ps2_drv"
|
||||||
|
, provides = [ "Input" ]
|
||||||
|
, routes =
|
||||||
|
[ ServiceRoute.child "Platform" "platform_drv"
|
||||||
|
, ServiceRoute.parent "Timer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
, input_filter =
|
||||||
|
Child.flat
|
||||||
|
Child.Attributes::{
|
||||||
|
, binary = "input_filter"
|
||||||
|
, priority = 1
|
||||||
|
, resources = Resources::{ ram = Genode.units.MiB 2 }
|
||||||
|
, provides = [ "Input" ]
|
||||||
|
, routes =
|
||||||
|
[ ServiceRoute.parent "Timer"
|
||||||
|
, ServiceRoute.parentLabel
|
||||||
|
"ROM"
|
||||||
|
(Some "config")
|
||||||
|
(Some "input_filter.config")
|
||||||
|
, ServiceRoute.childLabel
|
||||||
|
"Input"
|
||||||
|
"ps2_drv"
|
||||||
|
(Some "ps2")
|
||||||
|
(None Text)
|
||||||
|
, ServiceRoute.childLabel
|
||||||
|
"Input"
|
||||||
|
"usb_drv"
|
||||||
|
(Some "usb")
|
||||||
|
(None Text)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
, driver_manager =
|
||||||
|
Child.flat
|
||||||
|
Child.Attributes::{
|
||||||
|
, binary = "driver_manager"
|
||||||
|
, priority = 1
|
||||||
|
, reportRoms =
|
||||||
|
[ label "ahci_ports"
|
||||||
|
, label "nvme_ns"
|
||||||
|
, label "pci_devices"
|
||||||
|
, label "usb_devices"
|
||||||
|
]
|
||||||
|
, romReports =
|
||||||
|
[ relabel "init.config" "dynamic.config"
|
||||||
|
, label "usb_drv.config"
|
||||||
|
]
|
||||||
|
, routes =
|
||||||
|
[ ServiceRoute.parentLabel
|
||||||
|
"Report"
|
||||||
|
(Some "block_devices")
|
||||||
|
(Some "block_devices")
|
||||||
|
, ServiceRoute.parentLabel
|
||||||
|
"ROM"
|
||||||
|
(Some "usb_policy")
|
||||||
|
(Some "usb_policy")
|
||||||
|
]
|
||||||
|
}
|
||||||
|
, dynamic =
|
||||||
|
Child.flat
|
||||||
|
Child.Attributes::{
|
||||||
|
, binary = "init"
|
||||||
|
, priority = 1
|
||||||
|
, resources = Resources::{
|
||||||
|
, caps = 1400
|
||||||
|
, ram = Genode.units.MiB 64
|
||||||
}
|
}
|
||||||
, input_filter =
|
, provides = [ "Framebuffer", "Block" ]
|
||||||
Child.flat
|
, romReports = [ label "ahci_ports", label "nvme_ns" ]
|
||||||
Child.Attributes::{
|
, reportRoms = [ relabel "config" "dynamic.config" ]
|
||||||
, binary = "input_filter"
|
, routes =
|
||||||
, priority = 1
|
[ ServiceRoute.child "Platform" "platform_drv"
|
||||||
, resources = Resources::{ ram = Genode.units.MiB 2 }
|
, ServiceRoute.child "Usb" "usb_drv"
|
||||||
, provides = [ "Input" ]
|
, ServiceRoute.parent "Timer"
|
||||||
, routes =
|
, ServiceRoute.parent "Report"
|
||||||
[ ServiceRoute.parent "Timer"
|
, ServiceRoute.parent "IO_MEM"
|
||||||
, ServiceRoute.parentLabel
|
, ServiceRoute.parent "IO_PORT"
|
||||||
"ROM"
|
]
|
||||||
(Some "config")
|
}
|
||||||
(Some "input_filter.config")
|
}
|
||||||
, ServiceRoute.childLabel
|
|
||||||
"Input"
|
|
||||||
"ps2_drv"
|
|
||||||
(Some "ps2")
|
|
||||||
(None Text)
|
|
||||||
, ServiceRoute.childLabel
|
|
||||||
"Input"
|
|
||||||
"usb_drv"
|
|
||||||
(Some "usb")
|
|
||||||
(None Text)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
, driver_manager =
|
|
||||||
Child.flat
|
|
||||||
Child.Attributes::{
|
|
||||||
, binary = "driver_manager"
|
|
||||||
, priority = 1
|
|
||||||
, reportRoms =
|
|
||||||
[ label "ahci_ports"
|
|
||||||
, label "nvme_ns"
|
|
||||||
, label "pci_devices"
|
|
||||||
, label "usb_devices"
|
|
||||||
]
|
|
||||||
, romReports =
|
|
||||||
[ relabel "init.config" "dynamic.config"
|
|
||||||
, label "usb_drv.config"
|
|
||||||
]
|
|
||||||
, routes =
|
|
||||||
[ ServiceRoute.parentLabel
|
|
||||||
"Report"
|
|
||||||
(Some "block_devices")
|
|
||||||
(Some "block_devices")
|
|
||||||
, ServiceRoute.parentLabel
|
|
||||||
"ROM"
|
|
||||||
(Some "usb_policy")
|
|
||||||
(Some "usb_policy")
|
|
||||||
]
|
|
||||||
}
|
|
||||||
, dynamic =
|
|
||||||
Child.flat
|
|
||||||
Child.Attributes::{
|
|
||||||
, binary = "init"
|
|
||||||
, priority = 1
|
|
||||||
, resources =
|
|
||||||
Resources::{ caps = 1400, ram = Genode.units.MiB 64 }
|
|
||||||
, provides = [ "Framebuffer", "Block" ]
|
|
||||||
, romReports = [ label "ahci_ports", label "nvme_ns" ]
|
|
||||||
, reportRoms = [ relabel "config" "dynamic.config" ]
|
|
||||||
, routes =
|
|
||||||
[ ServiceRoute.child "Platform" "platform_drv"
|
|
||||||
, ServiceRoute.child "Usb" "usb_drv"
|
|
||||||
, ServiceRoute.parent "Timer"
|
|
||||||
, ServiceRoute.parent "Report"
|
|
||||||
, ServiceRoute.parent "IO_MEM"
|
|
||||||
, ServiceRoute.parent "IO_PORT"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
in drivers
|
in drivers
|
||||||
|
|
117
flake.lock
117
flake.lock
|
@ -1,58 +1,5 @@
|
||||||
{
|
{
|
||||||
"inputs": {
|
"nodes": {
|
||||||
"dhall-haskell": {
|
|
||||||
"info": {
|
|
||||||
"narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg="
|
|
||||||
},
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": {
|
|
||||||
"info": {
|
|
||||||
"narHash": "sha256-wJg4DA700SoQbEz61448sR6BgxRa1R92K3vvCV1g+HY="
|
|
||||||
},
|
|
||||||
"inputs": {},
|
|
||||||
"locked": {
|
|
||||||
"ref": "18.09-beta",
|
|
||||||
"rev": "1d4de0d552ae9aa66a5b8dee5fb0650a4372d148",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/nixos/nixpkgs.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "18.09-beta",
|
|
||||||
"rev": "1d4de0d552ae9aa66a5b8dee5fb0650a4372d148",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/nixos/nixpkgs.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgsStaticLinux": {
|
|
||||||
"info": {
|
|
||||||
"narHash": "sha256-famU3pJZ4vkElV9qc71HmyRVSvcrAhfMZ0UJKpmmKP8="
|
|
||||||
},
|
|
||||||
"inputs": {},
|
|
||||||
"locked": {
|
|
||||||
"ref": "static-haskell-nix-stack-dhall-working",
|
|
||||||
"rev": "925aac04f4ca58aceb83beef18cb7dae0715421b",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/nh2/nixpkgs.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "static-haskell-nix-stack-dhall-working",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/nh2/nixpkgs.git"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"ref": "flake",
|
|
||||||
"rev": "aea28adf3d10ff1982aa4ddd176d1476251b932f",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/dhall-lang/dhall-haskell"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "flake",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/dhall-lang/dhall-haskell"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"genode-depot": {
|
"genode-depot": {
|
||||||
"info": {
|
"info": {
|
||||||
"lastModified": 1584019323,
|
"lastModified": 1584019323,
|
||||||
|
@ -60,23 +7,7 @@
|
||||||
"revCount": 8
|
"revCount": 8
|
||||||
},
|
},
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": {
|
"nixpkgs": "nixpkgs"
|
||||||
"info": {
|
|
||||||
"lastModified": 1584015812,
|
|
||||||
"narHash": "sha256-oDj4g9nL3fp3xh0jAPZSHiucDxkLXA/rO3uM8L6kE0Y="
|
|
||||||
},
|
|
||||||
"inputs": {},
|
|
||||||
"locked": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a3735dcbd7b2530ae3bcf73fd91e1ca6aa9449e7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
|
@ -90,11 +21,43 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"info": {
|
||||||
|
"lastModified": 1584015812,
|
||||||
|
"narHash": "sha256-oDj4g9nL3fp3xh0jAPZSHiucDxkLXA/rO3uM8L6kE0Y="
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a3735dcbd7b2530ae3bcf73fd91e1ca6aa9449e7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgsUpstream": {
|
||||||
|
"info": {
|
||||||
|
"lastModified": 1584464280,
|
||||||
|
"narHash": "sha256-ovYhaoANbsuIRik2zOe5Sxhn0eu5PnExP4IhAJxRUW0="
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7806df1e5f5d49864d917497a4cd2f5ec1a359f8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"info": {
|
"info": {
|
||||||
"lastModified": 1583160598,
|
"lastModified": 1583160598,
|
||||||
"narHash": "sha256-jiBSr7JK/xy7pIXFVhjdxpWy0pudDDRDW5XjzmDXPjA="
|
"narHash": "sha256-jiBSr7JK/xy7pIXFVhjdxpWy0pudDDRDW5XjzmDXPjA="
|
||||||
},
|
},
|
||||||
"inputs": {},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"owner": "ehmry",
|
"owner": "ehmry",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
|
@ -106,7 +69,15 @@
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"genode-depot": "genode-depot",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nixpkgsUpstream": "nixpkgsUpstream"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 4
|
"root": "root",
|
||||||
|
"version": 5
|
||||||
}
|
}
|
||||||
|
|
27
flake.nix
27
flake.nix
|
@ -6,13 +6,12 @@
|
||||||
description = "Genode packages";
|
description = "Genode packages";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
dhall-haskell.uri =
|
|
||||||
"git+https://github.com/dhall-lang/dhall-haskell?ref=flake";
|
|
||||||
genode-depot.uri = "git+https://git.sr.ht/~ehmry/genode-depot";
|
genode-depot.uri = "git+https://git.sr.ht/~ehmry/genode-depot";
|
||||||
nixpkgs.uri = "github:ehmry/nixpkgs";
|
nixpkgs.uri = "github:ehmry/nixpkgs";
|
||||||
|
nixpkgsUpstream.uri = "github:NixOS/nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, dhall-haskell, genode-depot, nixpkgs }:
|
outputs = { self, genode-depot, nixpkgs, nixpkgsUpstream }:
|
||||||
let
|
let
|
||||||
mkOutput = { system, localSystem, crossSystem }:
|
mkOutput = { system, localSystem, crossSystem }:
|
||||||
let thisSystem = builtins.getAttr system;
|
let thisSystem = builtins.getAttr system;
|
||||||
|
@ -20,7 +19,7 @@
|
||||||
|
|
||||||
lib = (nixpkgs.lib) // (import ./lib {
|
lib = (nixpkgs.lib) // (import ./lib {
|
||||||
inherit system localSystem crossSystem;
|
inherit system localSystem crossSystem;
|
||||||
inherit nixpkgs dhall-haskell genode-depot;
|
inherit apps nixpkgs genode-depot;
|
||||||
genodepkgs = self;
|
genodepkgs = self;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -28,31 +27,29 @@
|
||||||
# pass thru Nixpkgs
|
# pass thru Nixpkgs
|
||||||
|
|
||||||
packages = import ./packages {
|
packages = import ./packages {
|
||||||
inherit system legacyPackages;
|
inherit system legacyPackages apps;
|
||||||
|
localPackages = nixpkgsUpstream.legacyPackages.${localSystem};
|
||||||
depot = thisSystem genode-depot.packages;
|
depot = thisSystem genode-depot.packages;
|
||||||
apps = self.apps.${localSystem};
|
|
||||||
dhallApps = dhall-haskell.apps.${localSystem};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
devShell = legacyPackages.mkShell {
|
devShell = legacyPackages.mkShell {
|
||||||
nativeBuildInputs = [ dhall-haskell.packages.${localSystem}.dhall ];
|
nativeBuildInputs = [
|
||||||
shellHook = ''
|
nixpkgs.legacyPackages.${localSystem}.dhall
|
||||||
export DHALL_PRELUDE="${packages.dhallPrelude}/package.dhall"
|
packages.dhallGenode
|
||||||
export DHALL_GENODE="${packages.dhallGenode}/package.dhall"
|
];
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
apps = import ./apps {
|
apps = import ./apps {
|
||||||
|
self = self.apps.${localSystem};
|
||||||
nixpkgs = legacyPackages;
|
nixpkgs = legacyPackages;
|
||||||
dhallApps = dhall-haskell.apps.${localSystem};
|
nixpkgsLocal = nixpkgsUpstream.legacyPackages.${localSystem};
|
||||||
inherit packages;
|
inherit packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = import ./tests {
|
checks = import ./tests {
|
||||||
inherit system localSystem crossSystem;
|
inherit system localSystem crossSystem;
|
||||||
apps = dhall-haskell.apps.${localSystem} // apps;
|
|
||||||
inherit self nixpkgs genode-depot;
|
inherit self nixpkgs genode-depot;
|
||||||
inherit lib;
|
inherit apps lib;
|
||||||
genodepkgs = thisSystem self.packages;
|
genodepkgs = thisSystem self.packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell
|
{ system, localSystem, crossSystem, genodepkgs, nixpkgs, genode-depot, apps }:
|
||||||
, genode-depot }:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
thisSystem = builtins.getAttr system;
|
thisSystem = builtins.getAttr system;
|
||||||
hostPkgs = import nixpkgs {
|
hostPkgs = nixpkgs.legacyPackages.${localSystem};
|
||||||
system = localSystem;
|
|
||||||
overlays = [
|
|
||||||
(self: super: {
|
|
||||||
inherit (builtins.getAttr localSystem dhall-haskell.packages) dhall;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
testPkgs = thisSystem genodepkgs.packages;
|
testPkgs = thisSystem genodepkgs.packages;
|
||||||
depot = thisSystem genode-depot.packages;
|
depot = thisSystem genode-depot.packages;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ system, legacyPackages, depot, apps, dhallApps }:
|
{ system, legacyPackages, localPackages, depot, apps }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (legacyPackages) callPackage;
|
dhallPackages = import ./dhall { inherit (localPackages) callPackage; };
|
||||||
|
|
||||||
dhallPackages = legacyPackages.dhallPackages
|
|
||||||
// (callPackage ./dhall { inherit dhallApps; });
|
|
||||||
|
|
||||||
mkDhallManifest = drv:
|
mkDhallManifest = drv:
|
||||||
legacyPackages.runCommand "${drv.name}.dhall" { inherit drv; }
|
legacyPackages.runCommand "${drv.name}.dhall" { inherit drv; }
|
||||||
|
@ -90,8 +87,6 @@ in rec {
|
||||||
|
|
||||||
dhallGenode = dhallPackages.genode;
|
dhallGenode = dhallPackages.genode;
|
||||||
|
|
||||||
dhallPrelude = dhallPackages.prelude;
|
|
||||||
|
|
||||||
NOVA = legacyPackages.callPackage ./NOVA { };
|
NOVA = legacyPackages.callPackage ./NOVA { };
|
||||||
|
|
||||||
libc = callPackage' ./libc { inherit depot; };
|
libc = callPackage' ./libc { inherit depot; };
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ callPackage, dhallApps }:
|
{ callPackage }:
|
||||||
|
|
||||||
rec {
|
{
|
||||||
prelude = prelude_11_0_0;
|
genode = callPackage ./genode.nix { };
|
||||||
prelude_11_0_0 = callPackage ./prelude-11.0.0.nix { };
|
|
||||||
prelude_9_0_0 = callPackage ./prelude-9.0.0.nix { };
|
|
||||||
genode = callPackage ./genode.nix { inherit dhallApps prelude; };
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
{ stdenv, fetchgit, dhallApps, prelude }:
|
{ stdenv, fetchgit, dhallPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
dhallPackages.buildDhallPackage {
|
||||||
name = "dhall-genode";
|
name = "dhall-genode";
|
||||||
src = fetchgit {
|
|
||||||
url = "https://git.sr.ht/~ehmry/dhall-genode";
|
code = let
|
||||||
rev = "16cad9fbbee3fbd1c167377c93ee1d60f9d21e37";
|
src = fetchgit {
|
||||||
sha256 = "0gjad37zd1kb5dlnkb3m8pd1ibzcc9yqf6vgyv3imffj1vhdl14n";
|
url = "https://git.sr.ht/~ehmry/dhall-genode";
|
||||||
};
|
rev = "f05a2dbd8b675757d5d24276feaa66f4e5ab78a7";
|
||||||
DHALL_PRELUDE = prelude + "/package.dhall";
|
sha256 = "0l3pjkcd3kajlkdwckggr9l9jxcjrkc86gngpmvfmvl5gkvz12k3";
|
||||||
buildCommand = ''
|
};
|
||||||
export XDG_CACHE_HOME=$TMPDIR
|
in src + "/package.dhall";
|
||||||
cp -r $src $out
|
|
||||||
chmod +w -R $out
|
dependencies = [ dhallPackages.Prelude."13.0.0" ];
|
||||||
echo $DHALL_PRELUDE > $out/Prelude.dhall
|
|
||||||
find $out -type f -exec \
|
source = true;
|
||||||
${dhallApps.dhall.program} freeze --all --inplace {} \;
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
{ stdenvNoCC, lib, fetchgit }:
|
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
|
||||||
name = "dhall-prelude";
|
|
||||||
version = " 11.0.0";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "https://github.com/dhall-lang/dhall-lang";
|
|
||||||
rev = "8098184d17c3aecc82674a7b874077a7641be05a";
|
|
||||||
sha256 = "0rdvyxq7mvas82wsfzzpk6imzm8ax4q58l522mx0ks69pacpr3yi";
|
|
||||||
};
|
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
cp -r Prelude $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
maintainers = with lib.maintainers; [ ehmry ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
{ stdenvNoCC, lib, fetchFromGitHub }:
|
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
|
||||||
name = "dhall-prelude";
|
|
||||||
version = " 10.0.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "dhall-lang";
|
|
||||||
repo = "dhall-lang";
|
|
||||||
rev = "ef644a00e77a3c2c6c503e18e65865fd6d74fc2a";
|
|
||||||
sha256 = "1md16ri1l6iid2p1zg17n3ap3813v0f43vrbxc280qgxhq617sdk";
|
|
||||||
};
|
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
cp -r Prelude $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
maintainers = with lib.maintainers; [ ehmry ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -45,8 +45,7 @@ let
|
||||||
++ testInputs);
|
++ testInputs);
|
||||||
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
|
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
|
||||||
testEnv' = {
|
testEnv' = {
|
||||||
DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall";
|
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
|
||||||
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
|
||||||
MANIFEST = manifest;
|
MANIFEST = manifest;
|
||||||
XDG_CACHE_HOME = "/tmp";
|
XDG_CACHE_HOME = "/tmp";
|
||||||
} // testEnv;
|
} // testEnv;
|
||||||
|
|
|
@ -42,8 +42,7 @@ let
|
||||||
(with testPkgs; [ base-linux init sotest-producer ] ++ testInputs);
|
(with testPkgs; [ base-linux init sotest-producer ] ++ testInputs);
|
||||||
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
|
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
|
||||||
env' = {
|
env' = {
|
||||||
DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall";
|
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
|
||||||
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
|
||||||
MANIFEST = manifest;
|
MANIFEST = manifest;
|
||||||
XDG_CACHE_HOME = "/tmp";
|
XDG_CACHE_HOME = "/tmp";
|
||||||
} // env;
|
} // env;
|
||||||
|
|
|
@ -45,8 +45,7 @@ let
|
||||||
++ testInputs);
|
++ testInputs);
|
||||||
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
|
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
|
||||||
testEnv' = {
|
testEnv' = {
|
||||||
DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall";
|
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
|
||||||
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
|
||||||
MANIFEST = manifest;
|
MANIFEST = manifest;
|
||||||
XDG_CACHE_HOME = "/tmp";
|
XDG_CACHE_HOME = "/tmp";
|
||||||
} // testEnv;
|
} // testEnv;
|
||||||
|
|
|
@ -25,78 +25,72 @@ let childRomRoute =
|
||||||
let label = λ(_ : Text) → { local = _, route = _ }
|
let label = λ(_ : Text) → { local = _, route = _ }
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, verbose = True
|
||||||
, verbose = True
|
, children = toMap
|
||||||
, children =
|
{ drivers =
|
||||||
toMap
|
Init.toChild
|
||||||
{ drivers =
|
drivers
|
||||||
Init.toChild
|
Init.Attributes::{
|
||||||
drivers
|
, provides = [ "Block", "Framebuffer", "Input" ]
|
||||||
Init.Attributes::{
|
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
|
||||||
, provides = [ "Block", "Framebuffer", "Input" ]
|
, romReports = [ label "block_devices" ]
|
||||||
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
|
, routes =
|
||||||
, romReports = [ label "block_devices" ]
|
[ parentRomRoute "managed/input_filter" "input_filter.config"
|
||||||
, routes =
|
, parentRomRoute " numlock_remap" "numlock_remap.config"
|
||||||
[ parentRomRoute
|
, childRomRoute "dynamic_rom" "capslock"
|
||||||
"managed/input_filter"
|
, childRomRoute "dynamic_rom" "numlock"
|
||||||
"input_filter.config"
|
, childRomRoute "dynamic_rom" "system"
|
||||||
, parentRomRoute " numlock_remap" "numlock_remap.config"
|
, ServiceRoute.child "Report" "_report_rom"
|
||||||
, childRomRoute "dynamic_rom" "capslock"
|
, ServiceRoute.parent "Timer"
|
||||||
, childRomRoute "dynamic_rom" "numlock"
|
, Genode.Init.ServiceRoute.parent "IRQ"
|
||||||
, childRomRoute "dynamic_rom" "system"
|
, Genode.Init.ServiceRoute.parent "IO_MEM"
|
||||||
, ServiceRoute.child "Report" "_report_rom"
|
, Genode.Init.ServiceRoute.parent "IO_PORT"
|
||||||
, ServiceRoute.parent "Timer"
|
]
|
||||||
, Genode.Init.ServiceRoute.parent "IRQ"
|
}
|
||||||
, Genode.Init.ServiceRoute.parent "IO_MEM"
|
, dynamic_rom =
|
||||||
, Genode.Init.ServiceRoute.parent "IO_PORT"
|
Child.flat
|
||||||
]
|
Child.Attributes::{
|
||||||
}
|
, binary = "dynamic_rom"
|
||||||
, dynamic_rom =
|
, resources = Resources::{ ram = Genode.units.MiB 4 }
|
||||||
Child.flat
|
, provides = [ "ROM" ]
|
||||||
Child.Attributes::{
|
, config = Genode.Init.Config::{
|
||||||
, binary = "dynamic_rom"
|
, content =
|
||||||
, resources = Resources::{ ram = Genode.units.MiB 4 }
|
[ Genode.Prelude.XML.text
|
||||||
, provides = [ "ROM" ]
|
''
|
||||||
, config =
|
<rom name="system">
|
||||||
Genode.Init.Config::{
|
<inline>
|
||||||
, content =
|
<system state=""/>
|
||||||
[ Genode.Prelude.XML.text
|
</inline>
|
||||||
''
|
<sleep milliseconds="10000"/>
|
||||||
<rom name="system">
|
</rom>
|
||||||
<inline>
|
''
|
||||||
<system state=""/>
|
]
|
||||||
</inline>
|
}
|
||||||
<sleep milliseconds="10000"/>
|
}
|
||||||
</rom>
|
, test-driver_manager =
|
||||||
''
|
Child.flat
|
||||||
]
|
Child.Attributes::{
|
||||||
}
|
, binary = "test-driver_manager"
|
||||||
}
|
, config = Init.Config::{
|
||||||
, test-driver_manager =
|
, content =
|
||||||
Child.flat
|
[ Genode.Prelude.XML.text
|
||||||
Child.Attributes::{
|
''
|
||||||
, binary = "test-driver_manager"
|
<check_ahci_block_device label="ahci-1" block_count="65536" block_size="512" model="QEMU HARDDISK"/>
|
||||||
, config =
|
<check_input/>
|
||||||
Init.Config::{
|
<check_framebuffer/>
|
||||||
, content =
|
''
|
||||||
[ Genode.Prelude.XML.text
|
]
|
||||||
''
|
}
|
||||||
<check_ahci_block_device label="ahci-1" block_count="65536" block_size="512" model="QEMU HARDDISK"/>
|
, reportRoms = [ label "block_devices" ]
|
||||||
<check_input/>
|
, routes =
|
||||||
<check_framebuffer/>
|
[ ServiceRoute.child "Block" "drivers"
|
||||||
''
|
, ServiceRoute.child "Framebuffer" "drivers"
|
||||||
]
|
, ServiceRoute.child "Input" "drivers"
|
||||||
}
|
]
|
||||||
, reportRoms = [ label "block_devices" ]
|
}
|
||||||
, routes =
|
}
|
||||||
[ ServiceRoute.child "Block" "drivers"
|
}
|
||||||
, ServiceRoute.child "Framebuffer" "drivers"
|
|
||||||
, ServiceRoute.child "Input" "drivers"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
, rom =
|
, rom =
|
||||||
Genode.Boot.toRomTexts
|
Genode.Boot.toRomTexts
|
||||||
( toMap
|
( toMap
|
||||||
|
@ -104,8 +98,7 @@ in Genode.Boot::{
|
||||||
, numlock = "<feature_creep/>"
|
, numlock = "<feature_creep/>"
|
||||||
, usb_policy = "<usb/>"
|
, usb_policy = "<usb/>"
|
||||||
}
|
}
|
||||||
# [ { mapKey =
|
# [ { mapKey = "fb_drv.config"
|
||||||
"fb_drv.config"
|
|
||||||
, mapValue =
|
, mapValue =
|
||||||
''
|
''
|
||||||
<config width="1024" height="768" buffered="yes"/>
|
<config width="1024" height="768" buffered="yes"/>
|
||||||
|
@ -113,8 +106,7 @@ in Genode.Boot::{
|
||||||
</config>
|
</config>
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
, { mapKey =
|
, { mapKey = "input_filter.config"
|
||||||
"input_filter.config"
|
|
||||||
, mapValue =
|
, mapValue =
|
||||||
''
|
''
|
||||||
<config>
|
<config>
|
||||||
|
|
|
@ -5,22 +5,19 @@ let Genode = env:DHALL_GENODE
|
||||||
let Child = Genode.Init.Child
|
let Child = Genode.Init.Child
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Genode.Init::{
|
||||||
Genode.Init::{
|
, children = toMap
|
||||||
, children =
|
{ test-log =
|
||||||
toMap
|
Child.flat
|
||||||
{ test-log =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "test-log"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "test-log"
|
, resources = Genode.Init.Resources::{
|
||||||
, exitPropagate = True
|
, caps = 500
|
||||||
, resources =
|
, ram = Genode.units.MiB 10
|
||||||
Genode.Init.Resources::{
|
}
|
||||||
, caps = 500
|
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
|
||||||
, ram = Genode.units.MiB 10
|
}
|
||||||
}
|
}
|
||||||
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,47 +5,42 @@ let Genode = env:DHALL_GENODE
|
||||||
let Child = Genode.Init.Child
|
let Child = Genode.Init.Child
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Genode.Init::{
|
||||||
Genode.Init::{
|
, children = toMap
|
||||||
, children =
|
{ noux =
|
||||||
toMap
|
Child.flat
|
||||||
{ noux =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "noux"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "noux"
|
, resources = Genode.Init.Resources::{
|
||||||
, exitPropagate = True
|
, caps = 500
|
||||||
, resources =
|
, ram = Genode.units.MiB 10
|
||||||
Genode.Init.Resources::{
|
}
|
||||||
, caps = 500
|
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
|
||||||
, ram = Genode.units.MiB 10
|
, config = Genode.Init.Config::{
|
||||||
}
|
, attributes = toMap
|
||||||
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
|
{ stdin = "/script"
|
||||||
, config =
|
, stdout = "/dev/log"
|
||||||
Genode.Init.Config::{
|
, stderr = "/dev/log"
|
||||||
, attributes =
|
}
|
||||||
toMap
|
, content =
|
||||||
{ stdin = "/script"
|
[ Genode.Prelude.XML.text
|
||||||
, stdout = "/dev/log"
|
''
|
||||||
, stderr = "/dev/log"
|
<fstab>
|
||||||
}
|
<tar name="bash-minimal.tar" />
|
||||||
, content =
|
<dir name="dev"> <log/> <null/> <zero/> </dir>
|
||||||
[ Genode.Prelude.XML.text
|
<dir name="tmp"> <ram /> </dir>
|
||||||
''
|
<inline name="script">
|
||||||
<fstab>
|
echo "hello world"
|
||||||
<tar name="bash-minimal.tar" />
|
</inline>
|
||||||
<dir name="dev"> <log/> <null/> <zero/> </dir>
|
</fstab>
|
||||||
<dir name="tmp"> <ram /> </dir>
|
<start name="/bin/bash">
|
||||||
<inline name="script">
|
<env name="TERM" value="screen" />
|
||||||
echo "hello world"
|
</start>
|
||||||
</inline>
|
''
|
||||||
</fstab>
|
]
|
||||||
<start name="/bin/bash">
|
}
|
||||||
<env name="TERM" value="screen" />
|
}
|
||||||
</start>
|
}
|
||||||
''
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
117
tests/pci.dhall
117
tests/pci.dhall
|
@ -15,65 +15,60 @@ let ServiceRoute = Init.ServiceRoute
|
||||||
let label = λ(_ : Text) → { local = _, route = _ } : Child.Attributes.Label
|
let label = λ(_ : Text) → { local = _, route = _ } : Child.Attributes.Label
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, verbose = True
|
||||||
, verbose = True
|
, children = toMap
|
||||||
, children =
|
{ test-pci =
|
||||||
toMap
|
Child.flat
|
||||||
{ test-pci =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "test-pci"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "test-pci"
|
, resources = Resources::{ ram = Genode.units.MiB 3 }
|
||||||
, exitPropagate = True
|
, routes = [ ServiceRoute.child "Platform" "platform_drv" ]
|
||||||
, resources = Resources::{ ram = Genode.units.MiB 3 }
|
}
|
||||||
, routes = [ ServiceRoute.child "Platform" "platform_drv" ]
|
, acpi_drv =
|
||||||
}
|
Child.flat
|
||||||
, acpi_drv =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "acpi_drv"
|
||||||
Child.Attributes::{
|
, resources = Resources::{
|
||||||
, binary = "acpi_drv"
|
, caps = 400
|
||||||
, resources =
|
, ram = Genode.units.MiB 4
|
||||||
Resources::{
|
, constrainPhys = True
|
||||||
, caps = 400
|
}
|
||||||
, ram = Genode.units.MiB 4
|
, provides = [ "Platform", "Acpi" ]
|
||||||
, constrainPhys = True
|
, romReports = [ label "acpi", label "smbios_table" ]
|
||||||
}
|
, routes =
|
||||||
, provides = [ "Platform", "Acpi" ]
|
[ ServiceRoute.parent "IRQ"
|
||||||
, romReports = [ label "acpi", label "smbios_table" ]
|
, ServiceRoute.parent "IO_MEM"
|
||||||
, routes =
|
, ServiceRoute.parent "IO_PORT"
|
||||||
[ ServiceRoute.parent "IRQ"
|
]
|
||||||
, ServiceRoute.parent "IO_MEM"
|
}
|
||||||
, ServiceRoute.parent "IO_PORT"
|
, platform_drv =
|
||||||
]
|
Child.flat
|
||||||
}
|
Child.Attributes::{
|
||||||
, platform_drv =
|
, binary = "platform_drv"
|
||||||
Child.flat
|
, resources = Resources::{
|
||||||
Child.Attributes::{
|
, caps = 800
|
||||||
, binary = "platform_drv"
|
, ram = Genode.units.MiB 4
|
||||||
, resources =
|
, constrainPhys = True
|
||||||
Resources::{
|
}
|
||||||
, caps = 800
|
, reportRoms = [ label "acpi" ]
|
||||||
, ram = Genode.units.MiB 4
|
, provides = [ "Platform", "Acpi" ]
|
||||||
, constrainPhys = True
|
, routes =
|
||||||
}
|
[ ServiceRoute.parent "Timer"
|
||||||
, reportRoms = [ label "acpi" ]
|
, ServiceRoute.parent "IRQ"
|
||||||
, provides = [ "Platform", "Acpi" ]
|
, ServiceRoute.parent "IO_MEM"
|
||||||
, routes =
|
, ServiceRoute.parent "IO_PORT"
|
||||||
[ ServiceRoute.parent "Timer"
|
]
|
||||||
, ServiceRoute.parent "IRQ"
|
, config = Init.Config::{
|
||||||
, ServiceRoute.parent "IO_MEM"
|
, content =
|
||||||
, ServiceRoute.parent "IO_PORT"
|
[ XML.text
|
||||||
]
|
''
|
||||||
, config =
|
<policy label_prefix="test-pci"> <pci class="ALL"/> </policy>
|
||||||
Init.Config::{
|
''
|
||||||
, content =
|
]
|
||||||
[ XML.text
|
}
|
||||||
''
|
}
|
||||||
<policy label_prefix="test-pci"> <pci class="ALL"/> </policy>
|
}
|
||||||
''
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,27 +5,25 @@ let Genode = env:DHALL_GENODE
|
||||||
let Child = Genode.Init.Child
|
let Child = Genode.Init.Child
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Genode.Init::{
|
||||||
Genode.Init::{
|
, children = toMap
|
||||||
, children =
|
{ test-rtc =
|
||||||
toMap
|
Child.flat
|
||||||
{ test-rtc =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "test-rtc"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "test-rtc"
|
, routes =
|
||||||
, exitPropagate = True
|
[ Genode.Init.ServiceRoute.parent "Timer"
|
||||||
, routes =
|
, Genode.Init.ServiceRoute.child "Rtc" "rtc_drv"
|
||||||
[ Genode.Init.ServiceRoute.parent "Timer"
|
]
|
||||||
, Genode.Init.ServiceRoute.child "Rtc" "rtc_drv"
|
}
|
||||||
]
|
, rtc_drv =
|
||||||
}
|
Child.flat
|
||||||
, rtc_drv =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "rtc_drv"
|
||||||
Child.Attributes::{
|
, provides = [ "Rtc" ]
|
||||||
, binary = "rtc_drv"
|
, routes = [ Genode.Init.ServiceRoute.parent "IO_PORT" ]
|
||||||
, provides = [ "Rtc" ]
|
}
|
||||||
, routes = [ Genode.Init.ServiceRoute.parent "IO_PORT" ]
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,23 +7,20 @@ let Init = Genode.Init
|
||||||
let Child = Init.Child
|
let Child = Init.Child
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, children = toMap
|
||||||
, children =
|
{ test-signal =
|
||||||
toMap
|
Child.flat
|
||||||
{ test-signal =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "test-signal"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "test-signal"
|
, priority = 5
|
||||||
, exitPropagate = True
|
, resources = Init.Resources::{
|
||||||
, priority = 5
|
, caps = 500
|
||||||
, resources =
|
, ram = Genode.units.MiB 10
|
||||||
Init.Resources::{
|
}
|
||||||
, caps = 500
|
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
||||||
, ram = Genode.units.MiB 10
|
}
|
||||||
}
|
}
|
||||||
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,34 +7,32 @@ let Init = Genode.Init
|
||||||
let Child = Init.Child
|
let Child = Init.Child
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, children = toMap
|
||||||
, children =
|
{ solo5 =
|
||||||
toMap
|
Child.flat
|
||||||
{ solo5 =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "solo5-test_blk"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "solo5-test_blk"
|
, resources = Init.Resources::{
|
||||||
, exitPropagate = True
|
, caps = 256
|
||||||
, resources =
|
, ram = Genode.units.MiB 3
|
||||||
Init.Resources::{ caps = 256, ram = Genode.units.MiB 3 }
|
}
|
||||||
, routes =
|
, routes =
|
||||||
[ Init.ServiceRoute.parent "Timer"
|
[ Init.ServiceRoute.parent "Timer"
|
||||||
, Init.ServiceRoute.child "Block" "block"
|
, Init.ServiceRoute.child "Block" "block"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, block =
|
, block =
|
||||||
Child.flat
|
Child.flat
|
||||||
Child.Attributes::{
|
Child.Attributes::{
|
||||||
, binary = "ram_block"
|
, binary = "ram_block"
|
||||||
, provides = [ "Block" ]
|
, provides = [ "Block" ]
|
||||||
, resources = Init.Resources::{ ram = Genode.units.MiB 9 }
|
, resources = Init.Resources::{ ram = Genode.units.MiB 9 }
|
||||||
, config =
|
, config = Init.Config::{
|
||||||
Init.Config::{
|
, attributes = toMap { size = "8M", block_size = "4096" }
|
||||||
, attributes =
|
}
|
||||||
toMap { size = "8M", block_size = "4096" }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,72 +11,65 @@ let Res = Init.Resources
|
||||||
let ServiceRoute = Init.ServiceRoute
|
let ServiceRoute = Init.ServiceRoute
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, children = toMap
|
||||||
, children =
|
{ nic =
|
||||||
toMap
|
Child.flat
|
||||||
{ nic =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "nic_loopback"
|
||||||
Child.Attributes::{
|
, provides = [ "Nic" ]
|
||||||
, binary = "nic_loopback"
|
}
|
||||||
, provides = [ "Nic" ]
|
, bridge =
|
||||||
}
|
Child.flat
|
||||||
, bridge =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "nic_bridge"
|
||||||
Child.Attributes::{
|
, resources = Res::{ caps = 200, ram = Genode.units.MiB 6 }
|
||||||
, binary = "nic_bridge"
|
, provides = [ "Nic" ]
|
||||||
, resources = Res::{ caps = 200, ram = Genode.units.MiB 6 }
|
, routes = [ ServiceRoute.child "Nic" "nic" ]
|
||||||
, provides = [ "Nic" ]
|
, config = Init.Config::{
|
||||||
, routes = [ ServiceRoute.child "Nic" "nic" ]
|
, attributes = toMap { mac = "02:02:02:02:03:00" }
|
||||||
, config =
|
, content =
|
||||||
Init.Config::{
|
[ Genode.Prelude.XML.text
|
||||||
, attributes = toMap { mac = "02:02:02:02:03:00" }
|
''
|
||||||
, content =
|
<policy label_prefix="solo5" ip_addr="10.0.0.2"/>
|
||||||
[ Genode.Prelude.XML.text
|
<default-policy/>
|
||||||
''
|
''
|
||||||
<policy label_prefix="solo5" ip_addr="10.0.0.2"/>
|
]
|
||||||
<default-policy/>
|
}
|
||||||
''
|
}
|
||||||
]
|
, solo5 =
|
||||||
}
|
Child.flat
|
||||||
}
|
Child.Attributes::{
|
||||||
, solo5 =
|
, binary = "solo5-test_net"
|
||||||
Child.flat
|
, resources = Res::{ caps = 256, ram = Genode.units.MiB 3 }
|
||||||
Child.Attributes::{
|
, routes =
|
||||||
, binary = "solo5-test_net"
|
[ ServiceRoute.parent "Timer"
|
||||||
, resources = Res::{ caps = 256, ram = Genode.units.MiB 3 }
|
, ServiceRoute.child "Nic" "bridge"
|
||||||
, routes =
|
]
|
||||||
[ ServiceRoute.parent "Timer"
|
, config = Init.Config::{
|
||||||
, ServiceRoute.child "Nic" "bridge"
|
, content =
|
||||||
]
|
[ Genode.Prelude.XML.text "<cmdline>limit</cmdline>" ]
|
||||||
, config =
|
}
|
||||||
Init.Config::{
|
}
|
||||||
, content =
|
, ping =
|
||||||
[ Genode.Prelude.XML.text "<cmdline>limit</cmdline>"
|
Child.flat
|
||||||
]
|
Child.Attributes::{
|
||||||
}
|
, binary = "ping"
|
||||||
}
|
, exitPropagate = True
|
||||||
, ping =
|
, resources = Res::{ caps = 128, ram = Genode.units.MiB 6 }
|
||||||
Child.flat
|
, routes =
|
||||||
Child.Attributes::{
|
[ ServiceRoute.parent "Timer"
|
||||||
, binary = "ping"
|
, ServiceRoute.child "Nic" "bridge"
|
||||||
, exitPropagate = True
|
]
|
||||||
, resources = Res::{ caps = 128, ram = Genode.units.MiB 6 }
|
, config = Init.Config::{
|
||||||
, routes =
|
, attributes = toMap
|
||||||
[ ServiceRoute.parent "Timer"
|
{ interface = "10.0.0.72/24"
|
||||||
, ServiceRoute.child "Nic" "bridge"
|
, dst_ip = "10.0.0.2"
|
||||||
]
|
, period_sec = "1"
|
||||||
, config =
|
, verbose = "no"
|
||||||
Init.Config::{
|
}
|
||||||
, attributes =
|
}
|
||||||
toMap
|
}
|
||||||
{ interface = "10.0.0.72/24"
|
}
|
||||||
, dst_ip = "10.0.0.2"
|
}
|
||||||
, period_sec = "1"
|
|
||||||
, verbose = "no"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,81 +9,76 @@ let Child = Init.Child
|
||||||
let Res = Init.Resources
|
let Res = Init.Resources
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, children = toMap
|
||||||
, children =
|
{ nic =
|
||||||
toMap
|
Child.flat
|
||||||
{ nic =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "nic_loopback"
|
||||||
Child.Attributes::{
|
, provides = [ "Nic" ]
|
||||||
, binary = "nic_loopback"
|
}
|
||||||
, provides = [ "Nic" ]
|
, bridge =
|
||||||
}
|
Child.flat
|
||||||
, bridge =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "nic_bridge"
|
||||||
Child.Attributes::{
|
, resources = Res::{ caps = 200, ram = Genode.units.MiB 8 }
|
||||||
, binary = "nic_bridge"
|
, provides = [ "Nic" ]
|
||||||
, resources = Res::{ caps = 200, ram = Genode.units.MiB 8 }
|
, routes = [ Genode.Init.ServiceRoute.child "Nic" "nic" ]
|
||||||
, provides = [ "Nic" ]
|
, config = Init.Config::{
|
||||||
, routes = [ Genode.Init.ServiceRoute.child "Nic" "nic" ]
|
, content =
|
||||||
, config =
|
[ Genode.Prelude.XML.text
|
||||||
Init.Config::{
|
''
|
||||||
, content =
|
<policy label="solo5 -> service0" ip_addr="10.0.0.2"/>
|
||||||
[ Genode.Prelude.XML.text
|
<policy label="solo5 -> service1" ip_addr="10.1.0.2"/>
|
||||||
''
|
<default-policy/>
|
||||||
<policy label="solo5 -> service0" ip_addr="10.0.0.2"/>
|
''
|
||||||
<policy label="solo5 -> service1" ip_addr="10.1.0.2"/>
|
]
|
||||||
<default-policy/>
|
}
|
||||||
''
|
}
|
||||||
]
|
, solo5 =
|
||||||
}
|
Child.flat
|
||||||
}
|
Child.Attributes::{
|
||||||
, solo5 =
|
, binary = "solo5-test_net_2if"
|
||||||
Child.flat
|
, resources = Res::{ caps = 256, ram = Genode.units.MiB 5 }
|
||||||
Child.Attributes::{
|
, routes =
|
||||||
, binary = "solo5-test_net_2if"
|
[ Genode.Init.ServiceRoute.parent "Timer"
|
||||||
, resources = Res::{ caps = 256, ram = Genode.units.MiB 5 }
|
, Genode.Init.ServiceRoute.child "Nic" "bridge"
|
||||||
, routes =
|
]
|
||||||
[ Genode.Init.ServiceRoute.parent "Timer"
|
, config = Init.Config::{
|
||||||
, Genode.Init.ServiceRoute.child "Nic" "bridge"
|
, content =
|
||||||
]
|
[ Genode.Prelude.XML.text
|
||||||
, config =
|
''
|
||||||
Init.Config::{
|
"<cmdline>limit</cmdline>"
|
||||||
, content =
|
''
|
||||||
[ Genode.Prelude.XML.text
|
]
|
||||||
''
|
}
|
||||||
"<cmdline>limit</cmdline>"
|
}
|
||||||
''
|
, clients =
|
||||||
]
|
Child.flat
|
||||||
}
|
Child.Attributes::{
|
||||||
}
|
, binary = "sequence"
|
||||||
, clients =
|
, exitPropagate = True
|
||||||
Child.flat
|
, resources = Res::{ caps = 256, ram = Genode.units.MiB 8 }
|
||||||
Child.Attributes::{
|
, routes =
|
||||||
, binary = "sequence"
|
[ Genode.Init.ServiceRoute.parent "Timer"
|
||||||
, exitPropagate = True
|
, Genode.Init.ServiceRoute.child "Nic" "bridge"
|
||||||
, resources = Res::{ caps = 256, ram = Genode.units.MiB 8 }
|
]
|
||||||
, routes =
|
, config = Init.Config::{
|
||||||
[ Genode.Init.ServiceRoute.parent "Timer"
|
, content =
|
||||||
, Genode.Init.ServiceRoute.child "Nic" "bridge"
|
[ Genode.Prelude.XML.text
|
||||||
]
|
''
|
||||||
, config =
|
<start name="ping0">
|
||||||
Init.Config::{
|
<binary name="ping"/>
|
||||||
, content =
|
<config interface="10.0.0.72/24" dst_ip="10.0.0.2" period_sec="1" count="4"/>
|
||||||
[ Genode.Prelude.XML.text
|
</start>
|
||||||
''
|
<start name="ping1">
|
||||||
<start name="ping0">
|
<binary name="ping"/>
|
||||||
<binary name="ping"/>
|
<config interface="10.1.0.72/24" dst_ip="10.1.0.2" period_sec="1" count="4"/>
|
||||||
<config interface="10.0.0.72/24" dst_ip="10.0.0.2" period_sec="1" count="4"/>
|
</start>
|
||||||
</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>
|
}
|
||||||
''
|
}
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,32 +12,28 @@ let Config = Init.Config
|
||||||
|
|
||||||
in λ(testBinary : Text)
|
in λ(testBinary : Text)
|
||||||
→ Genode.Boot::{
|
→ Genode.Boot::{
|
||||||
, config =
|
, config = Init::{
|
||||||
Init::{
|
, children = toMap
|
||||||
, children =
|
{ solo5 =
|
||||||
toMap
|
Child.flat
|
||||||
{ solo5 =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = testBinary
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = testBinary
|
, resources = Init.Resources::{
|
||||||
, exitPropagate = True
|
, caps = 256
|
||||||
, resources =
|
, ram = Genode.units.MiB 3
|
||||||
Init.Resources::{
|
}
|
||||||
, caps = 256
|
, config = Config::{
|
||||||
, ram = Genode.units.MiB 3
|
, content =
|
||||||
|
[ Prelude.XML.element
|
||||||
|
{ name = "cmdline"
|
||||||
|
, attributes = Prelude.XML.emptyAttributes
|
||||||
|
, content = [ Prelude.XML.text "Hello_Solo5" ]
|
||||||
}
|
}
|
||||||
, config =
|
]
|
||||||
Config::{
|
}
|
||||||
, content =
|
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
||||||
[ Prelude.XML.element
|
}
|
||||||
{ name = "cmdline"
|
}
|
||||||
, attributes = Prelude.XML.emptyAttributes
|
}
|
||||||
, content = [ Prelude.XML.text "Hello_Solo5" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,32 +5,29 @@ let Genode = env:DHALL_GENODE
|
||||||
let Child = Genode.Init.Child
|
let Child = Genode.Init.Child
|
||||||
|
|
||||||
in Genode.Boot::{
|
in Genode.Boot::{
|
||||||
, config =
|
, config = Genode.Init::{
|
||||||
Genode.Init::{
|
, children = toMap
|
||||||
, children =
|
{ solo5 =
|
||||||
toMap
|
Child.flat
|
||||||
{ solo5 =
|
Child.Attributes::{
|
||||||
Child.flat
|
, binary = "solo5-test_time"
|
||||||
Child.Attributes::{
|
, exitPropagate = True
|
||||||
, binary = "solo5-test_time"
|
, resources = Genode.Init.Resources::{
|
||||||
, exitPropagate = True
|
, caps = 256
|
||||||
, resources =
|
, ram = Genode.units.MiB 3
|
||||||
Genode.Init.Resources::{
|
}
|
||||||
, caps = 256
|
, routes =
|
||||||
, ram = Genode.units.MiB 3
|
[ Genode.Init.ServiceRoute.parent "Timer"
|
||||||
}
|
, Genode.Init.ServiceRoute.child "Rtc" "clock"
|
||||||
, routes =
|
]
|
||||||
[ Genode.Init.ServiceRoute.parent "Timer"
|
}
|
||||||
, Genode.Init.ServiceRoute.child "Rtc" "clock"
|
, clock =
|
||||||
]
|
Child.flat
|
||||||
}
|
Child.Attributes::{
|
||||||
, clock =
|
, binary = "rtc_drv"
|
||||||
Child.flat
|
, provides = [ "Rtc" ]
|
||||||
Child.Attributes::{
|
, routes = [ Genode.Init.ServiceRoute.parent "IO_PORT" ]
|
||||||
, binary = "rtc_drv"
|
}
|
||||||
, provides = [ "Rtc" ]
|
}
|
||||||
, routes = [ Genode.Init.ServiceRoute.parent "IO_PORT" ]
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ boot_items =
|
{ boot_items =
|
||||||
[ { exec = "bender"
|
[ { exec = "bender"
|
||||||
, load = [ "hypervisor serial novga iommu", "image.elf" ]
|
, load = [ "hypervisor serial novga iommu", "image.elf" ]
|
||||||
, name = "NOVA with Genode"
|
, name = "NOVA with Genode"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ]
|
, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ boot_items =
|
{ boot_items =
|
||||||
[ { exec = "bender", load = [ "image.elf" ], name = "Genode base-hw" } ]
|
[ { exec = "bender", load = [ "image.elf" ], name = "Genode base-hw" } ]
|
||||||
, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ]
|
, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,15 +17,15 @@ let wrapHarness
|
||||||
, binary = "sotest-harness"
|
, binary = "sotest-harness"
|
||||||
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
|
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
|
||||||
, routes =
|
, routes =
|
||||||
[ Init.ServiceRoute.parentLabel
|
[ Init.ServiceRoute.parentLabel
|
||||||
"LOG"
|
"LOG"
|
||||||
(Some "SOTEST")
|
(Some "SOTEST")
|
||||||
(Some "unlabeled")
|
(Some "unlabeled")
|
||||||
, Init.ServiceRoute.parent "IO_MEM"
|
, Init.ServiceRoute.parent "IO_MEM"
|
||||||
, Init.ServiceRoute.parent "IO_PORT"
|
, Init.ServiceRoute.parent "IO_PORT"
|
||||||
, Init.ServiceRoute.parent "IRQ"
|
, Init.ServiceRoute.parent "IRQ"
|
||||||
, Init.ServiceRoute.child "Timer" "timer"
|
, Init.ServiceRoute.child "Timer" "timer"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
let TextMapType = Prelude.Map.Type Text
|
let TextMapType = Prelude.Map.Type Text
|
||||||
|
@ -33,20 +33,19 @@ let TextMapType = Prelude.Map.Type Text
|
||||||
in λ(boot : Genode.Boot.Type)
|
in λ(boot : Genode.Boot.Type)
|
||||||
→ λ(inputsManifest : TextMapType (TextMapType Text))
|
→ λ(inputsManifest : TextMapType (TextMapType Text))
|
||||||
→ boot
|
→ boot
|
||||||
⫽ { config =
|
⫽ { config = Init::{
|
||||||
Init::{
|
, children =
|
||||||
, children =
|
[ { mapKey = "timer"
|
||||||
[ { mapKey = "timer"
|
, mapValue =
|
||||||
, mapValue =
|
Child.flat
|
||||||
Child.flat
|
Child.Attributes::{
|
||||||
Child.Attributes::{
|
, binary = "timer_drv"
|
||||||
, binary = "timer_drv"
|
, provides = [ "Timer" ]
|
||||||
, provides = [ "Timer" ]
|
}
|
||||||
}
|
}
|
||||||
}
|
, { mapKey = "harness", mapValue = wrapHarness boot.config }
|
||||||
, { mapKey = "harness", mapValue = wrapHarness boot.config }
|
]
|
||||||
]
|
}
|
||||||
}
|
|
||||||
, rom =
|
, rom =
|
||||||
let inputRoms =
|
let inputRoms =
|
||||||
Genode.BootModules.toRomPaths
|
Genode.BootModules.toRomPaths
|
||||||
|
@ -58,6 +57,6 @@ in λ(boot : Genode.Boot.Type)
|
||||||
inputsManifest
|
inputsManifest
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
in boot.rom # inputRoms
|
in boot.rom # inputRoms
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue