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