From patchwork Fri Sep 20 07:31:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 15415 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id ADF03173F2; Fri, 20 Sep 2019 08:33:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 57F4D173AC for ; Fri, 20 Sep 2019 08:33:22 +0100 (BST) Received: from localhost ([::1]:53110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBDPt-0005tB-Nx for patchwork@mira.cbaines.net; Fri, 20 Sep 2019 03:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57149) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBDPd-0005rG-Er for guix-patches@gnu.org; Fri, 20 Sep 2019 03:33:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBDPb-0007ej-VH for guix-patches@gnu.org; Fri, 20 Sep 2019 03:33:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBDPb-0007ef-TE for guix-patches@gnu.org; Fri, 20 Sep 2019 03:33:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBDPb-0008Ka-Pq for guix-patches@gnu.org; Fri, 20 Sep 2019 03:33:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37466] [PATCH 3/4] gnu: Add heads-linuxboot. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2019 07:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37466 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37466@debbugs.gnu.org Received: via spool by 37466-submit@debbugs.gnu.org id=B37466.156896474231933 (code B ref 37466); Fri, 20 Sep 2019 07:33:03 +0000 Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 07:32:22 +0000 Received: from localhost ([127.0.0.1]:56707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBDOw-0008It-F8 for submit@debbugs.gnu.org; Fri, 20 Sep 2019 03:32:22 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:38086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBDOb-0008HY-Qr for 37466@debbugs.gnu.org; Fri, 20 Sep 2019 03:32:05 -0400 Received: from localhost.localdomain (77.116.217.78.wireless.dyn.drei.com [77.116.217.78]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E82523365516; Fri, 20 Sep 2019 09:32:00 +0200 (CEST) From: Danny Milosavljevic Date: Fri, 20 Sep 2019 09:31:48 +0200 Message-Id: <20190920073149.2933-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190920073149.2933-1-dannym@scratchpost.org> References: <20190920010248.28082-1-dannym@scratchpost.org> <20190920073149.2933-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/heads.scm (heads-linuxboot): New variable. --- gnu/packages/heads.scm | 48 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm index de97c8de6c..4412770ae3 100644 --- a/gnu/packages/heads.scm +++ b/gnu/packages/heads.scm @@ -489,7 +489,7 @@ done make-flags)) (BOARD (car (assoc-ref make-flags-assoc "BOARD"))) (out-images (string-append out "/libexec/heads/" BOARD "/images"))) - (mkdir -p out-images) + (mkdir-p out-images) (copy-recursively (string-append "build/" BOARD) out-images) ;; Contains timestamp. (delete-file (string-append out-images "/hashes.txt")) @@ -500,3 +500,49 @@ done payload to provide a secure, flexible boot environment for laptops and servers.") (license license:gpl2+)))) + +(define-public heads-linuxboot + (package + (inherit heads) + (name "heads-linuxboot") + (arguments + (substitute-keyword-arguments (package-arguments heads) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'unpack-heads-packages 'unpack-linuxboot + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "build") + (copy-recursively (assoc-ref inputs "linuxboot") "build/linuxboot-git") + (copy-recursively (assoc-ref inputs "edk2") "build/linuxboot-git/edk2") + (invoke "chmod" "-R" "u+w" "build/linuxboot-git") + (chmod "build/linuxboot-git/Makefile" #o664) + (substitute* "build/linuxboot-git/dxe/Makefile" + (("/usr/bin/") "")) + #t)))))) + (native-inputs + `(("edk2" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/linuxboot/edk2") + (commit "UDK2018") + (recursive? #t))) ; openssl + (file-name "edk2-checkout") + (sha256 + (base32 "0crjx1hg1m5mir2qm96dbcc3glrnww3ni0bc9f370qmm337wzlhi")))) + ("libuuid" ,util-linux) ; TODO: Move to heads' internal dependencies (for edk2). + ("nasm" ,nasm) ; TODO: Move to heads' internal dependencies (for edk2). + ("python" ,python-2) ; TODO: Move to heads' internal dependencies (for edk2). + ("acpica" ,acpica) ; TODO: Move to heads' internal dependencies (for edk2). + ("file" ,file) + ("linuxboot" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/osresearch/linuxboot.git") + (commit "b5376a441e8e85cbf722e943bb8294958e87c784") + (recursive? #t))) + (file-name "linuxboot-checkout") + (sha256 + (base32 "1bdj4m9dvih9fhp5q5c6cp5sphzbpag5gp4bz1p8g9lqi49lb7av")))) + ,@(package-native-inputs heads)))))