2
0
Fork 0

WiP! fbDriver option

This commit is contained in:
Ehmry - 2020-05-23 20:25:17 +05:30
parent 5c21ea3180
commit 3fc8f10a9c
2 changed files with 21 additions and 6 deletions

View File

@ -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 = {

View File

@ -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 =