WiP! fbDriver option
This commit is contained in:
parent
d81056359b
commit
6c327a209b
|
@ -7,6 +7,8 @@ let
|
|||
|
||||
modulesPath = "${self.inputs.nixpkgs}/nixos/modules";
|
||||
|
||||
cfg = config.genode;
|
||||
|
||||
toVdi = config:
|
||||
import "${modulesPath}/../lib/make-disk-image.nix" {
|
||||
inherit config lib pkgs;
|
||||
|
@ -52,7 +54,7 @@ let
|
|||
|
||||
bootDescription = buildBootDescription {
|
||||
inherit initConfig;
|
||||
imageInputs = map pkgs'.genodeSources.depot [
|
||||
imageInputs = map pkgs'.genodeSources.depot ([
|
||||
"acpi_drv"
|
||||
"ahci_drv"
|
||||
"chroot"
|
||||
|
@ -80,7 +82,9 @@ let
|
|||
"vfs"
|
||||
"vfs_audit"
|
||||
"vfs_ttf"
|
||||
] ++ (with pkgs'; [ base-nova block_router ]);
|
||||
] ++ lib.optional (cfg.fbDriver == "vesa") "vesa_drv"
|
||||
++ lib.optional (cfg.fbDriver == "intel") "intel_fb_drv")
|
||||
++ (with pkgs'; [ base-nova block_router ]);
|
||||
extraBinaries = [
|
||||
"ld.lib.so"
|
||||
"libc.so"
|
||||
|
@ -106,8 +110,15 @@ let
|
|||
|
||||
in {
|
||||
|
||||
options.genode.guests = with lib;
|
||||
mkOption {
|
||||
options.genode = with lib; {
|
||||
fbDriver = mkOption {
|
||||
default = "vesa";
|
||||
type = types.enum [ "intel" "vesa" ];
|
||||
description = ''
|
||||
Set framebuffer driver.
|
||||
'';
|
||||
};
|
||||
guests = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ config, options, name, ... }: {
|
||||
options = {
|
||||
|
||||
|
@ -133,6 +144,7 @@ in {
|
|||
}));
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
system.build.genode = {
|
||||
|
|
|
@ -124,13 +124,16 @@ let rootInit =
|
|||
, pciClass = "ETHERNET"
|
||||
}
|
||||
, { labelSuffix = "usb_drv", pciClass = "USB" }
|
||||
, { labelSuffix = "vesa_fb_drv"
|
||||
, pciClass = "VGA"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
, framebuffer =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "intel_fb_drv"
|
||||
, binary = "vesa_fb_drv"
|
||||
, provides = [ "Framebuffer" ]
|
||||
, resources = Init.Resources::{
|
||||
, caps = 256
|
||||
|
@ -143,7 +146,7 @@ let rootInit =
|
|||
"Platform"
|
||||
"platform_drv"
|
||||
(None Text)
|
||||
(Some "intel_fb_drv")
|
||||
(Some "vesa_fb_drv")
|
||||
]
|
||||
}
|
||||
, input_filter =
|
||||
|
|
Loading…
Reference in New Issue