Dhall formatting
This commit is contained in:
parent
3494b589ec
commit
8beebf2ae1
|
@ -16,32 +16,32 @@ in λ ( boot
|
|||
)
|
||||
→ let NaturalIndex =
|
||||
{ index : Natural, value : Text }
|
||||
|
||||
|
||||
let TextIndex = { index : Text, value : Text }
|
||||
|
||||
|
||||
let moduleKeys =
|
||||
let keys = Prelude.Map.keys Text Text boot.rom
|
||||
|
||||
|
||||
in [ "config" ] # keys
|
||||
|
||||
|
||||
let moduleValues =
|
||||
let values = Prelude.Map.values Text Text boot.rom
|
||||
|
||||
|
||||
let incbin =
|
||||
Prelude.List.map
|
||||
Text
|
||||
Text
|
||||
(λ(path : Text) → ".incbin ${Text/show path}")
|
||||
values
|
||||
|
||||
|
||||
in [ ".ascii ${Text/show (Genode.Init.render boot.config)}" ]
|
||||
# incbin
|
||||
|
||||
|
||||
let map =
|
||||
λ(list : List Text)
|
||||
→ λ(f : TextIndex → Text)
|
||||
→ let indexedNatural = Prelude.List.indexed Text list
|
||||
|
||||
|
||||
let indexed =
|
||||
Prelude.List.map
|
||||
NaturalIndex
|
||||
|
@ -52,17 +52,17 @@ in λ ( boot
|
|||
}
|
||||
)
|
||||
indexedNatural
|
||||
|
||||
|
||||
let texts = Prelude.List.map TextIndex Text f indexed
|
||||
|
||||
|
||||
in Prelude.Text.concatSep "\n" texts
|
||||
|
||||
|
||||
let mapNames = map moduleKeys
|
||||
|
||||
|
||||
let mapValues = map moduleValues
|
||||
|
||||
|
||||
let addressType = merge { x86_32 = ".long", x86_64 = ".quad" } boot.arch
|
||||
|
||||
|
||||
in ''
|
||||
.set MIN_PAGE_SIZE_LOG2, 12
|
||||
.set DATA_ACCESS_ALIGNM_LOG2, 3
|
||||
|
@ -70,7 +70,7 @@ in λ ( boot
|
|||
.p2align DATA_ACCESS_ALIGNM_LOG2
|
||||
.global _boot_modules_headers_begin
|
||||
_boot_modules_headers_begin:
|
||||
|
||||
|
||||
''
|
||||
++ mapNames
|
||||
( λ ( m
|
||||
|
@ -85,7 +85,7 @@ in λ ( boot
|
|||
++ ''
|
||||
.global _boot_modules_headers_end
|
||||
_boot_modules_headers_end:
|
||||
|
||||
|
||||
''
|
||||
++ mapNames
|
||||
( λ(m : TextIndex)
|
||||
|
@ -98,10 +98,10 @@ in λ ( boot
|
|||
)
|
||||
++ ''
|
||||
.section .data.boot_modules_binaries
|
||||
|
||||
|
||||
.global _boot_modules_binaries_begin
|
||||
_boot_modules_binaries_begin:
|
||||
|
||||
|
||||
''
|
||||
++ mapValues
|
||||
( λ(m : TextIndex)
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
-- SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let baseLinux = env:BASE_LINUX_MANIFEST
|
||||
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
let Args =
|
||||
{ config : Genode.Init.Type, rom : Genode.Prelude.Map.Type Text Text }
|
||||
: Type
|
||||
|
@ -30,12 +25,16 @@ in λ(args : Args)
|
|||
]
|
||||
}
|
||||
, rom =
|
||||
[ { mapKey = "ld.lib.so"
|
||||
, mapValue = baseLinux.bin.ld-linux.mapValue
|
||||
}
|
||||
, baseLinux.bin.linux_timer_drv
|
||||
, os.bin.init
|
||||
, baseLinux.bin.core-linux
|
||||
]
|
||||
# args.rom
|
||||
let baseLinux = env:BASE_LINUX_MANIFEST
|
||||
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
in [ { mapKey = "ld.lib.so"
|
||||
, mapValue = baseLinux.bin.ld-linux.mapValue
|
||||
}
|
||||
, baseLinux.bin.linux_timer_drv
|
||||
, os.bin.init
|
||||
, baseLinux.bin.core-linux
|
||||
]
|
||||
# args.rom
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
in { config =
|
||||
Genode.Init::{
|
||||
, verbose = True
|
||||
|
@ -38,7 +36,8 @@ in { config =
|
|||
, binary = "fs_report"
|
||||
, resources = { caps = 96, ram = Genode.units.MiB 4 }
|
||||
, provides = [ "Report" ]
|
||||
, routes = [ Genode.ServiceRoute.child "File_system" "ram_fs" ]
|
||||
, routes =
|
||||
[ Genode.ServiceRoute.child "File_system" "ram_fs" ]
|
||||
, config =
|
||||
Some
|
||||
( Genode.Prelude.XML.text
|
||||
|
@ -50,11 +49,13 @@ in { config =
|
|||
, binary = "fs_rom"
|
||||
, resources = { caps = 96, ram = Genode.units.MiB 4 }
|
||||
, provides = [ "ROM" ]
|
||||
, routes = [ Genode.ServiceRoute.child "File_system" "ram_fs" ]
|
||||
, routes =
|
||||
[ Genode.ServiceRoute.child "File_system" "ram_fs" ]
|
||||
}
|
||||
, test-fs_report =
|
||||
Genode.Init.Start::{
|
||||
, binary = "test-fs_report"
|
||||
, exitPropagate = True
|
||||
, resources = { caps = 96, ram = Genode.units.MiB 4 }
|
||||
, provides = [ "Report" ]
|
||||
, config =
|
||||
|
@ -73,19 +74,19 @@ in { config =
|
|||
"fs_rom"
|
||||
(Some "focus")
|
||||
(None Text)
|
||||
, Genode.ServiceRoute.child
|
||||
"Report"
|
||||
"fs_report"
|
||||
, Genode.ServiceRoute.child "Report" "fs_report"
|
||||
, Genode.ServiceRoute.parent "Timer"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
, rom =
|
||||
[ os.bin.fs_report
|
||||
, os.bin.fs_rom
|
||||
, os.bin.ram_fs
|
||||
, os.bin.test-fs_report
|
||||
, os.lib.vfs
|
||||
]
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
in [ os.bin.fs_report
|
||||
, os.bin.fs_rom
|
||||
, os.bin.ram_fs
|
||||
, os.bin.test-fs_report
|
||||
, os.lib.vfs
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let base = env:BASE_MANIFEST
|
||||
|
||||
in { config =
|
||||
Genode.Init::{
|
||||
, verbose = True
|
||||
|
@ -18,5 +16,5 @@ in { config =
|
|||
}
|
||||
}
|
||||
}
|
||||
, rom = [ base.bin.test-log ]
|
||||
, rom = let base = env:BASE_MANIFEST in [ base.bin.test-log ]
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
in { config =
|
||||
Genode.Init::{
|
||||
, verbose = True
|
||||
|
@ -76,9 +74,11 @@ in { config =
|
|||
}
|
||||
}
|
||||
, rom =
|
||||
[ os.bin.acpi_drv
|
||||
, os.bin.platform_drv
|
||||
, os.bin.report_rom
|
||||
, os.bin.test-pci
|
||||
]
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
in [ os.bin.acpi_drv
|
||||
, os.bin.platform_drv
|
||||
, os.bin.report_rom
|
||||
, os.bin.test-pci
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let os = env:OS_MANIFEST
|
||||
|
||||
in { config =
|
||||
Genode.Init::{
|
||||
, verbose = True
|
||||
|
@ -18,5 +16,5 @@ in { config =
|
|||
}
|
||||
}
|
||||
}
|
||||
, rom = [ os.bin.test-signal ]
|
||||
, rom = let os = env:OS_MANIFEST in [ os.bin.test-signal ]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue