unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49934] [PATCH 1/3] gnu: Add libx86emu
@ 2021-08-07 21:58 phodina via Guix-patches via
  2021-08-07 22:03 ` [bug#49934] Subject: [PATCH 2/3] gnu: Add hwinfo phodina via Guix-patches via
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: phodina via Guix-patches via @ 2021-08-07 21:58 UTC (permalink / raw)
  To: 49934

* gnu/packages/hardware.scm: (libx86emu): New variable.

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 707a47fb4b..93be54cb18 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2021 Evgeny Pisemsky <evgeny@pisemsky.com>
 ;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +23,7 @@

 (define-module (gnu packages hardware)
   #:use-module (gnu packages admin)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
@@ -45,6 +47,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
@@ -256,6 +259,54 @@ specific SMBIOS tables.")
     (license
      (list license:osl2.1 license:gpl2+ license:bsd-3 license:boost1.0))))

+(define-public libx86emu
+(package
+  (name "libx86emu")
+  (version "3.1")
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+             (url "https://github.com/wfeldt/libx86emu")
+             (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "104xqc6nj9rpi7knl3dfqvasf087hlz2n5yndb1iycw35a6j509b"))))
+  (build-system gnu-build-system)
+  (arguments
+    `(#:make-flags (list
+                    (string-append "CC=" ,(cc-for-target))
+                    (string-append "DESTDIR=" %output)
+                    (string-append "LIBDIR=/lib"))
+      #:phases (modify-phases %standard-phases
+                (delete 'configure)
+                (add-after 'unpack 'fix-version-and-usr
+                 (lambda* (#:key inputs #:allow-other-keys)
+                  (delete-file "git2log")
+                  (let* ((file (open-file "VERSION" "a")))
+                   (display ,version file)
+                   (close-port file))
+                  (substitute* "Makefile"
+                           (("/usr") "/"))))
+                (replace 'check
+                 (lambda* _
+                  (invoke "make" "test"))))))
+  (native-inputs `(("git" ,git) ("perl" ,perl) ("nasm" ,nasm)))
+  (synopsis "Library for x86 emulation")
+  (description "Small library to emulate x86 instructions.  The focus here
+is not a complete emulation (go for qemu for this) but to cover enough for
+typical firmware blobs.
+@enumerate
+@item intercept any memory access or directly map real memory ranges
+@item intercept any i/o access, map real i/o ports, or block any real i/o
+@item intercept any interrupt
+@item provides hook to run after each instruction
+@item recognizes a special x86 instruction that can trigger logging
+@item has integrated logging
+@end enumerate")
+  (home-page "https://github.com/wfeldt/libx86emu")
+  (license license:bsd-1)))
+
 ;; Distinct from memtest86, which is obsolete.
 (define-public memtest86+
   (package
--
2.32.0




^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-06-24  8:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 21:58 [bug#49934] [PATCH 1/3] gnu: Add libx86emu phodina via Guix-patches via
2021-08-07 22:03 ` [bug#49934] Subject: [PATCH 2/3] gnu: Add hwinfo phodina via Guix-patches via
2021-08-07 22:05 ` [bug#49934] Subject: [PATCH 3/3] gnu: Add hw-probe phodina via Guix-patches via
2021-08-08 10:10 ` [bug#49934] [PATCH 1/3] gnu: Add libx86emu pelzflorian (Florian Pelz)
2021-08-09 12:00   ` phodina via Guix-patches via
2021-08-09 17:06     ` pelzflorian (Florian Pelz)
2021-08-30 21:34 ` [bug#49934] Hw-Probe Raghav Gururajan via Guix-patches via
2021-10-01 23:19 ` [bug#49934] [PATCH] gnu: Add hw-probe Raghav Gururajan via Guix-patches via
2021-10-02  9:58   ` Maxime Devos
2021-10-01 23:26 ` [bug#49934] HwInfo Raghav Gururajan via Guix-patches via
2021-12-09 11:51 ` [bug#49934] [PATCH v2] gnu: Add hw-probe Raghav Gururajan via Guix-patches via
2021-12-09 12:18 ` [bug#49934] [PATCH v3] " Raghav Gururajan via Guix-patches via
2021-12-16  5:53 ` [bug#49934] Hw-Probe Ricardo Wurmus
2021-12-25 21:17   ` Raghav Gururajan via Guix-patches via
2021-12-27  9:59     ` Efraim Flashner
2022-06-23 15:35     ` [bug#50283] HwInfo Maxim Cournoyer
2022-06-24  8:31       ` Raghav Gururajan via Guix-patches via

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

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).