|
|
|
@ -4,11 +4,12 @@ let Genode = env:DHALL_GENODE
|
|
|
|
|
|
|
|
|
|
let Prelude = Genode.Prelude
|
|
|
|
|
|
|
|
|
|
let RomMap = Prelude.Map.Type Text Genode.Boot.Rom
|
|
|
|
|
|
|
|
|
|
let RomEntry = Prelude.Map.Entry Text Genode.Boot.Rom
|
|
|
|
|
|
|
|
|
|
let Configuration =
|
|
|
|
|
{ arch : < x86_32 | x86_64 >
|
|
|
|
|
, config : Genode.Init.Type
|
|
|
|
|
, rom : Prelude.Map.Type Text Text
|
|
|
|
|
}
|
|
|
|
|
{ arch : < x86_32 | x86_64 >, config : Genode.Init.Type, rom : RomMap }
|
|
|
|
|
: Type
|
|
|
|
|
|
|
|
|
|
in λ ( boot
|
|
|
|
@ -19,23 +20,26 @@ in λ ( boot
|
|
|
|
|
|
|
|
|
|
let TextIndex = { index : Text, value : Text }
|
|
|
|
|
|
|
|
|
|
let moduleKeys =
|
|
|
|
|
let keys = Prelude.Map.keys Text Text boot.rom
|
|
|
|
|
|
|
|
|
|
in [ "config" ] # keys
|
|
|
|
|
let rom =
|
|
|
|
|
[ { mapKey = "config"
|
|
|
|
|
, mapValue =
|
|
|
|
|
Genode.Boot.Rom.RomText (Genode.Init.render boot.config)
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
# boot.rom
|
|
|
|
|
|
|
|
|
|
let moduleKeys = Prelude.Map.keys Text Genode.Boot.Rom rom
|
|
|
|
|
|
|
|
|
|
let moduleValues =
|
|
|
|
|
let values = Prelude.Map.values Text Text boot.rom
|
|
|
|
|
let f =
|
|
|
|
|
λ(e : RomEntry)
|
|
|
|
|
→ merge
|
|
|
|
|
{ RomText = λ(text : Text) → ".ascii ${Text/show text}"
|
|
|
|
|
, RomPath = λ(path : Text) → ".incbin ${Text/show path}"
|
|
|
|
|
}
|
|
|
|
|
e.mapValue
|
|
|
|
|
|
|
|
|
|
let incbin =
|
|
|
|
|
Prelude.List.map
|
|
|
|
|
Text
|
|
|
|
|
Text
|
|
|
|
|
(λ(path : Text) → ".incbin ${Text/show path}")
|
|
|
|
|
values
|
|
|
|
|
|
|
|
|
|
in [ ".ascii ${Text/show (Genode.Init.render boot.config)}" ]
|
|
|
|
|
# incbin
|
|
|
|
|
in Prelude.List.map RomEntry Text f rom
|
|
|
|
|
|
|
|
|
|
let map =
|
|
|
|
|
λ(list : List Text)
|
|
|
|
@ -47,7 +51,7 @@ in λ ( boot
|
|
|
|
|
NaturalIndex
|
|
|
|
|
TextIndex
|
|
|
|
|
( λ(x : NaturalIndex)
|
|
|
|
|
→ { index = Prelude.Natural.show (x.index + 1)
|
|
|
|
|
→ { index = Prelude.Natural.show x.index
|
|
|
|
|
, value = x.value
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
@ -66,7 +70,9 @@ in λ ( boot
|
|
|
|
|
in ''
|
|
|
|
|
.set MIN_PAGE_SIZE_LOG2, 12
|
|
|
|
|
.set DATA_ACCESS_ALIGNM_LOG2, 3
|
|
|
|
|
|
|
|
|
|
.section .data
|
|
|
|
|
|
|
|
|
|
.p2align DATA_ACCESS_ALIGNM_LOG2
|
|
|
|
|
.global _boot_modules_headers_begin
|
|
|
|
|
_boot_modules_headers_begin:
|
|
|
|
@ -94,6 +100,7 @@ in λ ( boot
|
|
|
|
|
_boot_module_${m.index}_name:
|
|
|
|
|
.string "${m.value}"
|
|
|
|
|
.byte 0
|
|
|
|
|
|
|
|
|
|
''
|
|
|
|
|
)
|
|
|
|
|
++ ''
|
|
|
|
|