Consolidate boot configuration

master
Emery Hemingway 3 years ago
parent 2e4264cd33
commit fd0d3ccd4a
  1. 456
      boot.dhall
  2. 118
      config.dhall
  3. 213
      drivers.config
  4. 102
      flake.lock
  5. 82
      flake.nix
  6. 13
      input_filter.config

@ -0,0 +1,456 @@
let Genode =
env:DHALL_GENODE
? https://git.sr.ht/~ehmry/dhall-genode/blob/master/package.dhall sha256:62d5c59808ca94a903497469be41f17d0022a44b3049f156ae2ea30b3a0499c3
let drivers =
Genode.Init::{
, services =
[ Genode.ServiceRoute.child "Framebuffer" "dynamic"
, Genode.ServiceRoute.child "Block" "dynamic"
, Genode.ServiceRoute.child "Usb" "usb_drv"
, Genode.ServiceRoute.child "Platform" "platform_drv"
, Genode.ServiceRoute.child "Input" "input_filter"
]
, children =
toMap
{ report_rom =
Genode.Init.Start::{
, binary = "report_rom"
, resources = { caps = 96, ram = Genode.units.MiB 2 }
, provides = [ "ROM", "Report" ]
, config =
Some
( Genode.Prelude.XML.text
''
<config verbose="no">
<policy label="platform_drv -> acpi" report="acpi_drv -> acpi"/>
<policy label="driver_manager -> pci_devices" report="platform_drv -> pci"/>
<policy label="usb_drv -> config" report="driver_manager -> usb_drv.config"/>
<policy label="driver_manager -> usb_devices" report="usb_drv -> devices"/>
<policy label="dynamic -> config" report="driver_manager -> init.config"/>
<policy label="driver_manager -> ahci_ports" report="dynamic -> ahci_ports"/>
<policy label="driver_manager -> nvme_ns" report="dynamic -> nvme_ns"/>
<policy label="rom_reporter -> acpi" report="acpi_drv -> acpi"/>
<policy label="rom_reporter -> pci_devices" report="platform_drv -> pci"/>
<policy label="rom_reporter -> usb_devices" report="usb_drv -> devices"/>
</config>
''
)
}
, rom_reporter =
Genode.Init.Start::{
, binary = "rom_reporter"
, resources = { caps = 96, ram = Genode.units.MiB 1 }
, config =
Some
( Genode.Prelude.XML.text
''
<config>
<rom label="acpi"/>
<rom label="pci_devices"/>
<rom label="usb_devices"/>
</config>
''
)
, routes =
let routeRomToReportRom =
Genode.ServiceRoute.childLabel "ROM" "report_rom"
let routeReportToParent =
λ(label : Text)
→ Genode.ServiceRoute.parentLabel
"Report"
(Some label)
(Some label)
in [ routeRomToReportRom (Some "acpi") (None Text)
, routeRomToReportRom (Some "pci_devices") (None Text)
, routeRomToReportRom (Some "usb_devices") (None Text)
, routeReportToParent "acpi"
, routeReportToParent "pci_devices"
, routeReportToParent "usb_devices"
]
}
, acpi_drv =
Genode.Init.Start::{
, binary = "acpi_drv"
, resources = { caps = 350, ram = Genode.units.MiB 4 }
, routes =
[ Genode.ServiceRoute.parent "IO_MEM"
, Genode.ServiceRoute.childLabel "Report" "report_rom" (Some "acpi") (None Text)
, Genode.ServiceRoute.parentLabel
"Report"
(Some "smbios_table")
(Some "smbios_table")
]
}
, platform_drv =
Genode.Init.Start::{
, binary = "platform_drv"
, resources = { caps = 400, ram = Genode.units.MiB 4 }
, constrainPhys = True
, provides = [ "Acpi", "Platform" ]
, routes =
[ Genode.ServiceRoute.parent "IRQ"
, Genode.ServiceRoute.parent "IO_MEM"
, Genode.ServiceRoute.parent "IO_PORT"
, Genode.ServiceRoute.parent "Timer"
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "system")
(Some "system")
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "acpi")
(None Text)
, Genode.ServiceRoute.childLabel
"Report"
"report_rom"
(Some "pci")
(None Text)
]
, config =
Some
( Genode.Prelude.XML.text
''
<config system="yes">
<report pci="yes"/>
<policy label_prefix="ps2_drv">
<device name="PS2"/>
</policy>
<policy label_prefix="dynamic -> vesa_fb_drv">
<pci class="VGA"/>
</policy>
<policy label_prefix="dynamic -> ahci_drv">
<pci class="AHCI"/>
</policy>
<policy label_prefix="dynamic -> nvme_drv">
<pci class="NVME"/>
</policy>
<policy label_prefix="usb_drv">
<pci class="USB"/>
</policy>
<policy label_prefix="dynamic -> intel_fb_drv">
<pci class="VGA"/>
<pci bus="0" device="0" function="0"/>
<pci class="ISABRIDGE"/>
</policy>
<policy label="acpica"> </policy>
</config>
''
)
}
, usb_drv =
Genode.Init.Start::{
, binary = "usb_drv"
, resources = { caps = 200, ram = Genode.units.MiB 16 }
, provides = [ "Input", "Usb" ]
, routes =
[ Genode.ServiceRoute.child "Platform" "platform_drv"
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "config")
(None Text)
, Genode.ServiceRoute.childLabel
"Report"
"report_rom"
(Some "devices")
(None Text)
, Genode.ServiceRoute.parentLabel
"Report"
(Some "config")
(Some "usb_active_config")
, Genode.ServiceRoute.parent "Timer"
]
}
, ps2_drv =
Genode.Init.Start::{
, binary = "ps2_drv"
, provides = [ "Input" ]
, routes =
[ Genode.ServiceRoute.child "Platform" "platform_drv"
, Genode.ServiceRoute.parent "Timer"
]
}
, input_filter =
Genode.Init.Start::{
, binary = "input_filter"
, resources = { caps = 90, ram = Genode.units.MiB 2 }
, provides = [ "Input" ]
, routes =
[ Genode.ServiceRoute.parent "Timer"
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "config")
(Some "input_filter.config")
, Genode.ServiceRoute.childLabel
"Input"
"ps2_drv"
(Some "ps2")
(None Text)
, Genode.ServiceRoute.childLabel
"Input"
"usb_drv"
(Some "usb")
(None Text)
]
}
, driver_manager =
Genode.Init.Start::{
, binary = "driver_manager"
, routes =
[ Genode.ServiceRoute.childLabel
"Report"
"report_rom"
(Some "init.config")
(None Text)
, Genode.ServiceRoute.childLabel
"Report"
"report_rom"
(Some "usb_drv.config")
(None Text)
, Genode.ServiceRoute.parentLabel
"Report"
(Some "block_devices")
(Some "block_devices")
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "usb_devices")
(None Text)
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "pci_devices")
(None Text)
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "ahci_ports")
(None Text)
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "nvme_ns")
(None Text)
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "usb_policy")
(Some "usb_policy")
]
}
, dynamic =
Genode.Init.Start::{
, binary = "init"
, resources = { caps = 1400, ram = Genode.units.MiB 64 }
, provides = [ "Framebuffer", "Block" ]
, routes =
[ Genode.ServiceRoute.child "Platform" "platform_drv"
, Genode.ServiceRoute.childLabel
"Report"
"report_rom"
(Some "ahci_ports")
(None Text)
, Genode.ServiceRoute.childLabel
"Report"
"report_rom"
(Some "nvme_ns")
(None Text)
, Genode.ServiceRoute.child "Usb" "usb_drv"
, Genode.ServiceRoute.childLabel
"ROM"
"report_rom"
(Some "config")
(None Text)
, Genode.ServiceRoute.parent "Report"
, Genode.ServiceRoute.parent "IO_MEM"
, Genode.ServiceRoute.parent "IO_PORT"
, Genode.ServiceRoute.parent "Timer"
]
}
}
}
in { arch =
let Arch = < x86_32 | x86_64 > in Arch.x86_64
, config =
Genode.Init::{
, children =
toMap
{ timer =
Genode.Init.Start::{
, binary = "nova_timer_drv"
, resources = { caps = 96, ram = Genode.units.MiB 1 }
, provides = [ "Timer" ]
}
, report_rom =
Genode.Init.Start::{
, binary = "report_rom"
, resources = { caps = 96, ram = Genode.units.MiB 1 }
, provides = [ "ROM", "Report" ]
, config =
Some (Genode.Prelude.XML.text "<config verbose=\"yes\"/>")
}
, drivers =
let subinit = Genode.Init.toStart drivers
in subinit
⫽ { provides =
[ "Input"
, "Framebuffer"
, "Block"
, "Usb"
, "Platform"
]
, routes =
[ Genode.ServiceRoute.parent "IO_MEM"
, Genode.ServiceRoute.parent "IO_PORT"
, Genode.ServiceRoute.parent "IRQ"
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "config")
(Some "drivers.config")
, Genode.ServiceRoute.child "Timer" "timer"
, Genode.ServiceRoute.child "Report" "report_rom"
]
}
, nitpicker =
Genode.Init.Start::{
, binary = "nitpicker"
, resources = { caps = 1000, ram = Genode.units.MiB 6 }
, provides = [ "Nitpicker" ]
, routes =
[ Genode.ServiceRoute.childLabel
"ROM"
"nit_focus"
(Some "focus")
(Some "focus")
, Genode.ServiceRoute.child "Report" "report_rom"
, Genode.ServiceRoute.child "Framebuffer" "drivers"
, Genode.ServiceRoute.child "Input" "drivers"
, Genode.ServiceRoute.child "Timer" "timer"
]
, config =
Some
( Genode.Prelude.XML.text
''
<config focus="rom">
<background color="#ffffff"/>
<domain name="default" layer="0" content="client" label="no" hover="always" focus="click" />
<default-policy domain="default"/>
</config>
''
)
}
, nit_focus =
Genode.Init.Start::{
, binary = "rom_filter"
, provides = [ "ROM" ]
, config =
Some
( Genode.Prelude.XML.text
''
<config>
<output node="focus">
<attribute name="label" value="oberon"/>
</output>
</config>
''
)
}
, oberon =
Genode.Init.Start::{
, binary = "retro_frontend"
, resources = { caps = 256, ram = Genode.units.MiB 32 }
, routes =
[ Genode.ServiceRoute.child "Nitpicker" "nitpicker"
, Genode.ServiceRoute.child "Timer" "timer"
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "")
(Some "retro_frontend")
]
, config =
Some
( Genode.Prelude.XML.text
''
<config ld_verbose="yes">
<libc stdout="/dev/log" stderr="/dev/log"/>
<defaultController port="0" device="3"/>
<game path="/Oberon.dsk"/>
<vfs>
<rom name="Oberon.dsk"/>
<dir name="dev">
<log label="core"/>
</dir>
</vfs>
</config>
''
)
}
}
}
, rom =
let manifest = env:MANIFEST
let emptyXML = λ(name : Text) → { mapKey = name, mapValue = "<empty/>" }
in Genode.Boot.toRomPaths
[ manifest.base-nova.lib.ld-nova ⫽ { mapKey = "ld.lib.so" }
, manifest.base-nova.bin.nova_timer_drv
, manifest.os.bin.acpi_drv
, manifest.os.bin.ahci_drv
, manifest.os.bin.init
, manifest.os.bin.input_filter
, manifest.os.bin.log_core
, manifest.os.bin.nitpicker
, manifest.os.bin.platform_drv
, manifest.os.bin.ps2_drv
, manifest.os.bin.report_rom
, manifest.os.bin.rom_filter
, manifest.os.bin.rom_reporter
, manifest.os.bin.vfs
, manifest.os.lib.vfs
, manifest.driver_manager.bin.driver_manager
, manifest.usb_drv.bin.usb_drv
, manifest.boot_fb_drv.bin.fb_boot_drv
, manifest.intel_fb_drv.bin.intel_fb_drv
, manifest.vesa_drv.bin.vesa_fb_drv
]
# Genode.Boot.toRomTexts
[ emptyXML "capslock"
, emptyXML "numlock"
, emptyXML "usb.config"
, emptyXML "usb_policy"
, { mapKey = "fb_drv.config"
, mapValue =
''
<config width="1024" height="768" buffered="yes">
<report connectors="yes"/>
<connector name="eDP-36" width="1920" height="1080" enabled="true"/>
<!-- <connector name="HDMI-A-56" width="1024" height="768" hz="75" enabled="true"/> -->
</config>
''}
, { mapKey = "input_filter.config"
, mapValue =
''
<config>
<input label="ps2"/>
<input label="usb"/>
<output>
<chargen>
<merge>
<input name="ps2"/>
<input name="usb"/>
</merge>
<repeat delay_ms="230" rate_ms="90"/>
</chargen>
</output>
</config>
''
}
]
}

@ -1,118 +0,0 @@
let Genode = env:DHALL_GENODE
in λ ( _
: {}
)
→ Genode.Init::{
, verbose = True
, children =
toMap
{ timer =
Genode.Init.Start::{
, binary = "timer"
, resources = { caps = 96, ram = Genode.units.MiB 1 }
, provides = [ "Timer" ]
}
, report_rom =
Genode.Init.Start::{
, binary = "report_rom"
, resources = { caps = 96, ram = Genode.units.MiB 1 }
, provides = [ "ROM", "Report" ]
, config =
Some (Genode.Prelude.XML.text "<config verbose=\"no\"/>")
}
, drivers =
Genode.Init.Start::{
, binary = "init"
, constrainPhys = True
, resources = { caps = 3000, ram = Genode.units.MiB 96 }
, provides =
[ "Input", "Framebuffer", "Block", "Usb", "Platform" ]
, routes =
[ Genode.ServiceRoute.parent "IO_MEM"
, Genode.ServiceRoute.parent "IO_PORT"
, Genode.ServiceRoute.parent "IRQ"
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "config")
(Some "drivers.config")
, Genode.ServiceRoute.child "Timer" "timer"
, Genode.ServiceRoute.child "Report" "report_rom"
]
}
, nitpicker =
Genode.Init.Start::{
, binary = "nitpicker"
, resources = { caps = 1000, ram = Genode.units.MiB 6 }
, provides = [ "Nitpicker" ]
, routes =
[ Genode.ServiceRoute.childLabel
"ROM"
"nit_focus"
(Some "focus")
(Some "focus")
, Genode.ServiceRoute.child "Report" "report_rom"
, Genode.ServiceRoute.child "Framebuffer" "drivers"
, Genode.ServiceRoute.child "Input" "drivers"
, Genode.ServiceRoute.child "Timer" "timer"
]
, config =
Some
( Genode.Prelude.XML.text
''
<config focus="rom">
<background color="#000000"/>
<domain name="default" layer="0" content="client" label="no" hover="always" focus="click" />
<default-policy domain="default"/>
</config>
''
)
}
, nit_focus =
Genode.Init.Start::{
, binary = "rom_filter"
, provides = [ "ROM" ]
, config =
Some
( Genode.Prelude.XML.text
''
<config>
<output node="focus">
<attribute name="label" value="oberon"/>
</output>
</config>
''
)
}
, oberon =
Genode.Init.Start::{
, binary = "retro_frontend"
, resources = { caps = 256, ram = Genode.units.MiB 32 }
, routes =
[ Genode.ServiceRoute.child "Nitpicker" "nitpicker"
, Genode.ServiceRoute.child "Timer" "timer"
, Genode.ServiceRoute.parentLabel
"ROM"
(Some "")
(Some "retro_frontend")
]
, config =
Some
( Genode.Prelude.XML.text
''
<config ld_verbose="yes">
<libc stdout="/dev/log" stderr="/dev/log"/>
<defaultController port="0" device="3"/>
<game path="/Oberon.dsk"/>
<vfs>
<rom name="Oberon.dsk"/>
<dir name="dev">
<log label="core"/>
</dir>
</vfs>
</config>
''
)
}
}
}

@ -1,213 +0,0 @@
<config prio_levels="2">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Timer"/>
<service name="Report"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<service name="Framebuffer">
<default-policy> <child name="dynamic"/> </default-policy> </service>
<service name="Block">
<default-policy> <child name="dynamic"/> </default-policy> </service>
<service name="Usb">
<default-policy> <child name="usb_drv"/> </default-policy> </service>
<service name="Platform">
<default-policy> <child name="platform_drv"/> </default-policy> </service>
<service name="Input">
<default-policy> <child name="input_filter"/> </default-policy> </service>
<start name="report_rom">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config verbose="no">
<policy label="platform_drv -> acpi" report="acpi_drv -> acpi"/>
<policy label="driver_manager -> pci_devices" report="platform_drv -> pci"/>
<policy label="usb_drv -> config" report="driver_manager -> usb_drv.config"/>
<policy label="driver_manager -> usb_devices" report="usb_drv -> devices"/>
<policy label="dynamic -> config" report="driver_manager -> init.config"/>
<policy label="driver_manager -> ahci_ports" report="dynamic -> ahci_ports"/>
<policy label="driver_manager -> nvme_ns" report="dynamic -> nvme_ns"/>
<policy label="rom_reporter -> acpi" report="acpi_drv -> acpi"/>
<policy label="rom_reporter -> pci_devices" report="platform_drv -> pci"/>
<policy label="rom_reporter -> usb_devices" report="usb_drv -> devices"/>
</config>
</start>
<start name="rom_reporter">
<resource name="RAM" quantum="1M"/>
<config>
<rom label="acpi"/>
<rom label="pci_devices"/>
<rom label="usb_devices"/>
</config>
<route>
<service name="ROM" label="acpi"> <child name="report_rom"/> </service>
<service name="ROM" label="pci_devices"> <child name="report_rom"/> </service>
<service name="ROM" label="usb_devices"> <child name="report_rom"/> </service>
<service name="Report" label="acpi"> <parent label="acpi"/> </service>
<service name="Report" label="pci_devices"> <parent label="pci_devices"/> </service>
<service name="Report" label="usb_devices"> <parent label="usb_devices"/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="acpi_drv" caps="350" priority="-1">
<resource name="RAM" quantum="4M"/>
<route>
<service name="Report" label="acpi"> <child name="report_rom"/> </service>
<service name="Report" label="smbios_table"> <parent label="smbios_table"/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="platform_drv" caps="400">
<resource name="RAM" quantum="4M" constrain_phys="yes"/>
<provides>
<service name="Platform"/>
<service name="Acpi"/>
</provides>
<route>
<service name="ROM" label="system"> <parent label="system"/> </service>
<service name="ROM" label="acpi"> <child name="report_rom"/> </service>
<service name="Report" label="pci"> <child name="report_rom"/> </service>
<service name="IRQ"> <parent/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="IO_PORT"> <parent/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
</route>
<config system="yes">
<report pci="yes"/>
<policy label_prefix="ps2_drv"> <device name="PS2"/> </policy>
<policy label_prefix="dynamic -> vesa_fb_drv"> <pci class="VGA"/> </policy>
<policy label_prefix="dynamic -> ahci_drv"> <pci class="AHCI"/> </policy>
<policy label_prefix="dynamic -> nvme_drv"> <pci class="NVME"/> </policy>
<policy label_prefix="usb_drv"> <pci class="USB"/> </policy>
<policy label_prefix="dynamic -> intel_fb_drv">
<pci class="VGA"/>
<pci bus="0" device="0" function="0"/>
<pci class="ISABRIDGE"/>
</policy>
<policy label="acpica"> </policy>
</config>
</start>
<start name="usb_drv" caps="200" priority="-1">
<resource name="RAM" quantum="16M"/>
<provides> <service name="Input"/> <service name="Usb"/> </provides>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="ROM" label="config">
<child name="report_rom"/> </service>
<service name="Report" label="devices"> <child name="report_rom"/> </service>
<service name="Report" label="config"> <parent label="usb_active_config"/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
</route>
</start>
<start name="ps2_drv" priority="0">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Input"/> </provides>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
</route>
</start>
<start name="input_filter" caps="90" priority="-1">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Input"/> </provides>
<route>
<service name="ROM" label="config"> <parent label="input_filter.config"/> </service>
<service name="Input" label="ps2"> <child name="ps2_drv"/> </service>
<service name="Input" label="usb"> <child name="usb_drv"/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
</route>
</start>
<start name="driver_manager" priority="-1">
<resource name="RAM" quantum="1M"/>
<route>
<service name="Report" label="init.config"> <child name="report_rom"/> </service>
<service name="Report" label="usb_drv.config"> <child name="report_rom"/> </service>
<service name="Report" label="block_devices"> <parent label="block_devices"/> </service>
<service name="ROM" label="usb_devices"> <child name="report_rom"/> </service>
<service name="ROM" label="pci_devices"> <child name="report_rom"/> </service>
<service name="ROM" label="ahci_ports"> <child name="report_rom"/> </service>
<service name="ROM" label="nvme_ns"> <child name="report_rom"/> </service>
<service name="ROM" label="usb_policy"> <parent label="usb_policy"/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="dynamic" caps="1400" priority="0">
<binary name="init"/>
<resource name="RAM" quantum="1G"/>
<provides>
<service name="Framebuffer"/>
<service name="Block"/>
</provides>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="Report" label="ahci_ports"> <child name="report_rom"/> </service>
<service name="Report" label="nvme_ns"> <child name="report_rom"/> </service>
<service name="Report"> <parent/> </service>
<service name="Usb"> <child name="usb_drv"/> </service>
<service name="ROM" label="config"> <child name="report_rom"/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="IO_PORT"> <parent/> </service>
<service name="Timer"> <parent/> </service>
</route>
</start>
</config>

@ -15,22 +15,22 @@
"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",
"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-depot": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-Y5ZOTgInrYYoas3vM8uTPLA2DvFI9YoI6haftIKl9go=",
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "nixpkgs",
"url": "github:edolstra/nixpkgs/015c9ec3372e328ea6742b409a1e9aa26dab2b31"
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-be9whulZ8unz1sq9PiFr+tuUAXlwiPEhIe0Z6jmfZiU=",
"narHash": "sha256-7eL2MfGgeEaIwJXPc4LQ7pBa4JeGicm9th7onjKgzsE=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=2f3162d88220bd6fa6b6fbc7c6d9fed68533a761"
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=8c2aafed45b4075e37f1cd93de0ebf93f38c83c3"
},
"genodepkgs": {
"inputs": {
@ -49,46 +49,33 @@
"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",
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=256810cd5adf1ae5862eed0ffdaab4cf49f6fe67"
},
"genode": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-HYX9rCn1dweN+L3ecNy4BiCGw4WEt1zgdIiAeYNY5GM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=12e31ac07c6d337760b3f59dc64c03f26cdd2009"
}
},
"narHash": "sha256-9/RR/CwvB1M2VSR7CrSVexYXN1YSSSE4WG4siDh0LE0=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=2a9178fced42cac986de07b6944afd4422d28976"
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
},
"genode-depot": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-Y5ZOTgInrYYoas3vM8uTPLA2DvFI9YoI6haftIKl9go=",
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "nixpkgs",
"url": "github:edolstra/nixpkgs/015c9ec3372e328ea6742b409a1e9aa26dab2b31"
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-be9whulZ8unz1sq9PiFr+tuUAXlwiPEhIe0Z6jmfZiU=",
"narHash": "sha256-7eL2MfGgeEaIwJXPc4LQ7pBa4JeGicm9th7onjKgzsE=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=2f3162d88220bd6fa6b6fbc7c6d9fed68533a761"
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=8c2aafed45b4075e37f1cd93de0ebf93f38c83c3"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-HYX9rCn1dweN+L3ecNy4BiCGw4WEt1zgdIiAeYNY5GM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=12e31ac07c6d337760b3f59dc64c03f26cdd2009"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-aVnK41/uYBqDxNOZpaIwLICkrBp5qYN0gehqoOCpOcg=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake",
"url": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake&rev=e92ee9b472fbc8238aa7b653eab28f50e46e0f25"
"narHash": "sha256-J57/0DZftyl9/H9mBblqoaHNDfSUmfny4TkbamdngO0=",
"originalUrl": "git+https://git.sr.ht/~ehmry/genodepkgs",
"url": "git+https://git.sr.ht/~ehmry/genodepkgs?ref=master&rev=d086d68b607d1a5f47fd8496ca1ab1b0b3085b4e"
},
"libretro-genode": {
"inputs": {
@ -109,63 +96,50 @@
"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",
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=256810cd5adf1ae5862eed0ffdaab4cf49f6fe67"
},
"genode": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-HYX9rCn1dweN+L3ecNy4BiCGw4WEt1zgdIiAeYNY5GM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=12e31ac07c6d337760b3f59dc64c03f26cdd2009"
}
},
"narHash": "sha256-9/RR/CwvB1M2VSR7CrSVexYXN1YSSSE4WG4siDh0LE0=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=2a9178fced42cac986de07b6944afd4422d28976"
"url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f"
},
"genode-depot": {
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-Y5ZOTgInrYYoas3vM8uTPLA2DvFI9YoI6haftIKl9go=",
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "nixpkgs",
"url": "github:edolstra/nixpkgs/015c9ec3372e328ea6742b409a1e9aa26dab2b31"
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-be9whulZ8unz1sq9PiFr+tuUAXlwiPEhIe0Z6jmfZiU=",
"narHash": "sha256-7eL2MfGgeEaIwJXPc4LQ7pBa4JeGicm9th7onjKgzsE=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git",
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=2f3162d88220bd6fa6b6fbc7c6d9fed68533a761"
"url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=8c2aafed45b4075e37f1cd93de0ebf93f38c83c3"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-HYX9rCn1dweN+L3ecNy4BiCGw4WEt1zgdIiAeYNY5GM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=12e31ac07c6d337760b3f59dc64c03f26cdd2009"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-aVnK41/uYBqDxNOZpaIwLICkrBp5qYN0gehqoOCpOcg=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake",
"url": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake&rev=e92ee9b472fbc8238aa7b653eab28f50e46e0f25"
"narHash": "sha256-J57/0DZftyl9/H9mBblqoaHNDfSUmfny4TkbamdngO0=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/genodepkgs",
"url": "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=master&rev=d086d68b607d1a5f47fd8496ca1ab1b0b3085b4e"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-HYX9rCn1dweN+L3ecNy4BiCGw4WEt1zgdIiAeYNY5GM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=12e31ac07c6d337760b3f59dc64c03f26cdd2009"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "github:ehmry/nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"narHash": "sha256-EhKnBXiXf/oCotqwqQzr0UlyX7mLqXOjQ2lDKgpPFKA=",
"narHash": "sha256-JK5whPvQfM0sa2szzqAttHyTyWvjRXcVdkQdmiROgmA=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/libretro-genode",
"url": "git+https://gitea.c3d2.de/ehmry/libretro-genode?ref=master&rev=7f84b6adc8443f41cb6584a7e72382360034542a"
"url": "git+https://gitea.c3d2.de/ehmry/libretro-genode?ref=master&rev=560196da91f40bfc2b173df05aa35936d0ed8f44"
},
"nixpkgs": {
"inputs": {},
"narHash": "sha256-HYX9rCn1dweN+L3ecNy4BiCGw4WEt1zgdIiAeYNY5GM=",
"originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode",
"url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=12e31ac07c6d337760b3f59dc64c03f26cdd2009"
"narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=",
"originalUrl": "nixpkgs",
"url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011"
}
},
"version": 3

@ -1,70 +1,50 @@
{
edition = 201909;
description = "Genode desktop varaint";
description = "Oberon RISC machine, emulated for x86_64";
inputs = {
dhall-haskell.uri =
"git+https://github.com/dhall-lang/dhall-haskell?ref=flake";
genode-depot.uri = "git+https://gitea.c3d2.de/ehmry/genode-depot.git";
genodepkgs.url = "git+https://gitea.c3d2.de/ehmry/genodepkgs?ref=flake";
genodepkgs.url = "git+https://git.sr.ht/~ehmry/genodepkgs";
libretro-genode.uri = "git+https://gitea.c3d2.de/ehmry/libretro-genode";
nixpkgs.uri = "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode";
};
outputs =
{ self, genodepkgs, nixpkgs, dhall-haskell, genode-depot, libretro-genode }:
{ self, genodepkgs, dhall-haskell, genode-depot, libretro-genode, nixpkgs }:
let
lib = import (genodepkgs + "/lib") {
inherit genodepkgs nixpkgs dhall-haskell genode-depot;
};
pleaseNo = builtins.toFile "empty.xml" "<empty/>";
in {
packages.x86_64-genode.iso = with genodepkgs.packages.x86_64-genode;
lib.x86_64-genode.buildNovaIso {
name = "oberon";
rom = let
upstream = base.src;
depot = genode-depot.packages.x86_64-genode;
libretro = libretro-genode.packages.x86_64-genode;
in {
config = lib.renderDhallInit ./config.dhall "{=}";
mkOutput = { system, localSystem, crossSystem }:
acpi_drv = "${os}/bin/acpi_drv";
ahci_drv = "${os}/bin/ahci_drv";
capslock = pleaseNo;
driver_manager = "${depot.driver_manager}/bin/driver_manager";
"drivers.config" = ./drivers.config;
"en_us.chargen" =
"${upstream}/repos/os/src/server/input_filter/en_us.chargen";
"fb_drv.config" =
"${upstream}/repos/os/recipes/raw/drivers_interactive-pc/fb_drv.config";
"input_filter.config" = ./input_filter.config;
input_filter = "${os}/bin/input_filter";
"libc.lib.so" = "${depot.libc}/lib/libc.lib.so";
"libm.lib.so" = "${depot.libc}/lib/libm.lib.so";
"libretro.so" = "${libretro.oberon}/bin/oberon/libretro.so";
log_core = "${os}/bin/log_core";
nitpicker = "${os}/bin/nitpicker";
numlock = pleaseNo;
"Oberon.dsk" =
"${libretro.oberon.smSrc}/DiskImage/Oberon-2019-01-21.dsk";
platform_drv = "${os}/bin/platform_drv";
ps2_drv = "${os}/bin/ps2_drv";
report_rom = "${os}/bin/report_rom";
rom_filter = "${os}/bin/rom_filter";
rom_reporter = "${os}/bin/rom_reporter";
"usb.config" = pleaseNo;
usb_drv = "${depot.usb_drv}/bin/usb_drv";
usb_policy = pleaseNo;
vesa_fb_drv = "${depot.vesa_drv}/bin/vesa_fb_drv";
"vfs.lib.so" = "${os}/lib/vfs.lib.so";
vfs = "${os}/bin/vfs";
};
let
thisSystem = builtins.getAttr system;
mergeManifests = manifests:
nixpkgs.legacyPackages.${localSystem}.writeTextFile {
name = "manifest.dhall";
text = with builtins;
let f = head: input: "${head},${input.pname}=${input.manifest}";
in (foldl' f "{" manifests) + "}";
};
in {
defaultPackage.${system} = with thisSystem genodepkgs.packages;
genodepkgs.apps.${system}.nova-iso.function {
MANIFEST = mergeManifests ((with genodepkgs.packages.${system}; [
genode.base-nova
genode.os
genode.gems
]) ++ (with genode-depot.packages.${system}; [ driver_manager usb_drv intel_fb_drv boot_fb_drv vesa_drv ]));
} ./boot.dhall;
};
defaultPackage = self.packages.x86_64-genode.iso;
crossOutput = mkOutput {
localSystem = "x86_64-linux";
crossSystem = "x86_64-genode";
system = "x86_64-linux-x86_64-genode";
};
in crossOutput // {
defaultPackage.x86_64-linux =
crossOutput.defaultPackage.x86_64-linux-x86_64-genode;
};
}

@ -1,13 +0,0 @@
<config>
<input label="ps2"/>
<input label="usb"/>
<output>
<chargen>
<merge>
<input name="ps2"/>
<input name="usb"/>
</merge>
<repeat delay_ms="230" rate_ms="90"/>
</chargen>
</output>
</config>
Loading…
Cancel
Save