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