nova-image: remove Arch union type
This commit is contained in:
parent
66db226f44
commit
0afe6af54d
|
@ -31,7 +31,7 @@ rec {
|
||||||
program = "${drv}/bin/nova-image";
|
program = "${drv}/bin/nova-image";
|
||||||
function = attrs: bootDesc:
|
function = attrs: bootDesc:
|
||||||
nixpkgs.runCommand "nova-iso" (attrs // { inherit bootDesc; })
|
nixpkgs.runCommand "nova-iso" (attrs // { inherit bootDesc; })
|
||||||
"${drv}/bin/nova-image $bootDesc > $out";
|
"XDG_CACHE_HOME=$TMPDIR ${drv}/bin/nova-image $bootDesc > $out";
|
||||||
};
|
};
|
||||||
|
|
||||||
nova-iso = let
|
nova-iso = let
|
||||||
|
@ -44,7 +44,7 @@ rec {
|
||||||
program = "${drv}/bin/nova-iso";
|
program = "${drv}/bin/nova-iso";
|
||||||
function = attrs: bootDesc:
|
function = attrs: bootDesc:
|
||||||
nixpkgs.runCommand "nova.iso" attrs
|
nixpkgs.runCommand "nova.iso" attrs
|
||||||
''${drv}/bin/nova-iso "${bootDesc}" > $out'';
|
''XDG_CACHE_HOME=$TMPDIR ${drv}/bin/nova-iso "${bootDesc}" > $out'';
|
||||||
};
|
};
|
||||||
|
|
||||||
render-init =
|
render-init =
|
||||||
|
|
|
@ -26,9 +26,9 @@ in nixpkgs.writeScriptBin "nova-image" (with nixpkgs.buildPackages;
|
||||||
|
|
||||||
export DHALL_PRELUDE=${packages.dhallPrelude}/package.dhall
|
export DHALL_PRELUDE=${packages.dhallPrelude}/package.dhall
|
||||||
export DHALL_GENODE=${packages.dhallGenode}/package.dhall
|
export DHALL_GENODE=${packages.dhallGenode}/package.dhall
|
||||||
${dhallApps.dhall.program} text <<< "${
|
${dhallApps.dhall.program} text <<< \
|
||||||
./nova-modules.as.dhall
|
"(${./nova-modules.as.dhall}).to32bitImage ($@)" \
|
||||||
} ($@)" > "$TMPDIR/modules.as"
|
> "$TMPDIR/modules.as"
|
||||||
|
|
||||||
# compile the boot modules into one object file
|
# compile the boot modules into one object file
|
||||||
$CC -c -x assembler -o "$TMPDIR/boot_modules.o" "$TMPDIR/modules.as"
|
$CC -c -x assembler -o "$TMPDIR/boot_modules.o" "$TMPDIR/modules.as"
|
||||||
|
|
|
@ -4,17 +4,13 @@ let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
let Prelude = Genode.Prelude
|
let Prelude = Genode.Prelude
|
||||||
|
|
||||||
let RomMap = Prelude.Map.Type Text Genode.Boot.Rom
|
|
||||||
|
|
||||||
let RomEntry = Prelude.Map.Entry Text Genode.Boot.Rom
|
let RomEntry = Prelude.Map.Entry Text Genode.Boot.Rom
|
||||||
|
|
||||||
let Configuration =
|
let compile =
|
||||||
{ arch : < x86_32 | x86_64 >, config : Genode.Init.Type, rom : RomMap }
|
λ ( addressType
|
||||||
: Type
|
: Text
|
||||||
|
|
||||||
in λ ( boot
|
|
||||||
: Configuration
|
|
||||||
)
|
)
|
||||||
|
→ λ(boot : Genode.Boot.Type)
|
||||||
→ let NaturalIndex =
|
→ let NaturalIndex =
|
||||||
{ index : Natural, value : Text }
|
{ index : Natural, value : Text }
|
||||||
|
|
||||||
|
@ -65,8 +61,6 @@ in λ ( boot
|
||||||
|
|
||||||
let mapValues = map moduleValues
|
let mapValues = map moduleValues
|
||||||
|
|
||||||
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
|
||||||
|
@ -124,3 +118,5 @@ in λ ( boot
|
||||||
.global _boot_modules_binaries_end
|
.global _boot_modules_binaries_end
|
||||||
_boot_modules_binaries_end:
|
_boot_modules_binaries_end:
|
||||||
''
|
''
|
||||||
|
|
||||||
|
in { to32bitImage = compile ".long", to64bitImage = compile ".quad" }
|
||||||
|
|
|
@ -2,15 +2,8 @@
|
||||||
|
|
||||||
let Genode = env:DHALL_GENODE
|
let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
let Prelude = Genode.Prelude
|
in λ(args : Genode.Boot.Type)
|
||||||
|
→ { config =
|
||||||
let RomMap = Prelude.Map.Type Text Genode.Boot.Rom
|
|
||||||
|
|
||||||
let Args = { config : Genode.Init.Type, rom : RomMap } : Type
|
|
||||||
|
|
||||||
in λ(args : Args)
|
|
||||||
→ { arch = let Arch = < x86_32 | x86_64 > in Arch.x86_64
|
|
||||||
, config =
|
|
||||||
Genode.Init::{
|
Genode.Init::{
|
||||||
, verbose = True
|
, verbose = True
|
||||||
, defaultRoutes =
|
, defaultRoutes =
|
||||||
|
|
|
@ -2,10 +2,8 @@
|
||||||
|
|
||||||
let Genode = env:DHALL_GENODE
|
let Genode = env:DHALL_GENODE
|
||||||
|
|
||||||
in λ ( _
|
in { config =
|
||||||
: {}
|
Genode.Init::{
|
||||||
)
|
|
||||||
→ Genode.Init::{
|
|
||||||
, verbose = True
|
, verbose = True
|
||||||
, children =
|
, children =
|
||||||
toMap
|
toMap
|
||||||
|
@ -34,3 +32,12 @@ in λ ( _
|
||||||
: Genode.Init.Start.Type
|
: Genode.Init.Start.Type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
, rom =
|
||||||
|
let manifest = env:MANIFEST
|
||||||
|
|
||||||
|
in Genode.Boot.toRomPaths
|
||||||
|
[ manifest.libc.lib.libc
|
||||||
|
manifest.libc.lib.libm
|
||||||
|
manifest.test-libc.bin.test-libc
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue