patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH v2] host/rootfs: remove kernel override
@ 2022-09-08 10:04 José Pekkarinen
  0 siblings, 0 replies; only message in thread
From: José Pekkarinen @ 2022-09-08 10:04 UTC (permalink / raw)
  To: devel; +Cc: Alyssa Ross, José Pekkarinen

From: Alyssa Ross <hi@alyssa.is>

These drivers should be loaded by the initramfs if required — most
Spectrum installs won't need the virtio drivers on the host, and
overriding the kernel means more stuff we can't reuse from
cache.nixos.org.

We'll probably want to build in the driver for whatever filesystem we
end up using for the root file system eventually, since it will always
be required, but that should be done as part of a more systematic
effort to optimise our kernel configuration.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
---
[ v1 -> v2 ] Request mdev to load modules on boot

 host/rootfs/default.nix                         | 9 +--------
 host/rootfs/etc/modules-autoload.d/modules.conf | 4 ++++
 2 files changed, 5 insertions(+), 8 deletions(-)
 create mode 100644 host/rootfs/etc/modules-autoload.d/modules.conf

diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix
index e5f316f..a651a20 100644
--- a/host/rootfs/default.nix
+++ b/host/rootfs/default.nix
@@ -65,14 +65,7 @@ let
     imports = [ (modulesPath + "/profiles/all-hardware.nix") ];
   });
 
-  kernel = pkgs.linux_latest.override {
-    structuredExtraConfig = with lib.kernel; {
-      VIRTIO = yes;
-      VIRTIO_PCI = yes;
-      VIRTIO_BLK = yes;
-      EXT4_FS = yes;
-    };
-  };
+  kernel = pkgs.linux_latest;
 
   packagesSysroot = runCommand "packages-sysroot" {
     nativeBuildInputs = [ xorg.lndir ];
diff --git a/host/rootfs/etc/modules-autoload.d/modules.conf b/host/rootfs/etc/modules-autoload.d/modules.conf
new file mode 100644
index 0000000..dd9529a
--- /dev/null
+++ b/host/rootfs/etc/modules-autoload.d/modules.conf
@@ -0,0 +1,4 @@
+virtio
+virtio_pci
+virtio_blk
+ext4
-- 
2.25.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-08 10:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 10:04 [PATCH v2] host/rootfs: remove kernel override José Pekkarinen

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).