From 95d51d25aecf1b7d575403cb3cf3424911fcc2d0 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Feb 2024 16:56:48 +0000 Subject: [PATCH] test --- IO-Exit.patch | 13 +++++++++++++ overlay.nix | 7 +++++++ release.nix | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 IO-Exit.patch create mode 100644 overlay.nix diff --git a/IO-Exit.patch b/IO-Exit.patch new file mode 100644 index 0000000..b1c102e --- /dev/null +++ b/IO-Exit.patch @@ -0,0 +1,13 @@ +diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c +index ab6de69ce7..b309a36e17 100644 +--- a/hw/misc/debugexit.c ++++ b/hw/misc/debugexit.c +@@ -32,7 +32,7 @@ static uint64_t debug_exit_read(void *opaque, hwaddr addr, unsigned size) + static void debug_exit_write(void *opaque, hwaddr addr, uint64_t val, + unsigned width) + { +- exit((val << 1) | 1); ++ exit(val); + } + + static const MemoryRegionOps debug_exit_ops = { diff --git a/overlay.nix b/overlay.nix new file mode 100644 index 0000000..3ed335b --- /dev/null +++ b/overlay.nix @@ -0,0 +1,7 @@ + final: prev: { + patched-qemu = prev.qemu.overrideAttrs (previousAttrs: { + patches = previousAttrs.patches ++ [ + ./IO-Exit.patch + ]; + }); + } diff --git a/release.nix b/release.nix index 486533e..04eedd6 100644 --- a/release.nix +++ b/release.nix @@ -1,6 +1,7 @@ { ... }: let - pkgs = (import {}); + my_overlay = import ./overlay.nix + pkgs = import { overlay [ my_overlay ]; }; in { qemu = pkgs.qemu; }