From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wMmIEHACD2HLPQAAgWs5BA (envelope-from ) for ; Sun, 08 Aug 2021 00:00:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aGPxC3ACD2HESwAAbx9fmQ (envelope-from ) for ; Sat, 07 Aug 2021 22:00:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5C7BD2DDA1 for ; Sun, 8 Aug 2021 00:00:15 +0200 (CEST) Received: from localhost ([::1]:55212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCUMY-0000pQ-0I for larch@yhetil.org; Sat, 07 Aug 2021 18:00:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCUMM-0000ju-Fc for guix-patches@gnu.org; Sat, 07 Aug 2021 18:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCUMM-0007Z4-3N for guix-patches@gnu.org; Sat, 07 Aug 2021 18:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCUML-0001G7-VL for guix-patches@gnu.org; Sat, 07 Aug 2021 18:00:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49934] [PATCH 1/3] gnu: Add libx86emu Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Aug 2021 22:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49934 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49934@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16283735574737 (code B ref -1); Sat, 07 Aug 2021 22:00:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Aug 2021 21:59:17 +0000 Received: from localhost ([127.0.0.1]:53260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCULd-0001EK-EO for submit@debbugs.gnu.org; Sat, 07 Aug 2021 17:59:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:39810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCULZ-0001EA-Ly for submit@debbugs.gnu.org; Sat, 07 Aug 2021 17:59:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCULX-0007JY-OD for guix-patches@gnu.org; Sat, 07 Aug 2021 17:59:13 -0400 Received: from mail-4323.protonmail.ch ([185.70.43.23]:41028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCULV-0006wO-CI for guix-patches@gnu.org; Sat, 07 Aug 2021 17:59:11 -0400 Date: Sat, 07 Aug 2021 21:58:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1628373539; bh=PsfeW4ne7pTu/0Lra+tWYgG1tZLxwKQ0ux8PPjhFgKk=; h=Date:To:From:Reply-To:Subject:From; b=IzI+f9XrPZjY881TP+b8EQL/HuNM1sOirsSrGLayjJX+xzkCR+2xR/ztC4Bo3a05z 2+Cha0jh0gu7kLuOAQoPGtmz4w9HxvuKuawRJsbmBZatkHRRMf++zLx5XIgxsWsM+i kcAR6aHZs72E3kfXtbVIHRZdAXCclFSuuAvChFaU= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.23; envelope-from=phodina@protonmail.com; helo=mail-4323.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches From: phodina via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628373615; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=PsfeW4ne7pTu/0Lra+tWYgG1tZLxwKQ0ux8PPjhFgKk=; b=PJ9NASD6XTqcjbb2fuKgxkiVwjYnukUDZXcTfpOS0oBcDN7ERuADKMFyeqWl27yc9mV3SD t+877vUJ74AeG2x9Nhf0MqRH7iqdgDdo1QUZa0xo4y1kaWmQTeVJ6I98xwp7MSpFo0TFvg E/izeX6ZGN211Mzx9jHaGl6Vq+dS7NYRkuvH1Z0nkV+vVjr8ohEZmuqquZl92aKS+IwqAp /RsIZNNGi9txWeOkom9Gsnl64CR9IgbcDPI0pLd4Wx9pcNxSf5tyaFB8RTb6LOJLjnd2kP CsqaJR7QzqKHgfLuGy0mgpGBrFRwBFUayk99ly6bdCi0mEPqUhUHRngmhE/FyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628373615; a=rsa-sha256; cv=none; b=roJfbqN2oive8cAzRWV/128o8RT42e/dwT3LVm5gcXmbfPiT33TXQNbx7dV2Wr1xgnqmtt 0tcq2q6EYG2xCOcX84QeiNH+kNQ/D2/gkdc5zMgYErHTJW5U3NKqfAkP7CGt/DlyxkfbCs fY5kFVoIP1abPt3kebrcFE/Q1cQR6kZKOpOC8UnHf69Nan7Ed2TWbR+ceEIgbqAjv3w+sa N34GqOjRtWqMfNOHPKygm7zCf3ulmKMIxSVOrsSqjwVkRIKofNrkb7P2h8yWYLsOvPjTte K3XEegHQmNOA8UjiVA5hO413TZ2e6lmON+kZGi0d9Ka0qF7fAK10qDIf57Rtwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=IzI+f9Xr; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=IzI+f9Xr; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5C7BD2DDA1 X-Spam-Score: -2.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: OWQbN0Dqlz6f * 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 =C2=A9 2020 Brice Waegeneire ;;; Copyright =C2=A9 2021 Evgeny Pisemsky ;;; Copyright =C2=A9 2021 L=C3=A9o Le Bouter +;;; Copyright =C2=A9 2021 Petr Hodina ;;; ;;; 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=3D" ,(cc-for-target)) + (string-append "DESTDIR=3D" %output) + (string-append "LIBDIR=3D/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