From 70fa328574b926238c4fcd91786da6d850ce423a Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 9 Oct 2022 09:55:30 +0100 Subject: [PATCH] support out-of-tree module builds in vmlinux derivation run "make modules_prepare" to create scripts/modules.lds --- kernel/vmlinux.nix | 2 +- modules/base.nix | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/vmlinux.nix b/kernel/vmlinux.nix index 6851d4d..e0aa377 100644 --- a/kernel/vmlinux.nix +++ b/kernel/vmlinux.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { KBUILD_BUILD_HOST = "liminix.builder"; buildPhase = '' - make -C ${tree} vmlinux + make -C ${tree} vmlinux modules_prepare ''; installPhase = '' diff --git a/modules/base.nix b/modules/base.nix index a42e08d..b11a01a 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -53,6 +53,9 @@ in { IKCONFIG = "y"; IKCONFIG_PROC = "y"; PROC_FS = "y"; + + MODULES = "y"; + # s6-linux-init mounts this on /dev DEVTMPFS = "y"; # some or all of these may be fix for "tmpfs: Unknown parameter 'mode'" error