liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 045f10e79bca26ce46d24f08bdd4b03a9c4aa64f
parent 4ea60a6082e669dd1298a140b4a465eefff7401a
Author: Daniel Barlow <dan@telent.net>
Date:   Fri, 24 Mar 2023 17:12:19 +0000

build kexec statically

Diffstat:
Mmodules/kexecboot.nix | 1-
Moverlay.nix | 7+++++++
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/kexecboot.nix b/modules/kexecboot.nix @@ -26,7 +26,6 @@ in { outputs.boot-sh = let - inherit (pkgs) kexec-tools; inherit (pkgs.lib.trivial) toHexString; inherit (config.outputs) squashfs kernel; cmdline = concatStringsSep " " config.boot.commandLine; diff --git a/overlay.nix b/overlay.nix @@ -17,6 +17,13 @@ extraPkgs // { strace = prev.strace.override { libunwind = null; }; kexec-tools = prev.kexec-tools.overrideAttrs(o: { + # For kexecboot we copy kexec into a ramdisk on the system being + # upgraded from. This is more likely to work if kexec is + # statically linked so doesn't have dependencies on store paths that + # may not exist on that machine. (We can't nix-copy-closure as + # the store may not be on a writable filesystem) + LDFLAGS = "-static"; + patches = o.patches ++ [ (fetchpatch { # merge user command line options into DTB chosen