GNU bug report logs - #37466
[PATCH 0/4] Add heads.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Danny Milosavljevic <dannym@HIDDEN>; Keywords: patch; dated Fri, 20 Sep 2019 01:20:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 7 Oct 2019 13:50:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 07 09:50:15 2019
Received: from localhost ([127.0.0.1]:47487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iHTOw-0000vP-Ki
	for submit <at> debbugs.gnu.org; Mon, 07 Oct 2019 09:50:14 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:58304)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iHTOv-0000vC-3W
 for 37466 <at> debbugs.gnu.org; Mon, 07 Oct 2019 09:50:13 -0400
Received: from localhost (178.112.93.193.wireless.dyn.drei.com
 [178.112.93.193])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id A42753360181
 for <37466 <at> debbugs.gnu.org>; Mon,  7 Oct 2019 15:50:10 +0200 (CEST)
Date: Mon, 7 Oct 2019 15:50:04 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: Re: [WIP v4 1/7] gnu: Add musl-cross.
Message-ID: <20191007154955.4a338a13@HIDDEN>
In-Reply-To: <20191002211602.16635-2-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
 <20191002211602.16635-2-dannym@HIDDEN>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/x7g5wQMjJhFL7xfkyce/6aY"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/x7g5wQMjJhFL7xfkyce/6aY
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

in two weeks, if there are no objections, I'll push (only) musl-cross to gu=
ix
master.  It is the main thing you have to have on Guix so you can compile
Heads at all (even manually)--and I didn't modify it in some weeks now.

--Sig_/x7g5wQMjJhFL7xfkyce/6aY
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2bQowACgkQ5xo1VCww
uqVY7wf/axArj1qs8iKPofT0lkaNoSOWH+ysrUJI4wlQUgnZJfuNR54pwcPYMwMI
baH+7zPi8d7YUxGV6f1sfsRYAIvPpkNYdyJp6QltTcz4cviObAQ9LUqA49FIY53T
3pVatsYWfU7uwUbPtUZkVXHNfGCxkjWjY662LAh3niy5JCgJdP86DovAQE6hr8fp
Y8ohtHnqD+7n+TAwf7+1emd6wptjr18eSNby7v5bzOEjK86/VNcYeipLwx8yKG8t
WMI/3Dvj4oJwHgQ+2d+rRfay1P/0l4T8iu6F6M2d4vWkop8EAALwdcfSH715ybZU
SoaySJo6Mpg5l4+AasRZYEEMbjAxKA==
=D+Ey
-----END PGP SIGNATURE-----

--Sig_/x7g5wQMjJhFL7xfkyce/6aY--




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:47 2019
Received: from localhost ([127.0.0.1]:38454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlzE-00012U-2i
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:47 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyu-00010V-Ff
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:28 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 7C29233622B7;
 Wed,  2 Oct 2019 23:16:18 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 2/7] gnu: Add heads.
Date: Wed,  2 Oct 2019 23:15:57 +0200
Message-Id: <20191002211602.16635-3-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm (heads): New variable.
* gnu/packages/patches/heads-make-environment.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/heads.scm                        | 388 +++++++++++++++
 .../patches/heads-make-environment.patch      | 446 ++++++++++++++++++
 3 files changed, 835 insertions(+)
 create mode 100644 gnu/packages/patches/heads-make-environment.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 01c726d8cf..fb3c913f2c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -948,6 +948,7 @@ dist_patch_DATA =3D						\
   %D%/packages/patches/hdf-eos5-remove-gctp.patch		\
   %D%/packages/patches/hdf-eos5-fix-szip.patch			\
   %D%/packages/patches/hdf-eos5-fortrantests.patch		\
+  %D%/packages/patches/heads-make-environment.patch		\
   %D%/packages/patches/higan-remove-march-native-flag.patch	\
   %D%/packages/patches/hubbub-sort-entities.patch		\
   %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch        \
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index b547a374e0..311eeeb1a1 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -4,8 +4,12 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
@@ -13,8 +17,11 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages cpio)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization))
@@ -122,3 +129,384 @@ done
     (synopsis "Musl-cross gcc 5 toolchain")
     (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
     (license license:isc))))
+
+(define heads
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "heads")
+    (version (git-version "0.1" revision commit))
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+             (url "https://github.com/osresearch/heads.git")
+             (commit commit)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "0sgyqm4ss88hfp8miz40mw40kj7qp2khr7jcvscwv87bd5g9nwnx"))
+      (patches (search-patches "heads-make-environment.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("bash" ,bash)
+       ("git" ,git)
+       ("perl" ,perl)
+       ("cpio" ,cpio)
+       ("m4" ,m4)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("curl" ,curl) ; unused
+       ("zlibx" ,zlib)
+       ("musl-cross" ,musl-cross)
+       ("elfutils" ,elfutils)
+       ("bc" ,bc)
+       ("findutils" ,findutils)
+       ("flashtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/flashtools.git")
+                 (commit "9acce09aeb635c5bef01843e495b95e75e8da135")))
+           (file-name "flashtools-checkout")
+           (sha256
+            (base32 "0r4gj3nzr67ycd39k1vjzxfzkp90yacrdgxhc1z5jfvxfq4x91c1"=
))))
+       ("tpmtotp"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/tpmtotp.git")
+                 (commit "18b860fdcf5a55537c8395b891f2b2a5c24fc00a")))
+           (file-name "tpmtotp-checkout")
+           (sha256
+            (base32 "112p5afkrbipr0d8x9r9mrxrr3xyf97s2y3f32p41vs951sksqnv"=
))))
+       ("msrtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/msr-tools.git")
+                 (commit "572ef8a2b873eda15a322daa48861140a078b92c")))
+           (file-name "msr-tools-checkout")
+           (sha256
+            (base32 "0an1ypj5pin9l413vn4gxzi3x6ir1rba9jv6n5gk6s9dq803lb6p"=
))))
+       ("coreboot-blobs"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-blobs-4.8.1.ta=
r.xz")
+           (sha256
+            (base32 "15g222xj1zdn8i8qz0pw2jf28h66dljb1q5isw2ml05gwfd51ahq"=
))))
+       ("coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz")
+           (sha256
+            (base32 "08xdd5drk8yd37a3z5hc81qmgsybv6201i28hcggxh980vdz9pgh"=
))))
+       ("linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.6=
2.tar.xz")
+           (sha256
+            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"=
))))
+       ("musl" ; useless
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.musl-libc.org/releases/musl-1.1.15.tar.gz")
+           (sha256
+            (base32 "1ymhxkskivzph0q34zadwfglc5gyahqajm7chqqn2zraxv3lgr4p"=
))))
+       ("busybox"
+        ,(origin
+           (method url-fetch)
+           (uri "https://busybox.net/downloads/busybox-1.28.0.tar.bz2")
+           (sha256
+            (base32 "1701carjf02y7r3djm1yvyd5kzrcxm4szinp7agfv7fmvfvm6ib0"=
))))
+       ("zlib"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.zlib.net/zlib-1.2.11.tar.gz")
+           (sha256
+            (base32 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"=
))))
+       ("mbedtls"
+        ,(origin
+           (method url-fetch)
+           (uri "https://tls.mbed.org/download/mbedtls-2.4.2-gpl.tgz")
+           (sha256
+            (base32 "17r9qs585gqghcf5yavb1cnvsigl0f8r0k8rklr5a855hrajs7yh"=
))))
+       ("kexec-tools"
+        ,(origin
+           (method url-fetch)
+           (uri "https://kernel.org/pub/linux/utils/kernel/kexec/kexec-too=
ls-2.0.16.tar.gz")
+           (sha256
+            (base32 "0fkg5y3wxvkqrjii90iz1i59qd6hhq7ar27f0sgv7jbppyczq5yg"=
))))
+       ("qrencode"
+        ,(origin
+           (method url-fetch)
+           (uri "https://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz")
+           (sha256
+            (base32 "0wiagx7i8p9zal53smf5abrnh9lr31mv0p36wg017401jrmf5577"=
))))
+       ("pciutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/software/utils/pciutils/pciuti=
ls-3.5.4.tar.xz")
+           (sha256
+            (base32 "0rpy7kkb2y89wmbcbfjjjxsk2x89v5xxhxib4vpl131ip5m3qab4"=
))))
+       ("util-linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/util-linux/v2.29/u=
til-linux-2.29.2.tar.xz")
+           (sha256
+            (base32 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"=
))))
+       ("flashrom"
+        ,(origin
+           (method url-fetch)
+           (uri "https://download.flashrom.org/releases/flashrom-1.0.tar.b=
z2")
+           (sha256
+            (base32 "0r7fkpfc8w51n8ffbhclj4wa3kwrk0ijv1acwpw5myx5bchzl0ip"=
))))
+       ("popt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://launchpad.net/popt/head/1.16/+download/popt-1.16.=
tar.gz")
+           (sha256
+            (base32 "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"=
))))
+       ("lvm2"
+        ,(origin
+           (method url-fetch)
+           (uri "https://mirrors.kernel.org/sourceware/lvm2/LVM2.2.02.168.=
tgz")
+           (sha256
+            (base32 "03b62hcsj9z37ckd8c21wwpm07s9zblq7grfh58yzcs1vp6x38r3"=
))))
+       ("cryptsetup"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cr=
yptsetup-1.7.3.tar.xz")
+           (sha256
+            (base32 "00nwd96m9yq4k3cayc04i5y7iakkzana35zxky6hpx2w8zl08axg"=
))))
+       ("libgpg-error"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.=
32.tar.bz2")
+           (sha256
+            (base32 "1jj08ns4sh1hmafqp1giskvdicdz18la516va26jycy27kkwaif3"=
))))
+       ("libgcrypt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.3.ta=
r.bz2")
+           (sha256
+            (base32 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"=
))))
+       ("libksba"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz=
2")
+           (sha256
+            (base32 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"=
))))
+       ("libassuan"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.1.ta=
r.bz2")
+           (sha256
+            (base32 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"=
))))
+       ("npth"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2")
+           (sha256
+            (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"=
))))
+       ("libusb"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-1=
.0/libusb-1.0.21/libusb-1.0.21.tar.bz2")
+           (sha256
+            (base32 "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx"=
))))
+       ("libusb-compat"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-c=
ompat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2")
+           (sha256
+            (base32 "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"=
))))
+       ("dropbear"
+        ,(origin
+           (method url-fetch)
+           (uri "https://matt.ucc.asn.au/dropbear/releases/dropbear-2016.7=
4.tar.bz2")
+           (sha256
+            (base32 "14c8f4gzixf0j9fkx68jgl85q7b05852kk0vf09gi6h0xmafl817"=
))))
+       ("pinentry"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.=
tar.bz2")
+           (sha256
+            (base32 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"=
))))
+       ("gnupg"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.10.tar.b=
z2")
+           (sha256
+            (base32 "05f9804g72pffdxgvxjmjzkfcpjg1x221g9rwcr8fi51hrxd77br"=
))))
+       ("slang"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.jedsoft.org/releases/slang/slang-2.3.1a.tar.b=
z2")
+           (sha256
+            (base32 "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l"=
))))
+       ("newt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://releases.pagure.org/newt/newt-0.52.20.tar.gz")
+           (sha256
+            (base32 "1g3dpfnvaw7vljbr7nzq1rl88d6r8cmrvvng9inphgzwxxmvlrld"=
))))
+
+       ;;; coreboot cross.
+
+       ("gmp"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz")
+           (sha256
+            (base32 "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7"=
))))
+       ("mpfr"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz")
+           (sha256
+            (base32 "1g32l2fg8f62lcyzzh88y3fsh6rk539qc6ahhdgvx7wpnf1dwpq1"=
))))
+       ("mpc"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpc/mpc-1.0.3.tar.gz")
+           (sha256
+            (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"=
))))
+       ("binutils-2.30"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/binutils/binutils-2.30.tar.xz")
+           (sha256
+            (base32 "1rhshw4m5m2pjz8g15hpiwhp52kn0pj0b5dxy0v7lwigmspbhikf"=
))))
+       ("gcc-8"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz")
+           (sha256
+            (base32 "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x"=
))))
+       ;; Note: Non-coreboot heads really doesn't need that.
+       ("acpica-coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://acpica.org/sites/acpica/files/acpica-unix2-201805=
31.tar.gz")
+           (sha256
+            (base32 "0q7vg1nr51f3rg16vjh4glz361a64r6gpm46fqkl2jf4fq7g43g5"=
))))))
+    (arguments
+     `(#:tests? #f ; Toplevel makefile has no tests.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; For edk2 and kexec-tools.
+             ;; FIXME: musl *musl-cross*/x86_64-linux-musl/bin/x86_64-linu=
x-musl-gcc || ./x86_64-linux-musl/x86_64-linux-musl/bin/musl-gcc.
+             (setenv "BUILD_CC" (string-append (assoc-ref inputs "musl-cro=
ss") "/crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-gcc"))
+             ;; Disable wget.
+             (setenv "WGET" "true")
+             ;; Work around mcheck.h problem (in glibc!?)
+             (substitute* "modules/popt"
+              (("[.]/configure") "CFLAGS=3D\"-D__END_DECLS -D__BEGIN_DECLS=
 -D__THROW\" ./configure"))
+             #t))
+         (add-after 'unpack 'unpack-heads-packages
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory desti=
nation-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))
+                 ;(invoke "tar" "-xf" source-file "-C" "build")
+))
+             (mkdir-p "packages")
+             (setenv "V" "1") ; verbose
+             (setenv "GUIX_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+             (setenv "GUIX_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH=
"))
+             (setenv "GUIX_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+             (setenv "GUIX_CPATH" (getenv "CPATH"))
+             (for-each (lambda (name)
+                         (install-file* name "packages" ".tmp"))
+                       '("linux" "coreboot-blobs" "coreboot" "busybox" "zl=
ib" "mbedtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "=
popt" "lvm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" =
"npth" "libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt=
" "musl"))
+             (mkdir-p "build")
+             (mkdir-p "build/musl-cross-git/tarballs")
+             (mkdir-p "build/coreboot-4.8.1/util/crossgcc/tarballs")
+             (for-each (lambda (name)
+                         (install-file* name "build/coreboot-4.8.1/util/cr=
ossgcc/tarballs" ""))
+                       '("gmp" "mpfr" "mpc" "binutils-2.30" "gcc-8" "acpic=
a-coreboot"))
+             (copy-recursively (assoc-ref inputs "musl-cross") "build/musl=
-cross-git")
+             (copy-recursively (assoc-ref inputs "tpmtotp") "build/tpmtotp=
-git")
+             (copy-recursively (assoc-ref inputs "flashtools") "build/flas=
htools-0.0.1")
+             (copy-recursively (assoc-ref inputs "msrtools") "build/msrtoo=
ls-git")
+
+             (setenv "MUSL_DIR" (assoc-ref inputs "musl-cross"))
+             (setenv "CROSS" (string-append (getenv "MUSL_DIR") "/crossgcc=
/x86_64-linux-musl/bin/x86_64-musl-linux-")) ; Note: Useless
+             (substitute* "Makefile"
+              ;; Disable our non-cross toolchain environment.
+              (("CROSS_TOOLS_NOCC :=3D ")
+               ; CPP=3D" (getenv "CROSS") "cpp CXXCPP=3D" (getenv "CROSS")=
 "cpp "
+               (string-append "CROSS_TOOLS_NOCC :=3D C_INCLUDE_PATH=3D CPL=
US_INCLUDE_PATH=3D LIBRARY_PATH=3D CPATH=3D "))
+              ;; Disable git.
+              (("git submodule update --init")
+               "true submodule update --init")
+              ;; Re-enable our non-cross toolchain environment selectively.
+              (("^WGET.*")
+               (string-append "HOSTCC =3D" ; for busybox
+                              " C_INCLUDE_PATH=3D" (or (getenv "GUIX_C_INC=
LUDE_PATH") "")
+                              " CPLUS_INCLUDE_PATH=3D" (or (getenv "GUIX_C=
PLUS_INCLUDE_PATH") "")
+                              " CPATH=3D" (or (getenv "GUIX_CPATH") "")
+                              " LIBRARY_PATH=3D" (or (getenv "GUIX_LIBRARY=
_PATH") "")
+                              " gcc\n"
+                              "CC_FOR_BUILD =3D $(HOSTCC)\n" ; for libgpg-=
error
+                              "BUILD_CC =3D $(HOSTCC)\n")) ; for kexec-too=
ls
+              ;; Disable git, patch shebangs, and selectively re-enable ho=
st compiler.
+              ;; (Note: $HOSTCC is too complicated for bash, for example
+              ;; HOSTCC=3D"a=3Db c=3Dd gcc", then invoking $HOSTCC won't w=
ork).
+              (("(git clone.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed applets/busybox.mkll applet=
s/busybox.mksuid po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in =
*-config.in src/*-config.in src/Makefile.in applets/install.sh applets/busy=
box.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry.=
sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests/=
runtest modules/test/runtests.sh src/test/runtests.sh mkfiles/build.sh auto=
conf/* demo/Makefile.in slsh/Makefile.in util/xcompile/xcompile util/genbui=
ld_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>;=
~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/fi=
le\\>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -=
e 's;/usr/bin/env bash;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^TE=
RMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;^HOSTCC.*$$$$;HOSTCC=3DC_INCLUDE_PATH=
=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=3D\"$(GUIX_CPLUS_INCLUDE_P=
ATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=3D\"$(GUIX_LIBRARY_PATH)\" gc=
c;' -e 's;^\\(\\$$$$HOSTCC[^|]*\\);(echo \\1 | bash);' \"$$$$s\" ; fi ; don=
e)
+" "true" (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref in=
puts "bash")))
+              (("(tar -xf.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed applets/busybox.mkll applet=
s/busybox.mksuid  po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in=
 *-config.in src/*-config.in src/Makefile.in applets/install.sh applets/bus=
ybox.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry=
.sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests=
/runtest modules/test/runtests.sh src/test/runtests.sh mkfiles/build.sh aut=
oconf/* demo/Makefile.in slsh/Makefile.in util/xcompile/xcompile util/genbu=
ild_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>=
;~a/bin/sh;' -e 's;^TERMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;/bin/pwd\\>;pwd;=
' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;f=
alse;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's;/usr/bin/env bash;~a/bin/bash=
;' -e 's;git clone;true clone;' -e 's;^HOSTCC.*$$$$;HOSTCC=3DC_INCLUDE_PATH=
=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=3D\"$(GUIX_CPLUS_INCLUDE_P=
ATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=3D\"$(GUIX_LIBRARY_PATH)\" gc=
c;' -e 's;^\\(\\$$$$HOSTCC[^|]*\\);(echo \\1 | bash);' \"$$$$s\" ; fi ; don=
e)
+" tar (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref input=
s "bash"))))
+             ;(substitute* "modules/musl-cross"
+             ; (("/bin/echo") "echo"))
+             (call-with-output-file "patches/coreboot-4.8.1/9999-shell.pat=
ch"
+               (lambda (port)
+                 (format port "--- coreboot-4.8.1/util/crossgcc/buildgcc.o=
rig 2019-09-13 14:45:12.463998974 +0200
++++ coreboot-4.8.1/util/crossgcc/buildgcc 2019-09-13 14:46:49.808268216 +0=
200
+@@ -462,6 +462,13 @@
+ 			}
+ 		done
+ 		touch \"${dir}/.unpack_success\"
++  for s in \"${dir}/Makefile\" \"${dir}/configure\" \"${dir}/config.sub\"=
 \"${dir}/config.guess\" \"${dir}/mpn/cpp-ccas\" \"${dir}/mpn/m4-ccas\" \"$=
{dir}/missing\" \"${dir}/\"*\"/configure\" \"${dir}/move-if-change\" \"${di=
r}/libgcc/mkheader.sh\" \"${dir}/gcc/genmultilib\"
++  do
++   if [ -f \"${s}\" ]
++   then
++    sed -i -e 's;/bin/sh\\>;~a/bin/sh;' \"${s}\"
++   fi
++  done
+ 	)
+ }
+=20
+" (assoc-ref inputs "bash"))))
+             #t))
+         (add-after 'install 'install-images
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (make-flags-assoc (map (lambda (x)
+                                             (string-split x #\=3D))
+                                           make-flags))
+                    (BOARD (car (assoc-ref make-flags-assoc "BOARD")))
+                    (out-images (string-append out "/libexec/heads/" BOARD=
 "/images")))
+               (mkdir-p out-images)
+               (copy-recursively (string-append "build/" BOARD) out-images)
+               ;; Contains timestamp.
+               (delete-file (string-append out-images "/hashes.txt"))
+               #t))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Heads: coreboot/LinuxBoot payload")
+    (description "A minimal Linux that runs as a coreboot or LinuxBoot ROM
+payload to provide a secure, flexible boot environment for laptops and
+servers.")
+    (license license:gpl2+))))
diff --git a/gnu/packages/patches/heads-make-environment.patch b/gnu/packag=
es/patches/heads-make-environment.patch
new file mode 100644
index 0000000000..f38d08ee51
--- /dev/null
+++ b/gnu/packages/patches/heads-make-environment.patch
@@ -0,0 +1,446 @@
+diff --git a/Makefile b/Makefile
+index cc5cac6..ae8d7e7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -124,10 +124,14 @@ CROSS_TOOLS_NOCC :=3D \
+=20
+ CROSS_TOOLS :=3D \
+ 	CC=3D"$(heads_cc)" \
++	CPP=3D"$(CROSS)cpp" \
++	CXXCPP=3D"$(CROSS)cpp" \
++	CC_FOR_BUILD=3D"$(CC_FOR_BUILD)" \
++	BUILD_CC=3D"$(BUILD_CC)" \
++	HOSTCC=3D"$(HOSTCC)" \
+ 	$(CROSS_TOOLS_NOCC) \
+=20
+=20
+-
+ ifeq "$(CONFIG_COREBOOT)" "y"
+ all: $(build)/$(BOARD)/coreboot.rom
+ else ifeq "$(CONFIG_LINUXBOOT)" "y"
+@@ -348,7 +352,7 @@ define define_module =3D
+ 		echo "$(MAKE) \
+ 			-C \"$(build)/$($1_dir)\" \
+ 			$($1_target)" ;  \
+-		$(MAKE) \
++		$($1_make_environment) $(MAKE) \
+ 			-C "$(build)/$($1_dir)" \
+ 			$($1_target)  \
+ 	) \
+@@ -453,7 +457,7 @@ $(COREBOOT_UTIL_DIR)/inteltool/inteltool \
+ : $(build)/$(coreboot_base_dir)/.canary \
+ 	$(build)/$(musl_dir)/.build
+ 	+$(call do,MAKE,$(notdir $@),\
+-		$(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \
++		CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=3D LIBRARY_PATH=3D $(MAKE=
) -C "$(dir $@)" $(CROSS_TOOLS) \
+ 	)
+=20
+ # superio depends on zlib and pciutils
+diff --git a/modules/busybox b/modules/busybox
+index f8f8a83..4836780 100644
+--- a/modules/busybox
++++ b/modules/busybox
+@@ -11,6 +11,7 @@ busybox_hash :=3D 604553b7dbd59ded9e3ad7c6af49ed2cff599a=
df3e54d9463e5e0027b362019c
+ busybox_configure :=3D $(MAKE) CC=3D"$(heads_cc)" oldconfig
+ busybox_config :=3D config/busybox.config
+ busybox_output :=3D busybox
++busybox_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ busybox_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	$(MAKE_JOBS) \
+diff --git a/modules/cairo b/modules/cairo
+index 647ed2c..00f6cac 100644
+--- a/modules/cairo
++++ b/modules/cairo
+@@ -23,6 +23,7 @@ cairo_configure :=3D \
+ 	&& mv libtool-2 libtool \
+ 	&& chmod 755 libtool
+=20
++cairo_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ cairo_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/cryptsetup b/modules/cryptsetup
+index 4cea7f3..d68da0c 100644
+--- a/modules/cryptsetup
++++ b/modules/cryptsetup
+@@ -20,6 +20,7 @@ cryptsetup_configure :=3D ./configure \
+=20
+ # but after building, replace prefix so that they will be installed
+ # in the correct directory.
++cryptsetup_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ cryptsetup_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	&& $(MAKE) \
+diff --git a/modules/dropbear b/modules/dropbear
+index 998087c..834a3ef 100644
+--- a/modules/dropbear
++++ b/modules/dropbear
+@@ -19,6 +19,7 @@ dropbear_configure :=3D ./configure \
+ 	--disable-wtmpx \
+=20=09
+ dropbear_output :=3D ssh scp dropbear
++dropbear_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ dropbear_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/fbwhiptail b/modules/fbwhiptail
+index f54a62d..1359677 100644
+--- a/modules/fbwhiptail
++++ b/modules/fbwhiptail
+@@ -6,6 +6,7 @@ fbwhiptail_version :=3D git
+ fbwhiptail_dir :=3D fbwhiptail
+ fbwhiptail_repo :=3D https://source.puri.sm/coreboot/fbwhiptail.git
+=20
++fbwhiptail_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ fbwhiptail_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/flashrom b/modules/flashrom
+index 0a29b18..d695818 100644
+--- a/modules/flashrom
++++ b/modules/flashrom
+@@ -11,6 +11,7 @@ flashrom_tar :=3D flashrom-$(flashrom_version).tar.bz2
+ flashrom_url :=3D https://download.flashrom.org/releases/$(flashrom_tar)
+ flashrom_hash :=3D 3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170=
c4dc9dee64
+=20
++flashrom_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ flashrom_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/flashtools b/modules/flashtools
+index d95c215..090362c 100644
+--- a/modules/flashtools
++++ b/modules/flashtools
+@@ -11,6 +11,7 @@ flashtools_tar :=3D flashtools-$(flashtools_version).tar=
.gz
+ flashtools_url :=3D https://github.com/osresearch/flashtools/archive/v$(f=
lashtools_version).tar.gz
+ flashtools_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08=
a2f39302c22c
+=20
++flashtools_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ flashtools_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/frotz b/modules/frotz
+index 611e04a..e2c2e22 100644
+--- a/modules/frotz
++++ b/modules/frotz
+@@ -8,6 +8,7 @@ frotz_hash :=3D dbb5eb3bc95275dcb984c4bdbaea58bc1f1b085b20=
092ce6e86d9f0bf3ba858f
+=20
+ frotz_configure :=3D touch .config
+=20
++frotz_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ frotz_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/gpg b/modules/gpg
+index 4d4440a..6a48664 100644
+--- a/modules/gpg
++++ b/modules/gpg
+@@ -39,6 +39,7 @@ gpg_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++gpg_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ gpg_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(gpg_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/gpg2 b/modules/gpg2
+index 318a4cd..522e518 100644
+--- a/modules/gpg2
++++ b/modules/gpg2
+@@ -50,6 +50,7 @@ gpg2_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++gpg2_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ gpg2_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(gpg2_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/kexec b/modules/kexec
+index d2311c2..b507d81 100644
+--- a/modules/kexec
++++ b/modules/kexec
+@@ -14,6 +14,7 @@ kexec_configure :=3D ./configure \
+ 	--without-lzma \
+ 	&& $(MAKE) clean
+=20
++kexec_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ kexec_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libassuan b/modules/libassuan
+index 3c4e319..6138ec2 100644
+--- a/modules/libassuan
++++ b/modules/libassuan
+@@ -14,6 +14,7 @@ libassuan_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++libassuan_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_=
PATH=3D LIBRARY_PATH=3D
+ libassuan_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libgcrypt b/modules/libgcrypt
+index aa7e1ef..384f672 100644
+--- a/modules/libgcrypt
++++ b/modules/libgcrypt
+@@ -14,6 +14,7 @@ libgcrypt_configure :=3D ./configure \
+ 	--disable-asm \
+ 	--disable-nls \
+=20=09
++libgcrypt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_=
PATH=3D LIBRARY_PATH=3D
+ libgcrypt_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libgpg-error b/modules/libgpg-error
+index 752e11a..3d4d217 100644
+--- a/modules/libgpg-error
++++ b/modules/libgpg-error
+@@ -16,6 +16,7 @@ libgpg-error_configure :=3D ./configure \
+ 	--disable-tests \
+ 	--disable-asm \
+=20
++libgpg-error_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLU=
DE_PATH=3D LIBRARY_PATH=3D CC_FOR_BUILD=3D"$(CC_FOR_BUILD)"
+ libgpg-error_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libksba b/modules/libksba
+index d352913..bd1835b 100644
+--- a/modules/libksba
++++ b/modules/libksba
+@@ -14,6 +14,7 @@ libksba_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++libksba_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ libksba_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libpng b/modules/libpng
+index d6d9e65..33306e2 100644
+--- a/modules/libpng
++++ b/modules/libpng
+@@ -12,6 +12,7 @@ libpng_configure :=3D \
+         --host i386-elf-linux \
+ 	--prefix=3D"/" \
+=20
++libpng_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ libpng_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libremkey-hotp-verification b/modules/libremkey-hotp-=
verification
+index c9b9d45..e7fab7d 100644
+--- a/modules/libremkey-hotp-verification
++++ b/modules/libremkey-hotp-verification
+@@ -6,6 +6,7 @@ libremkey-hotp-verification_version :=3D git
+ libremkey-hotp-verification_dir :=3D libremkey-hotp-verification
+ libremkey-hotp-verification_repo :=3D --recursive https://github.com/Nitr=
okey/nitrokey-hotp-verification
+=20
++libremkey-hotp-verification_make_environment :=3D CPATH=3D C_INCLUDE_PATH=
=3D CPLUS_INCLUDE_PATH=3D LIBRARY_PATH=3D
+ libremkey-hotp-verification_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libusb b/modules/libusb
+index b7fe959..fe274e9 100644
+--- a/modules/libusb
++++ b/modules/libusb
+@@ -19,6 +19,7 @@ libusb_configure :=3D ./configure\
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
+=20
++libusb_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ libusb_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libusb-compat b/modules/libusb-compat
+index f95854e..78033ef 100644
+--- a/modules/libusb-compat
++++ b/modules/libusb-compat
+@@ -22,6 +22,7 @@ libusb-compat_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++libusb-compat_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCL=
UDE_PATH=3D LIBRARY_PATH=3D
+ libusb-compat_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/lvm2 b/modules/lvm2
+index 91f0f53..def7544 100644
+--- a/modules/lvm2
++++ b/modules/lvm2
+@@ -34,6 +34,7 @@ lvm2_configure :=3D \
+ 	--with-cluster=3Dnone \
+=20
+ # not sure why LIB_SUFFIX is not defined in the cross build
++lvm2_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ lvm2_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/mbedtls b/modules/mbedtls
+index d844b16..2611866 100644
+--- a/modules/mbedtls
++++ b/modules/mbedtls
+@@ -10,6 +10,7 @@ mbedtls_libraries :=3D library/libmbedcrypto.so.0
+=20
+ mbedtls_configure :=3D
+=20
++mbedtls_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ mbedtls_target :=3D \
+ 	SHARED=3D1 \
+ 	DESTDIR=3D$(INSTALL) \
+diff --git a/modules/msrtools b/modules/msrtools
+index 9adfab0..85b5954 100644
+--- a/modules/msrtools
++++ b/modules/msrtools
+@@ -11,6 +11,7 @@ msrtools_tar :=3D msr-tools-$(msrtools_version).tar.gz
+ msrtools_url :=3D https://github.com/intel/msr-tools/archive/msr-tools-$(=
msrtools_version).tar.gz
+ msrtools_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2=
f39302c22c
+=20
++msrtools_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ msrtools_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/musl b/modules/musl
+index eec76de..89b9a0f 100644
+--- a/modules/musl
++++ b/modules/musl
+@@ -24,6 +24,7 @@ musl_configure :=3D ./configure \
+ 	--enable-gcc-wrapper \
+ 	--enable-shared \
+=20
++musl_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ musl_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS_NOCC) \
+diff --git a/modules/newt b/modules/newt
+index cc6341d..bad67c7 100644
+--- a/modules/newt
++++ b/modules/newt
+@@ -8,6 +8,7 @@ newt_tar :=3D newt-$(newt_version).tar.gz
+ newt_url :=3D https://releases.pagure.org/newt/$(newt_tar)
+ newt_hash :=3D 8d66ba6beffc3f786d4ccfee9d2b43d93484680ef8db9397a4fb70b5ad=
bb6dbc
+=20
++newt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ newt_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/npth b/modules/npth
+index e0f30c6..a43d626 100644
+--- a/modules/npth
++++ b/modules/npth
+@@ -14,6 +14,7 @@ npth_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++npth_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ npth_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/pciutils b/modules/pciutils
+index 2ea5b9b..dfee3a0 100644
+--- a/modules/pciutils
++++ b/modules/pciutils
+@@ -16,6 +16,7 @@ pciutils_hash :=3D 64293c6ab9318c40ef262b76d87bd90975317=
59752bac556e50979b1e63cfe6
+ # reproducible.  Otherwise the build path will be embedded
+ # in the library and executables.
+=20
++pciutils_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ pciutils_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/pinentry b/modules/pinentry
+index c0e93d7..a541ce0 100644
+--- a/modules/pinentry
++++ b/modules/pinentry
+@@ -33,6 +33,7 @@ pinentry_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++pinentry_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ pinentry_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(pinentry_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/pixman b/modules/pixman
+index 65a2e20..198f8ac 100644
+--- a/modules/pixman
++++ b/modules/pixman
+@@ -13,6 +13,7 @@ pixman_configure :=3D \
+ 	--prefix=3D"/" \
+ 	--disable-gtk
+=20
++pixman_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ pixman_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/popt b/modules/popt
+index b3b0b04..242ae03 100644
+--- a/modules/popt
++++ b/modules/popt
+@@ -11,6 +11,7 @@ popt_configure :=3D ./configure \
+ 	--prefix "/" \
+ 	--host i386-elf-linux \
+=20
++popt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ popt_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/qrencode b/modules/qrencode
+index fb73c7b..afded70 100644
+--- a/modules/qrencode
++++ b/modules/qrencode
+@@ -14,6 +14,7 @@ qrencode_configure :=3D ./configure \
+ 	--without-tools \
+ 	--host i386-elf-linux \
+=20
++qrencode_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ qrencode_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/slang b/modules/slang
+index a4ac84b..a338639 100644
+--- a/modules/slang
++++ b/modules/slang
+@@ -18,6 +18,7 @@ slang_configure :=3D ./configure \
+   && mkdir -p src/elfobjs
+=20
+ # Disable parallel make for the install target
++slang_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ slang_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/tpmtotp b/modules/tpmtotp
+index 792dd51..02c6c10 100644
+--- a/modules/tpmtotp
++++ b/modules/tpmtotp
+@@ -11,6 +11,7 @@ tpmtotp_tar :=3D tpmtotp-$(tpmtotp_version).tar.gz
+ tpmtotp_url :=3D https://github.com/osresearch/tpmtotp/archive/v$(tpmtotp=
_version).tar.gz
+ tpmtotp_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2f=
39302c22c
+=20
++tpmtotp_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ tpmtotp_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/util-linux b/modules/util-linux
+index e3377f6..a50bf40 100644
+--- a/modules/util-linux
++++ b/modules/util-linux
+@@ -22,6 +22,7 @@ util-linux_configure :=3D ./configure \
+ 	--enable-libblkid \
+=20
+=20
++util-linux_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ util-linux_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/zlib b/modules/zlib
+index dbdb44e..a6290b2 100644
+--- a/modules/zlib
++++ b/modules/zlib
+@@ -12,6 +12,7 @@ zlib_configure :=3D \
+ 	./configure \
+ 	--prefix=3D"/" \
+=20
++zlib_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ zlib_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:40 2019
Received: from localhost ([127.0.0.1]:38452 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlzD-00012O-NL
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:40 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45276)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyx-00010v-3Y
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:23 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 3C5013362003;
 Wed,  2 Oct 2019 23:16:22 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 7/7] gnu: Add heads-kgpe-d16.
Date: Wed,  2 Oct 2019 23:16:02 +0200
Message-Id: <20191002211602.16635-8-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-kgpe-d16): New variable.
* gnu/packages/patches/heads-kgpe-d16-nonalignment.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/heads.scm                        | 22 ++++++++++++++++++
 .../patches/heads-kgpe-d16-nonalignment.patch | 23 +++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 gnu/packages/patches/heads-kgpe-d16-nonalignment.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index fb3c913f2c..10bac6c77b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -948,6 +948,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/hdf-eos5-remove-gctp.patch		\
   %D%/packages/patches/hdf-eos5-fix-szip.patch			\
   %D%/packages/patches/hdf-eos5-fortrantests.patch		\
+  %D%/packages/patches/heads-kgpe-d16-nonalignment.patch	\
   %D%/packages/patches/heads-make-environment.patch		\
   %D%/packages/patches/higan-remove-march-native-flag.patch	\
   %D%/packages/patches/hubbub-sort-entities.patch		\
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 80e570b097..5e14c95775 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -591,3 +591,25 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-coreboot")
        ,@(package-arguments heads-coreboot)))))
+
+(define-public heads-kgpe-d16
+  (package
+    (inherit heads-coreboot)
+    (name "heads-kgpe-d16")
+    (source
+     (origin
+      (inherit (package-source heads-coreboot))
+      (patches (search-patches "heads-make-environment.patch"
+                               "heads-kgpe-d16-nonalignment.patch"))))
+    (native-inputs
+     (alist-replace "gnupg"
+       (list (origin
+         (method url-fetch)
+         (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-1.4.21.tar.bz2")
+         (sha256
+          (base32 "0xi2mshq8f6zbarb5f61c9w2qzwrdbjm4q8fqsrwlzc51h8a6ivb"))))
+      (package-native-inputs heads-coreboot)))
+    (arguments
+     `(#:make-flags
+       '("BOARD=kgpe-d16")
+       ,@(package-arguments heads-coreboot)))))
diff --git a/gnu/packages/patches/heads-kgpe-d16-nonalignment.patch b/gnu/packages/patches/heads-kgpe-d16-nonalignment.patch
new file mode 100644
index 0000000000..cbbab1ea40
--- /dev/null
+++ b/gnu/packages/patches/heads-kgpe-d16-nonalignment.patch
@@ -0,0 +1,23 @@
+Source: https://github.com/osresearch/heads/pull/478
+From 25113cb8c2f431bb0e0c038cbd2a306069159bcb Mon Sep 17 00:00:00 2001
+From: Francis Lam <flam@HIDDEN>
+Date: Sat, 10 Nov 2018 13:41:01 -0800
+Subject: [PATCH] Fix coreboot build for kgpe-d16
+
+---
+ modules/coreboot | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/coreboot b/modules/coreboot
+index 7081fe08..7c62b6f3 100644
+--- a/modules/coreboot
++++ b/modules/coreboot
+@@ -16,7 +16,7 @@ CONFIG_COREBOOT_CONFIG ?= config/coreboot-$(BOARD).config
+ # Ensure that touching the config file will force a rebuild
+ $(build)/$(coreboot_dir)/.configured: $(CONFIG_COREBOOT_CONFIG)
+ 
+-EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches
++EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches -Wno-error=packed-not-aligned
+ 
+ coreboot_configure := \
+ 	mkdir -p "$(build)/$(coreboot_dir)" \




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:39 2019
Received: from localhost ([127.0.0.1]:38450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlzD-00012G-De
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:39 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45270)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyw-00010n-26
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:23 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 2C29C3363669;
 Wed,  2 Oct 2019 23:16:21 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 5/7] gnu: Add heads-coreboot.
Date: Wed,  2 Oct 2019 23:16:00 +0200
Message-Id: <20191002211602.16635-6-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-coreboot): New variable.
---
 gnu/packages/heads.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 179dab1546..0b6a93d744 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -565,3 +565,19 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-linuxboot")
        ,@(package-arguments heads-linuxboot)))))
+
+(define heads-coreboot
+  (package
+    (inherit heads)
+    (name "heads-coreboot")
+    (arguments
+     (substitute-keyword-arguments (package-arguments heads)
+      ((#:phases phases)
+       `(modify-phases ,phases
+          (add-before 'unpack-heads-packages 'unpack-coreboot
+            (lambda* (#:key inputs #:allow-other-keys)
+               (mkdir-p "build")
+               #t))))))
+    (native-inputs
+     `(("file" ,file)
+       ,@(package-native-inputs heads)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:39 2019
Received: from localhost ([127.0.0.1]:38448 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlzD-000128-23
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:39 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45272)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyw-00010t-K8
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:23 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id A47B13361CA5;
 Wed,  2 Oct 2019 23:16:21 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 6/7] gnu: Add heads-qemu-coreboot.
Date: Wed,  2 Oct 2019 23:16:01 +0200
Message-Id: <20191002211602.16635-7-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-coreboot): New variable.
---
 gnu/packages/heads.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 0b6a93d744..80e570b097 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -24,7 +24,8 @@
   #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
-  #:use-module (gnu packages virtualization))
+  #:use-module (gnu packages virtualization)
+  #:use-module ((guix build utils) #:select (alist-replace)))
 
 (define-public musl-cross
   (let ((revision "1")
@@ -581,3 +582,12 @@ servers.")
     (native-inputs
      `(("file" ,file)
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-coreboot
+  (package
+    (inherit heads-coreboot)
+    (name "heads-qemu-coreboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-coreboot")
+       ,@(package-arguments heads-coreboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:39 2019
Received: from localhost ([127.0.0.1]:38446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlzC-000123-0x
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:38 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45268)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyv-00010a-I4
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:21 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 8D6D33365520;
 Wed,  2 Oct 2019 23:16:20 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 4/7] gnu: Add heads-qemu-linuxboot.
Date: Wed,  2 Oct 2019 23:15:59 +0200
Message-Id: <20191002211602.16635-5-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-linuxboot): New variable.
---
 gnu/packages/heads.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 7d1f70a621..179dab1546 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -556,3 +556,12 @@ servers.")
              (sha256
               (base32 "1bdj4m9dvih9fhp5q5c6cp5sphzbpag5gp4bz1p8g9lqi49lb7av"))))
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-linuxboot
+  (package
+    (inherit heads-linuxboot)
+    (name "heads-qemu-linuxboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-linuxboot")
+       ,@(package-arguments heads-linuxboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:38 2019
Received: from localhost ([127.0.0.1]:38444 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlzA-00011q-O5
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:37 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45262)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyu-00010X-Vd
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:21 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 191C93362B43;
 Wed,  2 Oct 2019 23:16:20 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 3/7] gnu: Add heads-linuxboot.
Date: Wed,  2 Oct 2019 23:15:58 +0200
Message-Id: <20191002211602.16635-4-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-linuxboot): New variable.
---
 gnu/packages/heads.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 311eeeb1a1..7d1f70a621 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -510,3 +510,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)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:36 2019
Received: from localhost ([127.0.0.1]:38442 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlyy-00011S-Eh
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:36 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45242)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyt-00010T-Br
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:21 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id D8E2C3362003;
 Wed,  2 Oct 2019 23:16:17 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 1/7] gnu: Add musl-cross.
Date: Wed,  2 Oct 2019 23:15:56 +0200
Message-Id: <20191002211602.16635-2-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20191002211602.16635-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
 <20191002211602.16635-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk           |   1 +
 gnu/packages/heads.scm | 124 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/heads.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index b04a5d796e..01c726d8cf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -246,6 +246,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/haskell-web.scm			\
   %D%/packages/haskell-xyz.scm			\
   %D%/packages/ham-radio.scm			\
+  %D%/packages/heads.scm			\
   %D%/packages/hexedit.scm			\
   %D%/packages/hugs.scm				\
   %D%/packages/hurd.scm				\
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
new file mode 100644
index 0000000000..b547a374e0
--- /dev/null
+++ b/gnu/packages/heads.scm
@@ -0,0 +1,124 @@
+(define-module (gnu packages heads)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages cpio)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages virtualization))
+
+(define-public musl-cross
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "musl-cross")
+    (version (git-version "0.1" revision commit))
+    (source
+          (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/GregorR/musl-cross")
+                   (commit "3b5b118f1cdddecda3f04b5005f69f962278fc1e")))
+             (file-name "musl-cross-checkout")
+             (sha256
+              (base32 "0pd1b7k4gwbvnyw0677p56d7j0xmv80k5iihkkjrd1mp9zdx90gj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests in main project.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (setenv "SHELL" "bash")
+             (setenv "CONFIG_SHELL" "bash")
+             #t))
+         (add-after 'unpack 'unpack-dependencies
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory
+                                    destination-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))))
+             (for-each (lambda (name)
+                         (install-file* name "tarballs" ""))
+                       '("binutils" "target-gcc-5" "kernel-headers" "musl"))
+             (substitute* "config.sh"
+              (("^CC_BASE_PREFIX=.*")
+               (string-append "CC_BASE_PREFIX=" (assoc-ref outputs "out")
+                              "/crossgcc\n")))
+             ;; Note: Important: source/gcc-5.3.0/gcc/exec-tool.in
+             ;; Note: Important: source/kernel-headers-3.12.6-5/tools/install.sh
+             ;; Note: Important: move-if-change (twice)
+             ;; Make sure that shebangs are patched after new extractions.
+             (substitute* "defs.sh"
+              (("touch \"[$]2/extracted\"")
+               (string-append "touch \"$2/extracted\"
+for s in mkinstalldirs move-if-change compile depcomp callprocs configure \\
+mkdep compile libtool-ldflags config.guess install-sh missing config.sub \\
+config.rpath progtest.m4 lib-ld.m4 acx.m4 gen-fixed.sh mkheader.sh ylwrap \\
+merge.sh godeps.sh lock-and-run.sh print-sysroot-suffix.sh mkconfig.sh \\
+genmultilib exec-tool.in install.sh
+do
+  find . -name $s -exec sed -i -e 's;!/bin/sh;!" (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+  find . -name $s -exec sed -i -e 's; /bin/sh; " (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+done
+" )))
+             #t))
+         (replace 'build
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "./build.sh")))
+         (delete 'install))))
+    (native-inputs
+     `(("bash" ,bash)
+       ("flex" ,flex)
+       ("gmp" ,gmp)
+       ("mpfr" ,mpfr)
+       ("mpc" ,mpc)
+       ("binutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2")
+           (sha256
+            (base32 "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm"))))
+       ("target-gcc-5"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2")
+           (sha256
+            (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq"))))
+       ("kernel-headers"
+        ,(origin
+           (method url-fetch)
+           (uri "http://ftp.barfooze.de/pub/sabotage/tarballs/kernel-headers-3.12.6-5.tar.xz")
+           (sha256
+            (base32 "0p43lvbpy69lbjmvq39g570imj0p8z791bhzrpdnp1nygwshj2wf"))))
+       ("musl"
+        ,(origin
+           (method url-fetch)
+           (uri "http://www.musl-libc.org/releases/musl-1.1.21.tar.gz")
+           (sha256
+            (base32 "0i2z52zgc86af1n1gjiz43hgd85mxjgvgn345zsybja9dxpvchn7"))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Musl-cross gcc 5 toolchain")
+    (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
+    (license license:isc))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 2 Oct 2019 21:16:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 17:16:24 2019
Received: from localhost ([127.0.0.1]:38440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFlyy-00011P-6E
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:24 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iFlyt-00010R-Bw
 for 37466 <at> debbugs.gnu.org; Wed, 02 Oct 2019 17:16:21 -0400
Received: from localhost.localdomain (77.116.228.175.wireless.dyn.drei.com
 [77.116.228.175])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 46C813361CA5;
 Wed,  2 Oct 2019 23:16:17 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v4 0/7] Add heads.
Date: Wed,  2 Oct 2019 23:15:55 +0200
Message-Id: <20191002211602.16635-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This adds heads to Guix.  Heads is minimal Linux that runs as a coreboot or
LinuxBoot payload to provide a secure, flexible boot environment for laptops
and servers.

Heads uses checksums to make sure that all the components are what they are
supposed to be, at build time, at BOOT time and when resuming.

Therefore, it's difficult to replace stuff with our versions.
I'm not sure whether we should--since Heads is supposed to build the same
thing reproducibly everywhere.

A future version will be a variant which does replace Linux by Linux-libre,
but that also changes both the source hashes and the output (and thus the
output hashes).

Danny Milosavljevic (7):
  gnu: Add musl-cross.
  gnu: Add heads.
  gnu: Add heads-linuxboot.
  gnu: Add heads-qemu-linuxboot.
  gnu: Add heads-coreboot.
  gnu: Add heads-qemu-coreboot.
  gnu: Add heads-kgpe-d16.

 gnu/local.mk                                  |   3 +
 gnu/packages/heads.scm                        | 615 ++++++++++++++++++
 .../patches/heads-kgpe-d16-nonalignment.patch |  23 +
 .../patches/heads-make-environment.patch      | 446 +++++++++++++
 4 files changed, 1087 insertions(+)
 create mode 100644 gnu/packages/heads.scm
 create mode 100644 gnu/packages/patches/heads-kgpe-d16-nonalignment.patch
 create mode 100644 gnu/packages/patches/heads-make-environment.patch





Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:37 2019
Received: from localhost ([127.0.0.1]:52333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3z-0007aF-Im
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:37 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38422)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3f-0007YN-Vq
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:13 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id C085B3362274;
 Sun, 29 Sep 2019 13:08:06 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 2/7] gnu: Add heads.
Date: Sun, 29 Sep 2019 13:07:45 +0200
Message-Id: <20190929110750.21214-3-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm (heads): New variable.
* gnu/packages/patches/heads-make-environment.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/heads.scm                        | 388 +++++++++++++++
 .../patches/heads-make-environment.patch      | 446 ++++++++++++++++++
 3 files changed, 835 insertions(+)
 create mode 100644 gnu/packages/patches/heads-make-environment.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 01c726d8cf..fb3c913f2c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -948,6 +948,7 @@ dist_patch_DATA =3D						\
   %D%/packages/patches/hdf-eos5-remove-gctp.patch		\
   %D%/packages/patches/hdf-eos5-fix-szip.patch			\
   %D%/packages/patches/hdf-eos5-fortrantests.patch		\
+  %D%/packages/patches/heads-make-environment.patch		\
   %D%/packages/patches/higan-remove-march-native-flag.patch	\
   %D%/packages/patches/hubbub-sort-entities.patch		\
   %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch        \
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index b547a374e0..311eeeb1a1 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -4,8 +4,12 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
@@ -13,8 +17,11 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages cpio)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization))
@@ -122,3 +129,384 @@ done
     (synopsis "Musl-cross gcc 5 toolchain")
     (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
     (license license:isc))))
+
+(define heads
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "heads")
+    (version (git-version "0.1" revision commit))
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+             (url "https://github.com/osresearch/heads.git")
+             (commit commit)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "0sgyqm4ss88hfp8miz40mw40kj7qp2khr7jcvscwv87bd5g9nwnx"))
+      (patches (search-patches "heads-make-environment.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("bash" ,bash)
+       ("git" ,git)
+       ("perl" ,perl)
+       ("cpio" ,cpio)
+       ("m4" ,m4)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("curl" ,curl) ; unused
+       ("zlibx" ,zlib)
+       ("musl-cross" ,musl-cross)
+       ("elfutils" ,elfutils)
+       ("bc" ,bc)
+       ("findutils" ,findutils)
+       ("flashtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/flashtools.git")
+                 (commit "9acce09aeb635c5bef01843e495b95e75e8da135")))
+           (file-name "flashtools-checkout")
+           (sha256
+            (base32 "0r4gj3nzr67ycd39k1vjzxfzkp90yacrdgxhc1z5jfvxfq4x91c1"=
))))
+       ("tpmtotp"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/tpmtotp.git")
+                 (commit "18b860fdcf5a55537c8395b891f2b2a5c24fc00a")))
+           (file-name "tpmtotp-checkout")
+           (sha256
+            (base32 "112p5afkrbipr0d8x9r9mrxrr3xyf97s2y3f32p41vs951sksqnv"=
))))
+       ("msrtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/msr-tools.git")
+                 (commit "572ef8a2b873eda15a322daa48861140a078b92c")))
+           (file-name "msr-tools-checkout")
+           (sha256
+            (base32 "0an1ypj5pin9l413vn4gxzi3x6ir1rba9jv6n5gk6s9dq803lb6p"=
))))
+       ("coreboot-blobs"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-blobs-4.8.1.ta=
r.xz")
+           (sha256
+            (base32 "15g222xj1zdn8i8qz0pw2jf28h66dljb1q5isw2ml05gwfd51ahq"=
))))
+       ("coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz")
+           (sha256
+            (base32 "08xdd5drk8yd37a3z5hc81qmgsybv6201i28hcggxh980vdz9pgh"=
))))
+       ("linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.6=
2.tar.xz")
+           (sha256
+            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"=
))))
+       ("musl" ; useless
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.musl-libc.org/releases/musl-1.1.15.tar.gz")
+           (sha256
+            (base32 "1ymhxkskivzph0q34zadwfglc5gyahqajm7chqqn2zraxv3lgr4p"=
))))
+       ("busybox"
+        ,(origin
+           (method url-fetch)
+           (uri "https://busybox.net/downloads/busybox-1.28.0.tar.bz2")
+           (sha256
+            (base32 "1701carjf02y7r3djm1yvyd5kzrcxm4szinp7agfv7fmvfvm6ib0"=
))))
+       ("zlib"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.zlib.net/zlib-1.2.11.tar.gz")
+           (sha256
+            (base32 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"=
))))
+       ("mbedtls"
+        ,(origin
+           (method url-fetch)
+           (uri "https://tls.mbed.org/download/mbedtls-2.4.2-gpl.tgz")
+           (sha256
+            (base32 "17r9qs585gqghcf5yavb1cnvsigl0f8r0k8rklr5a855hrajs7yh"=
))))
+       ("kexec-tools"
+        ,(origin
+           (method url-fetch)
+           (uri "https://kernel.org/pub/linux/utils/kernel/kexec/kexec-too=
ls-2.0.16.tar.gz")
+           (sha256
+            (base32 "0fkg5y3wxvkqrjii90iz1i59qd6hhq7ar27f0sgv7jbppyczq5yg"=
))))
+       ("qrencode"
+        ,(origin
+           (method url-fetch)
+           (uri "https://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz")
+           (sha256
+            (base32 "0wiagx7i8p9zal53smf5abrnh9lr31mv0p36wg017401jrmf5577"=
))))
+       ("pciutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/software/utils/pciutils/pciuti=
ls-3.5.4.tar.xz")
+           (sha256
+            (base32 "0rpy7kkb2y89wmbcbfjjjxsk2x89v5xxhxib4vpl131ip5m3qab4"=
))))
+       ("util-linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/util-linux/v2.29/u=
til-linux-2.29.2.tar.xz")
+           (sha256
+            (base32 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"=
))))
+       ("flashrom"
+        ,(origin
+           (method url-fetch)
+           (uri "https://download.flashrom.org/releases/flashrom-1.0.tar.b=
z2")
+           (sha256
+            (base32 "0r7fkpfc8w51n8ffbhclj4wa3kwrk0ijv1acwpw5myx5bchzl0ip"=
))))
+       ("popt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://launchpad.net/popt/head/1.16/+download/popt-1.16.=
tar.gz")
+           (sha256
+            (base32 "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"=
))))
+       ("lvm2"
+        ,(origin
+           (method url-fetch)
+           (uri "https://mirrors.kernel.org/sourceware/lvm2/LVM2.2.02.168.=
tgz")
+           (sha256
+            (base32 "03b62hcsj9z37ckd8c21wwpm07s9zblq7grfh58yzcs1vp6x38r3"=
))))
+       ("cryptsetup"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cr=
yptsetup-1.7.3.tar.xz")
+           (sha256
+            (base32 "00nwd96m9yq4k3cayc04i5y7iakkzana35zxky6hpx2w8zl08axg"=
))))
+       ("libgpg-error"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.=
32.tar.bz2")
+           (sha256
+            (base32 "1jj08ns4sh1hmafqp1giskvdicdz18la516va26jycy27kkwaif3"=
))))
+       ("libgcrypt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.3.ta=
r.bz2")
+           (sha256
+            (base32 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"=
))))
+       ("libksba"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz=
2")
+           (sha256
+            (base32 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"=
))))
+       ("libassuan"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.1.ta=
r.bz2")
+           (sha256
+            (base32 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"=
))))
+       ("npth"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2")
+           (sha256
+            (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"=
))))
+       ("libusb"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-1=
.0/libusb-1.0.21/libusb-1.0.21.tar.bz2")
+           (sha256
+            (base32 "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx"=
))))
+       ("libusb-compat"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-c=
ompat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2")
+           (sha256
+            (base32 "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"=
))))
+       ("dropbear"
+        ,(origin
+           (method url-fetch)
+           (uri "https://matt.ucc.asn.au/dropbear/releases/dropbear-2016.7=
4.tar.bz2")
+           (sha256
+            (base32 "14c8f4gzixf0j9fkx68jgl85q7b05852kk0vf09gi6h0xmafl817"=
))))
+       ("pinentry"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.=
tar.bz2")
+           (sha256
+            (base32 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"=
))))
+       ("gnupg"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.10.tar.b=
z2")
+           (sha256
+            (base32 "05f9804g72pffdxgvxjmjzkfcpjg1x221g9rwcr8fi51hrxd77br"=
))))
+       ("slang"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.jedsoft.org/releases/slang/slang-2.3.1a.tar.b=
z2")
+           (sha256
+            (base32 "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l"=
))))
+       ("newt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://releases.pagure.org/newt/newt-0.52.20.tar.gz")
+           (sha256
+            (base32 "1g3dpfnvaw7vljbr7nzq1rl88d6r8cmrvvng9inphgzwxxmvlrld"=
))))
+
+       ;;; coreboot cross; FIXME: Extract.
+
+       ("gmp"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz")
+           (sha256
+            (base32 "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7"=
))))
+       ("mpfr"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz")
+           (sha256
+            (base32 "1g32l2fg8f62lcyzzh88y3fsh6rk539qc6ahhdgvx7wpnf1dwpq1"=
))))
+       ("mpc"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpc/mpc-1.0.3.tar.gz")
+           (sha256
+            (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"=
))))
+       ("binutils-2.30"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/binutils/binutils-2.30.tar.xz")
+           (sha256
+            (base32 "1rhshw4m5m2pjz8g15hpiwhp52kn0pj0b5dxy0v7lwigmspbhikf"=
))))
+       ("gcc-8"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz")
+           (sha256
+            (base32 "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x"=
))))
+       ;; Note: Non-coreboot heads really doesn't need that.
+       ("acpica-coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://acpica.org/sites/acpica/files/acpica-unix2-201805=
31.tar.gz")
+           (sha256
+            (base32 "0q7vg1nr51f3rg16vjh4glz361a64r6gpm46fqkl2jf4fq7g43g5"=
))))))
+    (arguments
+     `(#:tests? #f ; Toplevel makefile has no tests.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; For edk2.
+             (setenv "BUILD_CC" "gcc") ; FIXME: musl *musl-cross*/x86_64-l=
inux-musl/bin/x86_64-linux-musl-gcc || ./x86_64-linux-musl/x86_64-linux-mus=
l/bin/musl-gcc.
+             ;; busybox needs the original values (for VERY few tools, but=
 more than 0).
+             ;; Disable wget.
+             (setenv "WGET" "true")
+             ;; Work around mcheck.h problem (in glibc!?)
+             (substitute* "modules/popt"
+              (("[.]/configure") "CFLAGS=3D\"-D__END_DECLS -D__BEGIN_DECLS=
 -D__THROW\" ./configure"))
+             #t))
+         (add-after 'unpack 'unpack-heads-packages
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory desti=
nation-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))
+                 ;(invoke "tar" "-xf" source-file "-C" "build")
+))
+             (mkdir-p "packages")
+             (setenv "V" "1") ; verbose
+             (setenv "GUIX_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+             (setenv "GUIX_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH=
"))
+             (setenv "GUIX_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+             (setenv "GUIX_CPATH" (getenv "CPATH"))
+             (for-each (lambda (name)
+                         (install-file* name "packages" ".tmp"))
+                       '("linux" "coreboot-blobs" "coreboot" "busybox" "zl=
ib" "mbedtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "=
popt" "lvm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" =
"npth" "libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt=
" "musl"))
+             (mkdir-p "build")
+             (mkdir-p "build/musl-cross-git/tarballs")
+             (mkdir-p "build/coreboot-4.8.1/util/crossgcc/tarballs")
+             (for-each (lambda (name)
+                         (install-file* name "build/coreboot-4.8.1/util/cr=
ossgcc/tarballs" ""))
+                       '("gmp" "mpfr" "mpc" "binutils-2.30" "gcc-8" "acpic=
a-coreboot"))
+             (copy-recursively (assoc-ref inputs "musl-cross") "build/musl=
-cross-git")
+             (copy-recursively (assoc-ref inputs "tpmtotp") "build/tpmtotp=
-git")
+             (copy-recursively (assoc-ref inputs "flashtools") "build/flas=
htools-0.0.1")
+             (copy-recursively (assoc-ref inputs "msrtools") "build/msrtoo=
ls-git")
+
+             (setenv "MUSL_DIR" (assoc-ref inputs "musl-cross"))
+             (setenv "CROSS" (string-append (getenv "MUSL_DIR") "/crossgcc=
/x86_64-linux-musl/bin/x86_64-musl-linux-")) ; Note: Useless
+             (substitute* "Makefile"
+              ;; Disable our non-cross toolchain environment.
+              (("CROSS_TOOLS_NOCC :=3D ")
+               ; CPP=3D" (getenv "CROSS") "cpp CXXCPP=3D" (getenv "CROSS")=
 "cpp "
+               (string-append "CROSS_TOOLS_NOCC :=3D C_INCLUDE_PATH=3D CPL=
US_INCLUDE_PATH=3D LIBRARY_PATH=3D CPATH=3D "))
+              ;; Disable git.
+              (("git submodule update --init")
+               "true submodule update --init")
+              ;; Re-enable our non-cross toolchain environment selectively.
+              (("^WGET.*")
+               (string-append "HOSTCC =3D" ; for busybox
+                              " C_INCLUDE_PATH=3D" (or (getenv "GUIX_C_INC=
LUDE_PATH") "")
+                              " CPLUS_INCLUDE_PATH=3D" (or (getenv "GUIX_C=
PLUS_INCLUDE_PATH") "")
+                              " CPATH=3D" (or (getenv "GUIX_CPATH") "")
+                              " LIBRARY_PATH=3D" (or (getenv "GUIX_LIBRARY=
_PATH") "")
+                              " gcc\n"
+                              "CC_FOR_BUILD =3D $(HOSTCC)\n" ; for libgpg-=
error
+                              "BUILD_CC =3D $(HOSTCC)\n")) ; for kexec-too=
ls
+              ;; Disable git, patch shebangs, and selectively re-enable ho=
st compiler.
+              ;; (Note: $HOSTCC is too complicated for bash, for example
+              ;; HOSTCC=3D"a=3Db c=3Dd gcc", then invoking $HOSTCC won't w=
ork).
+              (("(git clone.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed applets/busybox.mkll applet=
s/busybox.mksuid po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in =
*-config.in src/*-config.in src/Makefile.in applets/install.sh applets/busy=
box.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry.=
sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests/=
runtest modules/test/runtests.sh src/test/runtests.sh mkfiles/build.sh auto=
conf/* demo/Makefile.in slsh/Makefile.in util/xcompile/xcompile util/genbui=
ld_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>;=
~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/fi=
le\\>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -=
e 's;/usr/bin/env bash;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^TE=
RMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;^HOSTCC.*$$$$;HOSTCC=3DC_INCLUDE_PATH=
=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=3D\"$(GUIX_CPLUS_INCLUDE_P=
ATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=3D\"$(GUIX_LIBRARY_PATH)\" gc=
c;' -e 's;^\\(\\$$$$HOSTCC[^|]*\\);(echo \\1 | bash);' \"$$$$s\" ; fi ; don=
e)
+" "true" (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref in=
puts "bash")))
+              (("(tar -xf.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed applets/busybox.mkll applet=
s/busybox.mksuid  po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in=
 *-config.in src/*-config.in src/Makefile.in applets/install.sh applets/bus=
ybox.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry=
.sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests=
/runtest modules/test/runtests.sh src/test/runtests.sh mkfiles/build.sh aut=
oconf/* demo/Makefile.in slsh/Makefile.in util/xcompile/xcompile util/genbu=
ild_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>=
;~a/bin/sh;' -e 's;^TERMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;/bin/pwd\\>;pwd;=
' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;f=
alse;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's;/usr/bin/env bash;~a/bin/bash=
;' -e 's;git clone;true clone;' -e 's;^HOSTCC.*$$$$;HOSTCC=3DC_INCLUDE_PATH=
=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=3D\"$(GUIX_CPLUS_INCLUDE_P=
ATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=3D\"$(GUIX_LIBRARY_PATH)\" gc=
c;' -e 's;^\\(\\$$$$HOSTCC[^|]*\\);(echo \\1 | bash);' \"$$$$s\" ; fi ; don=
e)
+" tar (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref input=
s "bash"))))
+             ;(substitute* "modules/musl-cross"
+             ; (("/bin/echo") "echo"))
+             (call-with-output-file "patches/coreboot-4.8.1/9999-shell.pat=
ch"
+               (lambda (port)
+                 (format port "--- coreboot-4.8.1/util/crossgcc/buildgcc.o=
rig 2019-09-13 14:45:12.463998974 +0200
++++ coreboot-4.8.1/util/crossgcc/buildgcc 2019-09-13 14:46:49.808268216 +0=
200
+@@ -462,6 +462,13 @@
+ 			}
+ 		done
+ 		touch \"${dir}/.unpack_success\"
++  for s in \"${dir}/Makefile\" \"${dir}/configure\" \"${dir}/config.sub\"=
 \"${dir}/config.guess\" \"${dir}/mpn/cpp-ccas\" \"${dir}/mpn/m4-ccas\" \"$=
{dir}/missing\" \"${dir}/\"*\"/configure\" \"${dir}/move-if-change\" \"${di=
r}/libgcc/mkheader.sh\" \"${dir}/gcc/genmultilib\"
++  do
++   if [ -f \"${s}\" ]
++   then
++    sed -i -e 's;/bin/sh\\>;~a/bin/sh;' \"${s}\"
++   fi
++  done
+ 	)
+ }
+=20
+" (assoc-ref inputs "bash"))))
+             #t))
+         (add-after 'install 'install-images
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (make-flags-assoc (map (lambda (x)
+                                             (string-split x #\=3D))
+                                           make-flags))
+                    (BOARD (car (assoc-ref make-flags-assoc "BOARD")))
+                    (out-images (string-append out "/libexec/heads/" BOARD=
 "/images")))
+               (mkdir-p out-images)
+               (copy-recursively (string-append "build/" BOARD) out-images)
+               ;; Contains timestamp.
+               (delete-file (string-append out-images "/hashes.txt"))
+               #t))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Heads: coreboot/LinuxBoot payload")
+    (description "A minimal Linux that runs as a coreboot or LinuxBoot ROM
+payload to provide a secure, flexible boot environment for laptops and
+servers.")
+    (license license:gpl2+))))
diff --git a/gnu/packages/patches/heads-make-environment.patch b/gnu/packag=
es/patches/heads-make-environment.patch
new file mode 100644
index 0000000000..f38d08ee51
--- /dev/null
+++ b/gnu/packages/patches/heads-make-environment.patch
@@ -0,0 +1,446 @@
+diff --git a/Makefile b/Makefile
+index cc5cac6..ae8d7e7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -124,10 +124,14 @@ CROSS_TOOLS_NOCC :=3D \
+=20
+ CROSS_TOOLS :=3D \
+ 	CC=3D"$(heads_cc)" \
++	CPP=3D"$(CROSS)cpp" \
++	CXXCPP=3D"$(CROSS)cpp" \
++	CC_FOR_BUILD=3D"$(CC_FOR_BUILD)" \
++	BUILD_CC=3D"$(BUILD_CC)" \
++	HOSTCC=3D"$(HOSTCC)" \
+ 	$(CROSS_TOOLS_NOCC) \
+=20
+=20
+-
+ ifeq "$(CONFIG_COREBOOT)" "y"
+ all: $(build)/$(BOARD)/coreboot.rom
+ else ifeq "$(CONFIG_LINUXBOOT)" "y"
+@@ -348,7 +352,7 @@ define define_module =3D
+ 		echo "$(MAKE) \
+ 			-C \"$(build)/$($1_dir)\" \
+ 			$($1_target)" ;  \
+-		$(MAKE) \
++		$($1_make_environment) $(MAKE) \
+ 			-C "$(build)/$($1_dir)" \
+ 			$($1_target)  \
+ 	) \
+@@ -453,7 +457,7 @@ $(COREBOOT_UTIL_DIR)/inteltool/inteltool \
+ : $(build)/$(coreboot_base_dir)/.canary \
+ 	$(build)/$(musl_dir)/.build
+ 	+$(call do,MAKE,$(notdir $@),\
+-		$(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \
++		CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=3D LIBRARY_PATH=3D $(MAKE=
) -C "$(dir $@)" $(CROSS_TOOLS) \
+ 	)
+=20
+ # superio depends on zlib and pciutils
+diff --git a/modules/busybox b/modules/busybox
+index f8f8a83..4836780 100644
+--- a/modules/busybox
++++ b/modules/busybox
+@@ -11,6 +11,7 @@ busybox_hash :=3D 604553b7dbd59ded9e3ad7c6af49ed2cff599a=
df3e54d9463e5e0027b362019c
+ busybox_configure :=3D $(MAKE) CC=3D"$(heads_cc)" oldconfig
+ busybox_config :=3D config/busybox.config
+ busybox_output :=3D busybox
++busybox_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ busybox_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	$(MAKE_JOBS) \
+diff --git a/modules/cairo b/modules/cairo
+index 647ed2c..00f6cac 100644
+--- a/modules/cairo
++++ b/modules/cairo
+@@ -23,6 +23,7 @@ cairo_configure :=3D \
+ 	&& mv libtool-2 libtool \
+ 	&& chmod 755 libtool
+=20
++cairo_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ cairo_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/cryptsetup b/modules/cryptsetup
+index 4cea7f3..d68da0c 100644
+--- a/modules/cryptsetup
++++ b/modules/cryptsetup
+@@ -20,6 +20,7 @@ cryptsetup_configure :=3D ./configure \
+=20
+ # but after building, replace prefix so that they will be installed
+ # in the correct directory.
++cryptsetup_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ cryptsetup_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	&& $(MAKE) \
+diff --git a/modules/dropbear b/modules/dropbear
+index 998087c..834a3ef 100644
+--- a/modules/dropbear
++++ b/modules/dropbear
+@@ -19,6 +19,7 @@ dropbear_configure :=3D ./configure \
+ 	--disable-wtmpx \
+=20=09
+ dropbear_output :=3D ssh scp dropbear
++dropbear_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ dropbear_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/fbwhiptail b/modules/fbwhiptail
+index f54a62d..1359677 100644
+--- a/modules/fbwhiptail
++++ b/modules/fbwhiptail
+@@ -6,6 +6,7 @@ fbwhiptail_version :=3D git
+ fbwhiptail_dir :=3D fbwhiptail
+ fbwhiptail_repo :=3D https://source.puri.sm/coreboot/fbwhiptail.git
+=20
++fbwhiptail_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ fbwhiptail_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/flashrom b/modules/flashrom
+index 0a29b18..d695818 100644
+--- a/modules/flashrom
++++ b/modules/flashrom
+@@ -11,6 +11,7 @@ flashrom_tar :=3D flashrom-$(flashrom_version).tar.bz2
+ flashrom_url :=3D https://download.flashrom.org/releases/$(flashrom_tar)
+ flashrom_hash :=3D 3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170=
c4dc9dee64
+=20
++flashrom_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ flashrom_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/flashtools b/modules/flashtools
+index d95c215..090362c 100644
+--- a/modules/flashtools
++++ b/modules/flashtools
+@@ -11,6 +11,7 @@ flashtools_tar :=3D flashtools-$(flashtools_version).tar=
.gz
+ flashtools_url :=3D https://github.com/osresearch/flashtools/archive/v$(f=
lashtools_version).tar.gz
+ flashtools_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08=
a2f39302c22c
+=20
++flashtools_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ flashtools_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/frotz b/modules/frotz
+index 611e04a..e2c2e22 100644
+--- a/modules/frotz
++++ b/modules/frotz
+@@ -8,6 +8,7 @@ frotz_hash :=3D dbb5eb3bc95275dcb984c4bdbaea58bc1f1b085b20=
092ce6e86d9f0bf3ba858f
+=20
+ frotz_configure :=3D touch .config
+=20
++frotz_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ frotz_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/gpg b/modules/gpg
+index 4d4440a..6a48664 100644
+--- a/modules/gpg
++++ b/modules/gpg
+@@ -39,6 +39,7 @@ gpg_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++gpg_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ gpg_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(gpg_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/gpg2 b/modules/gpg2
+index 318a4cd..522e518 100644
+--- a/modules/gpg2
++++ b/modules/gpg2
+@@ -50,6 +50,7 @@ gpg2_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++gpg2_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ gpg2_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(gpg2_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/kexec b/modules/kexec
+index d2311c2..b507d81 100644
+--- a/modules/kexec
++++ b/modules/kexec
+@@ -14,6 +14,7 @@ kexec_configure :=3D ./configure \
+ 	--without-lzma \
+ 	&& $(MAKE) clean
+=20
++kexec_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ kexec_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libassuan b/modules/libassuan
+index 3c4e319..6138ec2 100644
+--- a/modules/libassuan
++++ b/modules/libassuan
+@@ -14,6 +14,7 @@ libassuan_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++libassuan_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_=
PATH=3D LIBRARY_PATH=3D
+ libassuan_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libgcrypt b/modules/libgcrypt
+index aa7e1ef..384f672 100644
+--- a/modules/libgcrypt
++++ b/modules/libgcrypt
+@@ -14,6 +14,7 @@ libgcrypt_configure :=3D ./configure \
+ 	--disable-asm \
+ 	--disable-nls \
+=20=09
++libgcrypt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_=
PATH=3D LIBRARY_PATH=3D
+ libgcrypt_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libgpg-error b/modules/libgpg-error
+index 752e11a..3d4d217 100644
+--- a/modules/libgpg-error
++++ b/modules/libgpg-error
+@@ -16,6 +16,7 @@ libgpg-error_configure :=3D ./configure \
+ 	--disable-tests \
+ 	--disable-asm \
+=20
++libgpg-error_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLU=
DE_PATH=3D LIBRARY_PATH=3D CC_FOR_BUILD=3D"$(CC_FOR_BUILD)"
+ libgpg-error_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libksba b/modules/libksba
+index d352913..bd1835b 100644
+--- a/modules/libksba
++++ b/modules/libksba
+@@ -14,6 +14,7 @@ libksba_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++libksba_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ libksba_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libpng b/modules/libpng
+index d6d9e65..33306e2 100644
+--- a/modules/libpng
++++ b/modules/libpng
+@@ -12,6 +12,7 @@ libpng_configure :=3D \
+         --host i386-elf-linux \
+ 	--prefix=3D"/" \
+=20
++libpng_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ libpng_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libremkey-hotp-verification b/modules/libremkey-hotp-=
verification
+index c9b9d45..e7fab7d 100644
+--- a/modules/libremkey-hotp-verification
++++ b/modules/libremkey-hotp-verification
+@@ -6,6 +6,7 @@ libremkey-hotp-verification_version :=3D git
+ libremkey-hotp-verification_dir :=3D libremkey-hotp-verification
+ libremkey-hotp-verification_repo :=3D --recursive https://github.com/Nitr=
okey/nitrokey-hotp-verification
+=20
++libremkey-hotp-verification_make_environment :=3D CPATH=3D C_INCLUDE_PATH=
=3D CPLUS_INCLUDE_PATH=3D LIBRARY_PATH=3D
+ libremkey-hotp-verification_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libusb b/modules/libusb
+index b7fe959..fe274e9 100644
+--- a/modules/libusb
++++ b/modules/libusb
+@@ -19,6 +19,7 @@ libusb_configure :=3D ./configure\
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
+=20
++libusb_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ libusb_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libusb-compat b/modules/libusb-compat
+index f95854e..78033ef 100644
+--- a/modules/libusb-compat
++++ b/modules/libusb-compat
+@@ -22,6 +22,7 @@ libusb-compat_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++libusb-compat_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCL=
UDE_PATH=3D LIBRARY_PATH=3D
+ libusb-compat_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/lvm2 b/modules/lvm2
+index 91f0f53..def7544 100644
+--- a/modules/lvm2
++++ b/modules/lvm2
+@@ -34,6 +34,7 @@ lvm2_configure :=3D \
+ 	--with-cluster=3Dnone \
+=20
+ # not sure why LIB_SUFFIX is not defined in the cross build
++lvm2_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ lvm2_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/mbedtls b/modules/mbedtls
+index d844b16..2611866 100644
+--- a/modules/mbedtls
++++ b/modules/mbedtls
+@@ -10,6 +10,7 @@ mbedtls_libraries :=3D library/libmbedcrypto.so.0
+=20
+ mbedtls_configure :=3D
+=20
++mbedtls_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ mbedtls_target :=3D \
+ 	SHARED=3D1 \
+ 	DESTDIR=3D$(INSTALL) \
+diff --git a/modules/msrtools b/modules/msrtools
+index 9adfab0..85b5954 100644
+--- a/modules/msrtools
++++ b/modules/msrtools
+@@ -11,6 +11,7 @@ msrtools_tar :=3D msr-tools-$(msrtools_version).tar.gz
+ msrtools_url :=3D https://github.com/intel/msr-tools/archive/msr-tools-$(=
msrtools_version).tar.gz
+ msrtools_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2=
f39302c22c
+=20
++msrtools_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ msrtools_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/musl b/modules/musl
+index eec76de..89b9a0f 100644
+--- a/modules/musl
++++ b/modules/musl
+@@ -24,6 +24,7 @@ musl_configure :=3D ./configure \
+ 	--enable-gcc-wrapper \
+ 	--enable-shared \
+=20
++musl_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ musl_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS_NOCC) \
+diff --git a/modules/newt b/modules/newt
+index cc6341d..bad67c7 100644
+--- a/modules/newt
++++ b/modules/newt
+@@ -8,6 +8,7 @@ newt_tar :=3D newt-$(newt_version).tar.gz
+ newt_url :=3D https://releases.pagure.org/newt/$(newt_tar)
+ newt_hash :=3D 8d66ba6beffc3f786d4ccfee9d2b43d93484680ef8db9397a4fb70b5ad=
bb6dbc
+=20
++newt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ newt_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/npth b/modules/npth
+index e0f30c6..a43d626 100644
+--- a/modules/npth
++++ b/modules/npth
+@@ -14,6 +14,7 @@ npth_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++npth_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ npth_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/pciutils b/modules/pciutils
+index 2ea5b9b..dfee3a0 100644
+--- a/modules/pciutils
++++ b/modules/pciutils
+@@ -16,6 +16,7 @@ pciutils_hash :=3D 64293c6ab9318c40ef262b76d87bd90975317=
59752bac556e50979b1e63cfe6
+ # reproducible.  Otherwise the build path will be embedded
+ # in the library and executables.
+=20
++pciutils_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ pciutils_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/pinentry b/modules/pinentry
+index c0e93d7..a541ce0 100644
+--- a/modules/pinentry
++++ b/modules/pinentry
+@@ -33,6 +33,7 @@ pinentry_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++pinentry_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ pinentry_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(pinentry_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/pixman b/modules/pixman
+index 65a2e20..198f8ac 100644
+--- a/modules/pixman
++++ b/modules/pixman
+@@ -13,6 +13,7 @@ pixman_configure :=3D \
+ 	--prefix=3D"/" \
+ 	--disable-gtk
+=20
++pixman_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ pixman_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/popt b/modules/popt
+index b3b0b04..242ae03 100644
+--- a/modules/popt
++++ b/modules/popt
+@@ -11,6 +11,7 @@ popt_configure :=3D ./configure \
+ 	--prefix "/" \
+ 	--host i386-elf-linux \
+=20
++popt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ popt_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/qrencode b/modules/qrencode
+index fb73c7b..afded70 100644
+--- a/modules/qrencode
++++ b/modules/qrencode
+@@ -14,6 +14,7 @@ qrencode_configure :=3D ./configure \
+ 	--without-tools \
+ 	--host i386-elf-linux \
+=20
++qrencode_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ qrencode_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/slang b/modules/slang
+index a4ac84b..a338639 100644
+--- a/modules/slang
++++ b/modules/slang
+@@ -18,6 +18,7 @@ slang_configure :=3D ./configure \
+   && mkdir -p src/elfobjs
+=20
+ # Disable parallel make for the install target
++slang_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ slang_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/tpmtotp b/modules/tpmtotp
+index 792dd51..02c6c10 100644
+--- a/modules/tpmtotp
++++ b/modules/tpmtotp
+@@ -11,6 +11,7 @@ tpmtotp_tar :=3D tpmtotp-$(tpmtotp_version).tar.gz
+ tpmtotp_url :=3D https://github.com/osresearch/tpmtotp/archive/v$(tpmtotp=
_version).tar.gz
+ tpmtotp_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2f=
39302c22c
+=20
++tpmtotp_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ tpmtotp_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/util-linux b/modules/util-linux
+index e3377f6..a50bf40 100644
+--- a/modules/util-linux
++++ b/modules/util-linux
+@@ -22,6 +22,7 @@ util-linux_configure :=3D ./configure \
+ 	--enable-libblkid \
+=20
+=20
++util-linux_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ util-linux_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/zlib b/modules/zlib
+index dbdb44e..a6290b2 100644
+--- a/modules/zlib
++++ b/modules/zlib
+@@ -12,6 +12,7 @@ zlib_configure :=3D \
+ 	./configure \
+ 	--prefix=3D"/" \
+=20
++zlib_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ zlib_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:27 2019
Received: from localhost ([127.0.0.1]:52331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3z-0007a8-7Y
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:27 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3i-0007Yt-6O
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:10 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 4A88B3362141;
 Sun, 29 Sep 2019 13:08:09 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 7/7] gnu: Add heads-kgpe-d16.
Date: Sun, 29 Sep 2019 13:07:50 +0200
Message-Id: <20190929110750.21214-8-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-kgpe-d16): New variable.
---
 gnu/packages/heads.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 80e570b097..22f3f60d75 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -591,3 +591,20 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-coreboot")
        ,@(package-arguments heads-coreboot)))))
+
+(define-public heads-kgpe-d16
+  (package
+    (inherit heads-coreboot)
+    (name "heads-kgpe-d16")
+    (native-inputs
+     (alist-replace "gnupg"
+       (list (origin
+         (method url-fetch)
+         (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-1.4.21.tar.bz2")
+         (sha256
+          (base32 "0xi2mshq8f6zbarb5f61c9w2qzwrdbjm4q8fqsrwlzc51h8a6ivb"))))
+      (package-native-inputs heads-coreboot)))
+    (arguments
+     `(#:make-flags
+       '("BOARD=kgpe-d16")
+       ,@(package-arguments heads-coreboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:27 2019
Received: from localhost ([127.0.0.1]:52329 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3y-0007a1-Sl
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:27 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38432)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3i-0007YQ-0E
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:10 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 844BD3362337;
 Sun, 29 Sep 2019 13:08:07 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 3/7] gnu: Add heads-linuxboot.
Date: Sun, 29 Sep 2019 13:07:46 +0200
Message-Id: <20190929110750.21214-4-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-linuxboot): New variable.
---
 gnu/packages/heads.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 311eeeb1a1..7d1f70a621 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -510,3 +510,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)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:26 2019
Received: from localhost ([127.0.0.1]:52327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3y-0007Zt-K6
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:26 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38446)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3h-0007Yg-OC
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:10 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id D370633607C3;
 Sun, 29 Sep 2019 13:08:08 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 6/7] gnu: Add heads-qemu-coreboot.
Date: Sun, 29 Sep 2019 13:07:49 +0200
Message-Id: <20190929110750.21214-7-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-coreboot): New variable.
---
 gnu/packages/heads.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 0b6a93d744..80e570b097 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -24,7 +24,8 @@
   #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
-  #:use-module (gnu packages virtualization))
+  #:use-module (gnu packages virtualization)
+  #:use-module ((guix build utils) #:select (alist-replace)))
 
 (define-public musl-cross
   (let ((revision "1")
@@ -581,3 +582,12 @@ servers.")
     (native-inputs
      `(("file" ,file)
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-coreboot
+  (package
+    (inherit heads-coreboot)
+    (name "heads-qemu-coreboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-coreboot")
+       ,@(package-arguments heads-coreboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:26 2019
Received: from localhost ([127.0.0.1]:52325 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3y-0007Zm-Ar
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:26 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3h-0007YZ-A9
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:09 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 818A033629E9;
 Sun, 29 Sep 2019 13:08:08 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 5/7] gnu: Add heads-coreboot.
Date: Sun, 29 Sep 2019 13:07:48 +0200
Message-Id: <20190929110750.21214-6-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-coreboot): New variable.
---
 gnu/packages/heads.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 179dab1546..0b6a93d744 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -565,3 +565,19 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-linuxboot")
        ,@(package-arguments heads-linuxboot)))))
+
+(define heads-coreboot
+  (package
+    (inherit heads)
+    (name "heads-coreboot")
+    (arguments
+     (substitute-keyword-arguments (package-arguments heads)
+      ((#:phases phases)
+       `(modify-phases ,phases
+          (add-before 'unpack-heads-packages 'unpack-coreboot
+            (lambda* (#:key inputs #:allow-other-keys)
+               (mkdir-p "build")
+               #t))))))
+    (native-inputs
+     `(("file" ,file)
+       ,@(package-native-inputs heads)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:26 2019
Received: from localhost ([127.0.0.1]:52323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3y-0007Ze-0n
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:26 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3g-0007YT-VU
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:09 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 2CC6F336297E;
 Sun, 29 Sep 2019 13:08:08 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 4/7] gnu: Add heads-qemu-linuxboot.
Date: Sun, 29 Sep 2019 13:07:47 +0200
Message-Id: <20190929110750.21214-5-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-linuxboot): New variable.
---
 gnu/packages/heads.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 7d1f70a621..179dab1546 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -556,3 +556,12 @@ servers.")
              (sha256
               (base32 "1bdj4m9dvih9fhp5q5c6cp5sphzbpag5gp4bz1p8g9lqi49lb7av"))))
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-linuxboot
+  (package
+    (inherit heads-linuxboot)
+    (name "heads-qemu-linuxboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-linuxboot")
+       ,@(package-arguments heads-linuxboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:26 2019
Received: from localhost ([127.0.0.1]:52321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3m-0007ZN-Fg
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:25 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38416)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3f-0007YL-JR
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:08 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 1C6063362141;
 Sun, 29 Sep 2019 13:08:06 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 1/7] gnu: Add musl-cross.
Date: Sun, 29 Sep 2019 13:07:44 +0200
Message-Id: <20190929110750.21214-2-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190929110750.21214-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
 <20190929110750.21214-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk           |   1 +
 gnu/packages/heads.scm | 124 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/heads.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index b04a5d796e..01c726d8cf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -246,6 +246,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/haskell-web.scm			\
   %D%/packages/haskell-xyz.scm			\
   %D%/packages/ham-radio.scm			\
+  %D%/packages/heads.scm			\
   %D%/packages/hexedit.scm			\
   %D%/packages/hugs.scm				\
   %D%/packages/hurd.scm				\
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
new file mode 100644
index 0000000000..b547a374e0
--- /dev/null
+++ b/gnu/packages/heads.scm
@@ -0,0 +1,124 @@
+(define-module (gnu packages heads)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages cpio)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages virtualization))
+
+(define-public musl-cross
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "musl-cross")
+    (version (git-version "0.1" revision commit))
+    (source
+          (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/GregorR/musl-cross")
+                   (commit "3b5b118f1cdddecda3f04b5005f69f962278fc1e")))
+             (file-name "musl-cross-checkout")
+             (sha256
+              (base32 "0pd1b7k4gwbvnyw0677p56d7j0xmv80k5iihkkjrd1mp9zdx90gj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests in main project.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (setenv "SHELL" "bash")
+             (setenv "CONFIG_SHELL" "bash")
+             #t))
+         (add-after 'unpack 'unpack-dependencies
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory
+                                    destination-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))))
+             (for-each (lambda (name)
+                         (install-file* name "tarballs" ""))
+                       '("binutils" "target-gcc-5" "kernel-headers" "musl"))
+             (substitute* "config.sh"
+              (("^CC_BASE_PREFIX=.*")
+               (string-append "CC_BASE_PREFIX=" (assoc-ref outputs "out")
+                              "/crossgcc\n")))
+             ;; Note: Important: source/gcc-5.3.0/gcc/exec-tool.in
+             ;; Note: Important: source/kernel-headers-3.12.6-5/tools/install.sh
+             ;; Note: Important: move-if-change (twice)
+             ;; Make sure that shebangs are patched after new extractions.
+             (substitute* "defs.sh"
+              (("touch \"[$]2/extracted\"")
+               (string-append "touch \"$2/extracted\"
+for s in mkinstalldirs move-if-change compile depcomp callprocs configure \\
+mkdep compile libtool-ldflags config.guess install-sh missing config.sub \\
+config.rpath progtest.m4 lib-ld.m4 acx.m4 gen-fixed.sh mkheader.sh ylwrap \\
+merge.sh godeps.sh lock-and-run.sh print-sysroot-suffix.sh mkconfig.sh \\
+genmultilib exec-tool.in install.sh
+do
+  find . -name $s -exec sed -i -e 's;!/bin/sh;!" (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+  find . -name $s -exec sed -i -e 's; /bin/sh; " (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+done
+" )))
+             #t))
+         (replace 'build
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "./build.sh")))
+         (delete 'install))))
+    (native-inputs
+     `(("bash" ,bash)
+       ("flex" ,flex)
+       ("gmp" ,gmp)
+       ("mpfr" ,mpfr)
+       ("mpc" ,mpc)
+       ("binutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2")
+           (sha256
+            (base32 "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm"))))
+       ("target-gcc-5"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2")
+           (sha256
+            (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq"))))
+       ("kernel-headers"
+        ,(origin
+           (method url-fetch)
+           (uri "http://ftp.barfooze.de/pub/sabotage/tarballs/kernel-headers-3.12.6-5.tar.xz")
+           (sha256
+            (base32 "0p43lvbpy69lbjmvq39g570imj0p8z791bhzrpdnp1nygwshj2wf"))))
+       ("musl"
+        ,(origin
+           (method url-fetch)
+           (uri "http://www.musl-libc.org/releases/musl-1.1.21.tar.gz")
+           (sha256
+            (base32 "0i2z52zgc86af1n1gjiz43hgd85mxjgvgn345zsybja9dxpvchn7"))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Musl-cross gcc 5 toolchain")
+    (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
+    (license license:isc))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 29 Sep 2019 11:08:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 29 07:08:09 2019
Received: from localhost ([127.0.0.1]:52314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iEX3h-0007Ye-22
	for submit <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:09 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38414)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iEX3f-0007YK-JR
 for 37466 <at> debbugs.gnu.org; Sun, 29 Sep 2019 07:08:08 -0400
Received: from dayas.fritz.box (unknown [185.17.13.127])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id C69FC33607C3;
 Sun, 29 Sep 2019 13:08:05 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v3 0/7] Add heads.
Date: Sun, 29 Sep 2019 13:07:43 +0200
Message-Id: <20190929110750.21214-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This adds heads to Guix.  Heads is minimal Linux that runs as a coreboot or
LinuxBoot payload to provide a secure, flexible boot environment for laptops
and servers.

Heads uses checksums to make sure that all the components are what they are
supposed to be, at build time, at BOOT time and when resuming.

Therefore, it's difficult to replace stuff with our versions.
I'm not sure whether we should--since Heads is supposed to build the same
thing reproducibly everywhere.

A future version will be a variant which does replace Linux by Linux-libre,
but that also changes both the source hashes and the output (and thus the
output hashes).

Danny Milosavljevic (7):
  gnu: Add musl-cross.
  gnu: Add heads.
  gnu: Add heads-linuxboot.
  gnu: Add heads-qemu-linuxboot.
  gnu: Add heads-coreboot.
  gnu: Add heads-qemu-coreboot.
  gnu: Add heads-kgpe-d16.

 gnu/local.mk                                  |   2 +
 gnu/packages/heads.scm                        | 610 ++++++++++++++++++
 .../patches/heads-make-environment.patch      | 446 +++++++++++++
 3 files changed, 1058 insertions(+)
 create mode 100644 gnu/packages/heads.scm
 create mode 100644 gnu/packages/patches/heads-make-environment.patch





Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 25 Sep 2019 00:25:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 20:25:00 2019
Received: from localhost ([127.0.0.1]:40622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iCv6v-0005RI-If
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 20:25:00 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:42120)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iCv6s-0005R8-Vm
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 20:24:48 -0400
Received: from localhost (77.117.227.160.wireless.dyn.drei.com
 [77.117.227.160])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id E439733629A0;
 Wed, 25 Sep 2019 02:24:44 +0200 (CEST)
Date: Wed, 25 Sep 2019 02:24:39 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
Message-ID: <20190925022439.3c989874@HIDDEN>
In-Reply-To: <20190924164139.1d827100@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
 <20190920140529.234c55ad@alma-ubu>
 <20190920154954.35713605@HIDDEN>
 <20190924164018.082a3733@HIDDEN>
 <20190924164139.1d827100@HIDDEN>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/gBO_ZjAPq14DF+8+k_lB0kg"; protocol="application/pgp-signature"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 37466
Cc: =?ISO-8859-1?Q?Bj=F6rn_H=F6fling?= <bjoern.hoefling@HIDDEN>,
 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

--Sig_/gBO_ZjAPq14DF+8+k_lB0kg
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Better version:

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 9128a4f426..01b9eeaa90 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -202,12 +202,13 @@ done
            (uri "https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz")
            (sha256
             (base32 "08xdd5drk8yd37a3z5hc81qmgsybv6201i28hcggxh980vdz9pgh"=
))))
-       ("linux"
-        ,(origin
-           (method url-fetch)
-           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.6=
2.tar.xz")
-           (sha256
-            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"=
))))
+;       ("linux"
+;        ,(origin
+;           (method url-fetch)
+;           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.=
62.tar.xz")
+;           (sha256
+;            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji=
"))))
+       ("linux" ,linux-libre-4.14-source)
        ("musl" ; useless
         ,(origin
            (method url-fetch)
@@ -422,13 +423,16 @@ done
                  ;(invoke "tar" "-xf" source-file "-C" "build")
 ))
              (mkdir-p "packages")
+             (setenv "V" "1") ; verbose
              (setenv "GUIX_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
              (setenv "GUIX_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH=
"))
              (setenv "GUIX_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
              (setenv "GUIX_CPATH" (getenv "CPATH"))
+             (copy-file (assoc-ref inputs "linux")
+                        "packages/linux-4.14.62.tar.xz.tmp")
              (for-each (lambda (name)
                          (install-file* name "packages" ".tmp"))
-                       '("linux" "coreboot-blobs" "coreboot" "busybox" "zl=
ib" "mbedtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "=
popt" "lvm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" =
"npth" "libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt=
" "musl"))
+                       '("coreboot-blobs" "coreboot" "busybox" "zlib" "mbe=
dtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "popt" "l=
vm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" "npth" "=
libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt" "musl"=
))
              (mkdir-p "build")
              (mkdir-p "build/musl-cross-git/tarballs")
              (mkdir-p "build/coreboot-4.8.1/util/crossgcc/tarballs")
@@ -443,6 +447,9 @@ done
              (setenv "MUSL_DIR" (assoc-ref inputs "musl-cross"))
              (setenv "CROSS" (string-append (getenv "MUSL_DIR") "/crossgcc=
/x86_64-linux-musl/bin/x86_64-musl-linux-")) ; Note: Useless
              (substitute* "Makefile"
+              ;; Disable checksum verification--we do it ourselves.
+              (("sha256sum --check")
+               "cat")
               ;; Disable our non-cross toolchain environment.
               (("CROSS_TOOLS_NOCC :=3D ")
                ; CPP=3D" (getenv "CROSS") "cpp CXXCPP=3D" (getenv "CROSS")=
 "cpp "
@@ -461,11 +468,13 @@ done
                               "CC_FOR_BUILD =3D $(HOSTCC)\n" ; for libgpg-=
error
                               "BUILD_CC =3D $(HOSTCC)\n")) ; for kexec-too=
ls
               ;; Disable git, patch shebangs, and selectively re-enable ho=
st compiler.
+              ;; (Note: $HOSTCC is too complicated for bash, for example
+              ;;  HOSTCC=3D"a=3Db c=3Dd gcc", then issuing $HOSTCC won't w=
ork).
               (("(git clone.*)." _ tar)
-               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed po/Makefile.in.in po/Makefi=
le.in po/Makefile make.tmpl.in *-config.in src/*-config.in src/Makefile.in =
applets/install.sh applets/busybox.mkll tests/pkits/* tests/openpgp/* tests=
/fake-pinentries/fake-pinentry.sh tests/*/Makefile tests/inittests tests/ru=
ntests tests/Makefile.in tests/runtest modules/test/runtests.sh src/test/ru=
ntests.sh mkfiles/build.sh autoconf/* demo/Makefile.in slsh/Makefile.in uti=
l/xcompile/xcompile util/genbuild_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] =
; then sed -i -e 's;/bin/sh\\>;~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/b=
in/ln\\>;ln;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;false;' -e =
's;/bin/bash\\>;~a/bin/bash;' -e 's;/usr/bin/env bash;~a/bin/bash;' -e 's;g=
it clone;true clone;' -e 's;^TERMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;^HOSTCC=
.*$$$$;HOSTCC=3DC_INCLUDE_PATH=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_P=
ATH=3D\"$(GUIX_CPLUS_INCLUDE_PATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=
=3D\"$(GUIX_LIBRARY_PATH)\" gcc;' \"$$$$s\" ; fi ; done)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed applets/busybox.mkll applet=
s/busybox.mksuid po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in =
*-config.in src/*-config.in src/Makefile.in applets/install.sh applets/busy=
box.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry.=
sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests/=
runtest modules/test/runtests.sh src/test/runtests.sh mkfiles/build.sh auto=
conf/* demo/Makefile.in slsh/Makefile.in util/xcompile/xcompile util/genbui=
ld_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>;=
~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/fi=
le\\>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -=
e 's;/usr/bin/env bash;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^TE=
RMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;^HOSTCC.*$$$$;HOSTCC=3DC_INCLUDE_PATH=
=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=3D\"$(GUIX_CPLUS_INCLUDE_P=
ATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=3D\"$(GUIX_LIBRARY_PATH)\" gc=
c;' -e 's;^\\(\\$$$$HOSTCC[^|]*\\);(echo \\1 | bash);' \"$$$$s\" ; fi ; don=
e)
 " "true" (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref in=
puts "bash")))
               (("(tar -xf.*)." _ tar)
-               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed po/Makefile.in.in po/Makefi=
le.in po/Makefile make.tmpl.in *-config.in src/*-config.in src/Makefile.in =
applets/install.sh applets/busybox.mkll tests/pkits/* tests/openpgp/* tests=
/fake-pinentries/fake-pinentry.sh tests/*/Makefile tests/inittests tests/ru=
ntests tests/Makefile.in tests/runtest modules/test/runtests.sh src/test/ru=
ntests.sh mkfiles/build.sh autoconf/* demo/Makefile.in slsh/Makefile.in uti=
l/xcompile/xcompile util/genbuild_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] =
; then sed -i -e 's;/bin/sh\\>;~a/bin/sh;' -e 's;^TERMCAP=3D-ltermcap;TERMC=
AP=3D;' -e 's;/bin/pwd\\>;pwd;' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/file\\=
>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's=
;/usr/bin/env bash;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^HOSTCC=
.*$$$$;HOSTCC=3DC_INCLUDE_PATH=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_P=
ATH=3D\"$(GUIX_CPLUS_INCLUDE_PATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=
=3D\"$(GUIX_LIBRARY_PATH)\" gcc;' \"$$$$s\" ; fi ; done)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed applets/busybox.mkll applet=
s/busybox.mksuid po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in =
*-config.in src/*-config.in src/Makefile.in applets/install.sh applets/busy=
box.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry.=
sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests/=
runtest modules/test/runtests.sh src/test/runtests.sh mkfiles/build.sh auto=
conf/* demo/Makefile.in slsh/Makefile.in util/xcompile/xcompile util/genbui=
ld_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>;=
~a/bin/sh;' -e 's;^TERMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;/bin/pwd\\>;pwd;'=
 -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;fa=
lse;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's;/usr/bin/env bash;~a/bin/bash;=
' -e 's;git clone;true clone;' -e 's;^HOSTCC.*$$$$;HOSTCC=3DC_INCLUDE_PATH=
=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=3D\"$(GUIX_CPLUS_INCLUDE_P=
ATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=3D\"$(GUIX_LIBRARY_PATH)\" gc=
c;' -e 's;^\\(\\$$$$HOSTCC[^|]*\\);(echo \\1 | bash);' \"$$$$s\" ; fi ; don=
e)
 " tar (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref input=
s "bash"))))
              ;(substitute* "modules/musl-cross"
              ; (("/bin/echo") "echo"))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 59874b097c..5b234a1ba9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -194,7 +194,7 @@ defconfig.  Return the appropriate make target if appli=
cable, otherwise return
=20
 (define deblob-scripts-4.14
   (linux-libre-deblob-scripts
-   "4.14.140"
+   "4.14.62"
    (base32 "091jk9jkn9jf39bxpc7395bhcb7p96nkg3a8047380ki06lnfxh6")
    (base32 "0x9nd3hnyrm753cbgdqmy92mbnyw86w64g4hvyibnkpq5n7s3z9n")))
=20
@@ -366,10 +366,10 @@ corresponding UPSTREAM-SOURCE (an origin), using the =
given DEBLOB-SCRIPTS."
                              (%upstream-linux-source version hash)
                              deblob-scripts-4.19)))
=20
-(define-public linux-libre-4.14-version "4.14.142")
+(define-public linux-libre-4.14-version "4.14.62")
 (define-public linux-libre-4.14-pristine-source
   (let ((version linux-libre-4.14-version)
-        (hash (base32 "1wwhnm1n1b6yzsd2zzzf9i3n4hlvgnph70p67cwahw0ik4ssayz=
6")))
+        (hash (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjj=
i")))
     (make-linux-libre-source version
                              (%upstream-linux-source version hash)
                              deblob-scripts-4.14)))

--Sig_/gBO_ZjAPq14DF+8+k_lB0kg
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2Ks8cACgkQ5xo1VCww
uqVYtQgAl3LkYQumV3//kaKRpVS309m4k/vZBV1EcB/4+/XRqP9991CDR07YTi9x
/LbKNB15/xuwy/XOuAppl8VAHabvTMZafl7F1SzCFHcQka7QF7jF0/MuSkW5bVd0
ihyeppT3TOv79KgRXJNZtlhqbuWNodxDIkbvrZThkBVqFLSmict2wSwsHuIAGCpY
HAb/3PIUHh5tZVeI5oWX/cIAvK/DFRJV+R1kdpCA4+7TxgezZ5W9XHRZSArmZIgc
60vw4mmgU5T64pt8H0YQhAlCG9zRmgEhLgk18gyd/N+5NysOQdcs7F4x/I2yHxIE
aYuFTQhK5kzFm6S0lHiuJpnj8ZPwqg==
=sl6l
-----END PGP SIGNATURE-----

--Sig_/gBO_ZjAPq14DF+8+k_lB0kg--




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:41:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:41:50 2019
Received: from localhost ([127.0.0.1]:39858 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iCm0i-00062H-Em
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:41:50 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45580)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iCm0f-000626-Td
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:41:47 -0400
Received: from localhost (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id DDD553360C4C;
 Tue, 24 Sep 2019 16:41:44 +0200 (CEST)
Date: Tue, 24 Sep 2019 16:41:39 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
Message-ID: <20190924164139.1d827100@HIDDEN>
In-Reply-To: <20190924164018.082a3733@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
 <20190920140529.234c55ad@alma-ubu>
 <20190920154954.35713605@HIDDEN>
 <20190924164018.082a3733@HIDDEN>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/nGoB9cM2SjB/kQ/H84.//=j"; protocol="application/pgp-signature"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 37466
Cc: =?ISO-8859-1?Q?Bj=F6rn_H=F6fling?= <bjoern.hoefling@HIDDEN>,
 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--Sig_/nGoB9cM2SjB/kQ/H84.//=j
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

To use our linux-libre (with the mentioned problems):

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 9128a4f426..e9c0b6b41c 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -202,12 +202,13 @@ done
            (uri "https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz")
            (sha256
             (base32 "08xdd5drk8yd37a3z5hc81qmgsybv6201i28hcggxh980vdz9pgh"=
))))
-       ("linux"
-        ,(origin
-           (method url-fetch)
-           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.6=
2.tar.xz")
-           (sha256
-            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"=
))))
+;       ("linux"
+;        ,(origin
+;           (method url-fetch)
+;           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.=
62.tar.xz")
+;           (sha256
+;            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji=
"))))
+       ("linux" ,linux-libre-4.14-source)
        ("musl" ; useless
         ,(origin
            (method url-fetch)
@@ -422,13 +423,16 @@ done
                  ;(invoke "tar" "-xf" source-file "-C" "build")
 ))
              (mkdir-p "packages")
+             (setenv "V" "1") ; verbose
              (setenv "GUIX_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
              (setenv "GUIX_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH=
"))
              (setenv "GUIX_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
              (setenv "GUIX_CPATH" (getenv "CPATH"))
+             (copy-file (assoc-ref inputs "linux")
+                        "packages/linux-4.14.62.tar.xz.tmp")
              (for-each (lambda (name)
                          (install-file* name "packages" ".tmp"))
-                       '("linux" "coreboot-blobs" "coreboot" "busybox" "zl=
ib" "mbedtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "=
popt" "lvm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" =
"npth" "libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt=
" "musl"))
+                       '("coreboot-blobs" "coreboot" "busybox" "zlib" "mbe=
dtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "popt" "l=
vm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" "npth" "=
libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt" "musl"=
))
              (mkdir-p "build")
              (mkdir-p "build/musl-cross-git/tarballs")
              (mkdir-p "build/coreboot-4.8.1/util/crossgcc/tarballs")
@@ -443,6 +447,9 @@ done
              (setenv "MUSL_DIR" (assoc-ref inputs "musl-cross"))
              (setenv "CROSS" (string-append (getenv "MUSL_DIR") "/crossgcc=
/x86_64-linux-musl/bin/x86_64-musl-linux-")) ; Note: Useless
              (substitute* "Makefile"
+              ;; Disable checksum verification--we do it ourselves.
+              (("sha256sum --check")
+               "cat")
               ;; Disable our non-cross toolchain environment.
               (("CROSS_TOOLS_NOCC :=3D ")
                ; CPP=3D" (getenv "CROSS") "cpp CXXCPP=3D" (getenv "CROSS")=
 "cpp "

--Sig_/nGoB9cM2SjB/kQ/H84.//=j
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2KKyMACgkQ5xo1VCww
uqV4wQgAouQa5UpEq1aFDYw+R7xvcErVqcss/BSwi0AJKEYXNsOvGxBE1rzfR2Zt
mWxHvaxf7oIp3eigZSAcBBaCNBZkcAENi+CTITTlv8y2OPFVLN7ztwOr4XOcTMTM
sAcv3wsdnjptKnm4R+50w+PudA4WEFuXj0XlOYlKtQqHDfs+ZsImqNd15elaLgRH
H0SC5ub7fGs5IDbfw4PyMnDzBjrZZLi7yEmV06j8J8JAB1/NpknrVDljVaaxoLtb
fNxKjMp5aL9Zt9f5objk7y32Ng8znv1stB+0DvmIZsXXeG8LJAVajOuZblvw8gpI
GPhN8opnhYXwWaPJNR6EZpiAZMFutg==
=9stl
-----END PGP SIGNATURE-----

--Sig_/nGoB9cM2SjB/kQ/H84.//=j--




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:41:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:41:01 2019
Received: from localhost ([127.0.0.1]:39843 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzx-0005zi-Kv
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:41:01 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45450)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzZ-0005yE-W8
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:41 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id E09243367A21;
 Tue, 24 Sep 2019 16:40:36 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 7/7] gnu: Add heads-kgpe-d16.
Date: Tue, 24 Sep 2019 16:01:57 +0200
Message-Id: <20190924140157.23564-8-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-kgpe-d16): New variable.
---
 gnu/packages/heads.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 8436bf2880..9128a4f426 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -588,3 +588,20 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-coreboot")
        ,@(package-arguments heads-coreboot)))))
+
+(define-public heads-kgpe-d16
+  (package
+    (inherit heads-coreboot)
+    (name "heads-kgpe-d16")
+    (native-inputs
+     (alist-replace "gnupg"
+       (list (origin
+         (method url-fetch)
+         (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-1.4.21.tar.bz2")
+         (sha256
+          (base32 "0xi2mshq8f6zbarb5f61c9w2qzwrdbjm4q8fqsrwlzc51h8a6ivb"))))
+      (package-native-inputs heads-coreboot)))
+    (arguments
+     `(#:make-flags
+       '("BOARD=kgpe-d16")
+       ,@(package-arguments heads-coreboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:41:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:41:01 2019
Received: from localhost ([127.0.0.1]:39841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzx-0005zb-Cg
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:41:01 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzY-0005yA-5e
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:41 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 5054733677A1;
 Tue, 24 Sep 2019 16:40:35 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 5/7] gnu: Add heads-coreboot.
Date: Tue, 24 Sep 2019 16:01:55 +0200
Message-Id: <20190924140157.23564-6-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-coreboot): New variable.
---
 gnu/packages/heads.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 8982dc1fd3..ef1748b992 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -562,3 +562,19 @@ servers.")
      `(#:make-flags
        '("BOARD=qemu-linuxboot")
        ,@(package-arguments heads-linuxboot)))))
+
+(define heads-coreboot
+  (package
+    (inherit heads)
+    (name "heads-coreboot")
+    (arguments
+     (substitute-keyword-arguments (package-arguments heads)
+      ((#:phases phases)
+       `(modify-phases ,phases
+          (add-before 'unpack-heads-packages 'unpack-coreboot
+            (lambda* (#:key inputs #:allow-other-keys)
+               (mkdir-p "build")
+               #t))))))
+    (native-inputs
+     `(("file" ,file)
+       ,@(package-native-inputs heads)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:41:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:41:01 2019
Received: from localhost ([127.0.0.1]:39839 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzx-0005zS-2f
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:41:01 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45442)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzZ-0005yC-09
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:41 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 1C911336798E;
 Tue, 24 Sep 2019 16:40:36 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 6/7] gnu: Add heads-qemu-coreboot.
Date: Tue, 24 Sep 2019 16:01:56 +0200
Message-Id: <20190924140157.23564-7-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-coreboot): New variable.
---
 gnu/packages/heads.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index ef1748b992..8436bf2880 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -24,7 +24,8 @@
   #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
-  #:use-module (gnu packages virtualization))
+  #:use-module (gnu packages virtualization)
+  #:use-module ((guix build utils) #:select (alist-replace)))
 
 (define-public musl-cross
   (let ((revision "1")
@@ -578,3 +579,12 @@ servers.")
     (native-inputs
      `(("file" ,file)
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-coreboot
+  (package
+    (inherit heads-coreboot)
+    (name "heads-qemu-coreboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-coreboot")
+       ,@(package-arguments heads-coreboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:41:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:41:00 2019
Received: from localhost ([127.0.0.1]:39837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzv-0005zK-Oa
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:59 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzX-0005y7-CI
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:40 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 6ED15336770E;
 Tue, 24 Sep 2019 16:40:34 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 4/7] gnu: Add heads-qemu-linuxboot.
Date: Tue, 24 Sep 2019 16:01:54 +0200
Message-Id: <20190924140157.23564-5-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-linuxboot): New variable.
---
 gnu/packages/heads.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 72565531e3..8982dc1fd3 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -553,3 +553,12 @@ servers.")
              (sha256
               (base32 "1bdj4m9dvih9fhp5q5c6cp5sphzbpag5gp4bz1p8g9lqi49lb7av"))))
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-linuxboot
+  (package
+    (inherit heads-linuxboot)
+    (name "heads-qemu-linuxboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-linuxboot")
+       ,@(package-arguments heads-linuxboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:40:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:40:59 2019
Received: from localhost ([127.0.0.1]:39835 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzj-0005yz-VV
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:57 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45422)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzV-0005xy-L1
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:40 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id F39633360C4C;
 Tue, 24 Sep 2019 16:40:31 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 2/7] gnu: Add heads.
Date: Tue, 24 Sep 2019 16:01:52 +0200
Message-Id: <20190924140157.23564-3-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm (heads): New variable.
* gnu/packages/patches/heads-make-environment.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/heads.scm                        | 385 +++++++++++++++
 .../patches/heads-make-environment.patch      | 446 ++++++++++++++++++
 3 files changed, 832 insertions(+)
 create mode 100644 gnu/packages/patches/heads-make-environment.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2ca70bdeaf..b2f801b05f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -947,6 +947,7 @@ dist_patch_DATA =3D						\
   %D%/packages/patches/hdf-eos5-remove-gctp.patch		\
   %D%/packages/patches/hdf-eos5-fix-szip.patch			\
   %D%/packages/patches/hdf-eos5-fortrantests.patch		\
+  %D%/packages/patches/heads-make-environment.patch		\
   %D%/packages/patches/higan-remove-march-native-flag.patch	\
   %D%/packages/patches/hubbub-sort-entities.patch		\
   %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch        \
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index b547a374e0..94764e9a1f 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -4,8 +4,12 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
@@ -13,8 +17,11 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages cpio)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization))
@@ -122,3 +129,381 @@ done
     (synopsis "Musl-cross gcc 5 toolchain")
     (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
     (license license:isc))))
+
+(define heads
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "heads")
+    (version (git-version "0.1" revision commit))
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+             (url "https://github.com/osresearch/heads.git")
+             (commit commit)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "0sgyqm4ss88hfp8miz40mw40kj7qp2khr7jcvscwv87bd5g9nwnx"))
+      (patches (search-patches "heads-make-environment.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("bash" ,bash)
+       ("git" ,git)
+       ("perl" ,perl)
+       ("cpio" ,cpio)
+       ("m4" ,m4)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("curl" ,curl) ; unused
+       ("zlibx" ,zlib)
+       ("musl-cross" ,musl-cross)
+       ("elfutils" ,elfutils)
+       ("bc" ,bc)
+       ("findutils" ,findutils)
+       ("flashtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/flashtools.git")
+                 (commit "9acce09aeb635c5bef01843e495b95e75e8da135")))
+           (file-name "flashtools-checkout")
+           (sha256
+            (base32 "0r4gj3nzr67ycd39k1vjzxfzkp90yacrdgxhc1z5jfvxfq4x91c1"=
))))
+       ("tpmtotp"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/tpmtotp.git")
+                 (commit "18b860fdcf5a55537c8395b891f2b2a5c24fc00a")))
+           (file-name "tpmtotp-checkout")
+           (sha256
+            (base32 "112p5afkrbipr0d8x9r9mrxrr3xyf97s2y3f32p41vs951sksqnv"=
))))
+       ("msrtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/msr-tools.git")
+                 (commit "572ef8a2b873eda15a322daa48861140a078b92c")))
+           (file-name "msr-tools-checkout")
+           (sha256
+            (base32 "0an1ypj5pin9l413vn4gxzi3x6ir1rba9jv6n5gk6s9dq803lb6p"=
))))
+       ("coreboot-blobs"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-blobs-4.8.1.ta=
r.xz")
+           (sha256
+            (base32 "15g222xj1zdn8i8qz0pw2jf28h66dljb1q5isw2ml05gwfd51ahq"=
))))
+       ("coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz")
+           (sha256
+            (base32 "08xdd5drk8yd37a3z5hc81qmgsybv6201i28hcggxh980vdz9pgh"=
))))
+       ("linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.6=
2.tar.xz")
+           (sha256
+            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"=
))))
+       ("musl" ; useless
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.musl-libc.org/releases/musl-1.1.15.tar.gz")
+           (sha256
+            (base32 "1ymhxkskivzph0q34zadwfglc5gyahqajm7chqqn2zraxv3lgr4p"=
))))
+       ("busybox"
+        ,(origin
+           (method url-fetch)
+           (uri "https://busybox.net/downloads/busybox-1.28.0.tar.bz2")
+           (sha256
+            (base32 "1701carjf02y7r3djm1yvyd5kzrcxm4szinp7agfv7fmvfvm6ib0"=
))))
+       ("zlib"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.zlib.net/zlib-1.2.11.tar.gz")
+           (sha256
+            (base32 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"=
))))
+       ("mbedtls"
+        ,(origin
+           (method url-fetch)
+           (uri "https://tls.mbed.org/download/mbedtls-2.4.2-gpl.tgz")
+           (sha256
+            (base32 "17r9qs585gqghcf5yavb1cnvsigl0f8r0k8rklr5a855hrajs7yh"=
))))
+       ("kexec-tools"
+        ,(origin
+           (method url-fetch)
+           (uri "https://kernel.org/pub/linux/utils/kernel/kexec/kexec-too=
ls-2.0.16.tar.gz")
+           (sha256
+            (base32 "0fkg5y3wxvkqrjii90iz1i59qd6hhq7ar27f0sgv7jbppyczq5yg"=
))))
+       ("qrencode"
+        ,(origin
+           (method url-fetch)
+           (uri "https://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz")
+           (sha256
+            (base32 "0wiagx7i8p9zal53smf5abrnh9lr31mv0p36wg017401jrmf5577"=
))))
+       ("pciutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/software/utils/pciutils/pciuti=
ls-3.5.4.tar.xz")
+           (sha256
+            (base32 "0rpy7kkb2y89wmbcbfjjjxsk2x89v5xxhxib4vpl131ip5m3qab4"=
))))
+       ("util-linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/util-linux/v2.29/u=
til-linux-2.29.2.tar.xz")
+           (sha256
+            (base32 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"=
))))
+       ("flashrom"
+        ,(origin
+           (method url-fetch)
+           (uri "https://download.flashrom.org/releases/flashrom-1.0.tar.b=
z2")
+           (sha256
+            (base32 "0r7fkpfc8w51n8ffbhclj4wa3kwrk0ijv1acwpw5myx5bchzl0ip"=
))))
+       ("popt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://launchpad.net/popt/head/1.16/+download/popt-1.16.=
tar.gz")
+           (sha256
+            (base32 "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"=
))))
+       ("lvm2"
+        ,(origin
+           (method url-fetch)
+           (uri "https://mirrors.kernel.org/sourceware/lvm2/LVM2.2.02.168.=
tgz")
+           (sha256
+            (base32 "03b62hcsj9z37ckd8c21wwpm07s9zblq7grfh58yzcs1vp6x38r3"=
))))
+       ("cryptsetup"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cr=
yptsetup-1.7.3.tar.xz")
+           (sha256
+            (base32 "00nwd96m9yq4k3cayc04i5y7iakkzana35zxky6hpx2w8zl08axg"=
))))
+       ("libgpg-error"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.=
32.tar.bz2")
+           (sha256
+            (base32 "1jj08ns4sh1hmafqp1giskvdicdz18la516va26jycy27kkwaif3"=
))))
+       ("libgcrypt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.3.ta=
r.bz2")
+           (sha256
+            (base32 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"=
))))
+       ("libksba"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz=
2")
+           (sha256
+            (base32 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"=
))))
+       ("libassuan"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.1.ta=
r.bz2")
+           (sha256
+            (base32 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"=
))))
+       ("npth"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2")
+           (sha256
+            (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"=
))))
+       ("libusb"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-1=
.0/libusb-1.0.21/libusb-1.0.21.tar.bz2")
+           (sha256
+            (base32 "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx"=
))))
+       ("libusb-compat"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-c=
ompat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2")
+           (sha256
+            (base32 "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"=
))))
+       ("dropbear"
+        ,(origin
+           (method url-fetch)
+           (uri "https://matt.ucc.asn.au/dropbear/releases/dropbear-2016.7=
4.tar.bz2")
+           (sha256
+            (base32 "14c8f4gzixf0j9fkx68jgl85q7b05852kk0vf09gi6h0xmafl817"=
))))
+       ("pinentry"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.=
tar.bz2")
+           (sha256
+            (base32 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"=
))))
+       ("gnupg"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.10.tar.b=
z2")
+           (sha256
+            (base32 "05f9804g72pffdxgvxjmjzkfcpjg1x221g9rwcr8fi51hrxd77br"=
))))
+       ("slang"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.jedsoft.org/releases/slang/slang-2.3.1a.tar.b=
z2")
+           (sha256
+            (base32 "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l"=
))))
+       ("newt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://releases.pagure.org/newt/newt-0.52.20.tar.gz")
+           (sha256
+            (base32 "1g3dpfnvaw7vljbr7nzq1rl88d6r8cmrvvng9inphgzwxxmvlrld"=
))))
+
+       ;;; coreboot cross; FIXME: Extract.
+
+       ("gmp"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz")
+           (sha256
+            (base32 "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7"=
))))
+       ("mpfr"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz")
+           (sha256
+            (base32 "1g32l2fg8f62lcyzzh88y3fsh6rk539qc6ahhdgvx7wpnf1dwpq1"=
))))
+       ("mpc"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpc/mpc-1.0.3.tar.gz")
+           (sha256
+            (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"=
))))
+       ("binutils-2.30"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/binutils/binutils-2.30.tar.xz")
+           (sha256
+            (base32 "1rhshw4m5m2pjz8g15hpiwhp52kn0pj0b5dxy0v7lwigmspbhikf"=
))))
+       ("gcc-8"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz")
+           (sha256
+            (base32 "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x"=
))))
+       ;; Note: Non-coreboot heads really doesn't need that.
+       ("acpica-coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://acpica.org/sites/acpica/files/acpica-unix2-201805=
31.tar.gz")
+           (sha256
+            (base32 "0q7vg1nr51f3rg16vjh4glz361a64r6gpm46fqkl2jf4fq7g43g5"=
))))))
+    (arguments
+     `(#:tests? #f ; Toplevel makefile has no tests.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; For edk2.
+             (setenv "BUILD_CC" "gcc") ; FIXME: musl *musl-cross*/x86_64-l=
inux-musl/bin/x86_64-linux-musl-gcc || ./x86_64-linux-musl/x86_64-linux-mus=
l/bin/musl-gcc.
+             ;; busybox needs the original values (for VERY few tools, but=
 more than 0).
+             ;; Disable wget.
+             (setenv "WGET" "true")
+             ;; Work around mcheck.h problem (in glibc!?)
+             (substitute* "modules/popt"
+              (("[.]/configure") "CFLAGS=3D\"-D__END_DECLS -D__BEGIN_DECLS=
 -D__THROW\" ./configure"))
+             #t))
+         (add-after 'unpack 'unpack-heads-packages
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory desti=
nation-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))
+                 ;(invoke "tar" "-xf" source-file "-C" "build")
+))
+             (mkdir-p "packages")
+             (setenv "GUIX_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+             (setenv "GUIX_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH=
"))
+             (setenv "GUIX_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+             (setenv "GUIX_CPATH" (getenv "CPATH"))
+             (for-each (lambda (name)
+                         (install-file* name "packages" ".tmp"))
+                       '("linux" "coreboot-blobs" "coreboot" "busybox" "zl=
ib" "mbedtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "=
popt" "lvm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" =
"npth" "libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt=
" "musl"))
+             (mkdir-p "build")
+             (mkdir-p "build/musl-cross-git/tarballs")
+             (mkdir-p "build/coreboot-4.8.1/util/crossgcc/tarballs")
+             (for-each (lambda (name)
+                         (install-file* name "build/coreboot-4.8.1/util/cr=
ossgcc/tarballs" ""))
+                       '("gmp" "mpfr" "mpc" "binutils-2.30" "gcc-8" "acpic=
a-coreboot"))
+             (copy-recursively (assoc-ref inputs "musl-cross") "build/musl=
-cross-git")
+             (copy-recursively (assoc-ref inputs "tpmtotp") "build/tpmtotp=
-git")
+             (copy-recursively (assoc-ref inputs "flashtools") "build/flas=
htools-0.0.1")
+             (copy-recursively (assoc-ref inputs "msrtools") "build/msrtoo=
ls-git")
+
+             (setenv "MUSL_DIR" (assoc-ref inputs "musl-cross"))
+             (setenv "CROSS" (string-append (getenv "MUSL_DIR") "/crossgcc=
/x86_64-linux-musl/bin/x86_64-musl-linux-")) ; Note: Useless
+             (substitute* "Makefile"
+              ;; Disable our non-cross toolchain environment.
+              (("CROSS_TOOLS_NOCC :=3D ")
+               ; CPP=3D" (getenv "CROSS") "cpp CXXCPP=3D" (getenv "CROSS")=
 "cpp "
+               (string-append "CROSS_TOOLS_NOCC :=3D C_INCLUDE_PATH=3D CPL=
US_INCLUDE_PATH=3D LIBRARY_PATH=3D CPATH=3D "))
+              ;; Disable git.
+              (("git submodule update --init")
+               "true submodule update --init")
+              ;; Re-enable our non-cross toolchain environment selectively.
+              (("^WGET.*")
+               (string-append "HOSTCC =3D" ; for busybox
+                              " C_INCLUDE_PATH=3D" (or (getenv "GUIX_C_INC=
LUDE_PATH") "")
+                              " CPLUS_INCLUDE_PATH=3D" (or (getenv "GUIX_C=
PLUS_INCLUDE_PATH") "")
+                              " CPATH=3D" (or (getenv "GUIX_CPATH") "")
+                              " LIBRARY_PATH=3D" (or (getenv "GUIX_LIBRARY=
_PATH") "")
+                              " gcc\n"
+                              "CC_FOR_BUILD =3D $(HOSTCC)\n" ; for libgpg-=
error
+                              "BUILD_CC =3D $(HOSTCC)\n")) ; for kexec-too=
ls
+              ;; Disable git, patch shebangs, and selectively re-enable ho=
st compiler.
+              (("(git clone.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed po/Makefile.in.in po/Makefi=
le.in po/Makefile make.tmpl.in *-config.in src/*-config.in src/Makefile.in =
applets/install.sh applets/busybox.mkll tests/pkits/* tests/openpgp/* tests=
/fake-pinentries/fake-pinentry.sh tests/*/Makefile tests/inittests tests/ru=
ntests tests/Makefile.in tests/runtest modules/test/runtests.sh src/test/ru=
ntests.sh mkfiles/build.sh autoconf/* demo/Makefile.in slsh/Makefile.in uti=
l/xcompile/xcompile util/genbuild_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] =
; then sed -i -e 's;/bin/sh\\>;~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/b=
in/ln\\>;ln;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;false;' -e =
's;/bin/bash\\>;~a/bin/bash;' -e 's;/usr/bin/env bash;~a/bin/bash;' -e 's;g=
it clone;true clone;' -e 's;^TERMCAP=3D-ltermcap;TERMCAP=3D;' -e 's;^HOSTCC=
.*$$$$;HOSTCC=3DC_INCLUDE_PATH=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_P=
ATH=3D\"$(GUIX_CPLUS_INCLUDE_PATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=
=3D\"$(GUIX_LIBRARY_PATH)\" gcc;' \"$$$$s\" ; fi ; done)
+" "true" (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref in=
puts "bash")))
+              (("(tar -xf.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in=
 Makefile Makefile.in configure lib/configure config.sub config.guess tools=
/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Ma=
kefile.rules scripts/* applets/usage_compressed po/Makefile.in.in po/Makefi=
le.in po/Makefile make.tmpl.in *-config.in src/*-config.in src/Makefile.in =
applets/install.sh applets/busybox.mkll tests/pkits/* tests/openpgp/* tests=
/fake-pinentries/fake-pinentry.sh tests/*/Makefile tests/inittests tests/ru=
ntests tests/Makefile.in tests/runtest modules/test/runtests.sh src/test/ru=
ntests.sh mkfiles/build.sh autoconf/* demo/Makefile.in slsh/Makefile.in uti=
l/xcompile/xcompile util/genbuild_h/genbuild_h.sh ; do if [ -f \"$$$$s\" ] =
; then sed -i -e 's;/bin/sh\\>;~a/bin/sh;' -e 's;^TERMCAP=3D-ltermcap;TERMC=
AP=3D;' -e 's;/bin/pwd\\>;pwd;' -e 's;/bin/ln\\>;ln;' -e 's;/usr/bin/file\\=
>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's=
;/usr/bin/env bash;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^HOSTCC=
.*$$$$;HOSTCC=3DC_INCLUDE_PATH=3D\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_P=
ATH=3D\"$(GUIX_CPLUS_INCLUDE_PATH)\" CPATH=3D\"$(GUIX_CPATH)\" LIBRARY_PATH=
=3D\"$(GUIX_LIBRARY_PATH)\" gcc;' \"$$$$s\" ; fi ; done)
+" tar (assoc-ref inputs "bash") (assoc-ref inputs "bash") (assoc-ref input=
s "bash"))))
+             ;(substitute* "modules/musl-cross"
+             ; (("/bin/echo") "echo"))
+             (call-with-output-file "patches/coreboot-4.8.1/9999-shell.pat=
ch"
+               (lambda (port)
+                 (format port "--- coreboot-4.8.1/util/crossgcc/buildgcc.o=
rig 2019-09-13 14:45:12.463998974 +0200
++++ coreboot-4.8.1/util/crossgcc/buildgcc 2019-09-13 14:46:49.808268216 +0=
200
+@@ -462,6 +462,13 @@
+ 			}
+ 		done
+ 		touch \"${dir}/.unpack_success\"
++  for s in \"${dir}/Makefile\" \"${dir}/configure\" \"${dir}/config.sub\"=
 \"${dir}/config.guess\" \"${dir}/mpn/cpp-ccas\" \"${dir}/mpn/m4-ccas\" \"$=
{dir}/missing\" \"${dir}/\"*\"/configure\" \"${dir}/move-if-change\" \"${di=
r}/libgcc/mkheader.sh\" \"${dir}/gcc/genmultilib\"
++  do
++   if [ -f \"${s}\" ]
++   then
++    sed -i -e 's;/bin/sh\\>;~a/bin/sh;' \"${s}\"
++   fi
++  done
+ 	)
+ }
+=20
+" (assoc-ref inputs "bash"))))
+             #t))
+         (add-after 'install 'install-images
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (make-flags-assoc (map (lambda (x)
+                                             (string-split x #\=3D))
+                                           make-flags))
+                    (BOARD (car (assoc-ref make-flags-assoc "BOARD")))
+                    (out-images (string-append out "/libexec/heads/" BOARD=
 "/images")))
+               (mkdir-p out-images)
+               (copy-recursively (string-append "build/" BOARD) out-images)
+               ;; Contains timestamp.
+               (delete-file (string-append out-images "/hashes.txt"))
+               #t))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Heads: coreboot/LinuxBoot payload")
+    (description "A minimal Linux that runs as a coreboot or LinuxBoot ROM
+payload to provide a secure, flexible boot environment for laptops and
+servers.")
+    (license license:gpl2+))))
diff --git a/gnu/packages/patches/heads-make-environment.patch b/gnu/packag=
es/patches/heads-make-environment.patch
new file mode 100644
index 0000000000..f38d08ee51
--- /dev/null
+++ b/gnu/packages/patches/heads-make-environment.patch
@@ -0,0 +1,446 @@
+diff --git a/Makefile b/Makefile
+index cc5cac6..ae8d7e7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -124,10 +124,14 @@ CROSS_TOOLS_NOCC :=3D \
+=20
+ CROSS_TOOLS :=3D \
+ 	CC=3D"$(heads_cc)" \
++	CPP=3D"$(CROSS)cpp" \
++	CXXCPP=3D"$(CROSS)cpp" \
++	CC_FOR_BUILD=3D"$(CC_FOR_BUILD)" \
++	BUILD_CC=3D"$(BUILD_CC)" \
++	HOSTCC=3D"$(HOSTCC)" \
+ 	$(CROSS_TOOLS_NOCC) \
+=20
+=20
+-
+ ifeq "$(CONFIG_COREBOOT)" "y"
+ all: $(build)/$(BOARD)/coreboot.rom
+ else ifeq "$(CONFIG_LINUXBOOT)" "y"
+@@ -348,7 +352,7 @@ define define_module =3D
+ 		echo "$(MAKE) \
+ 			-C \"$(build)/$($1_dir)\" \
+ 			$($1_target)" ;  \
+-		$(MAKE) \
++		$($1_make_environment) $(MAKE) \
+ 			-C "$(build)/$($1_dir)" \
+ 			$($1_target)  \
+ 	) \
+@@ -453,7 +457,7 @@ $(COREBOOT_UTIL_DIR)/inteltool/inteltool \
+ : $(build)/$(coreboot_base_dir)/.canary \
+ 	$(build)/$(musl_dir)/.build
+ 	+$(call do,MAKE,$(notdir $@),\
+-		$(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \
++		CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=3D LIBRARY_PATH=3D $(MAKE=
) -C "$(dir $@)" $(CROSS_TOOLS) \
+ 	)
+=20
+ # superio depends on zlib and pciutils
+diff --git a/modules/busybox b/modules/busybox
+index f8f8a83..4836780 100644
+--- a/modules/busybox
++++ b/modules/busybox
+@@ -11,6 +11,7 @@ busybox_hash :=3D 604553b7dbd59ded9e3ad7c6af49ed2cff599a=
df3e54d9463e5e0027b362019c
+ busybox_configure :=3D $(MAKE) CC=3D"$(heads_cc)" oldconfig
+ busybox_config :=3D config/busybox.config
+ busybox_output :=3D busybox
++busybox_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ busybox_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	$(MAKE_JOBS) \
+diff --git a/modules/cairo b/modules/cairo
+index 647ed2c..00f6cac 100644
+--- a/modules/cairo
++++ b/modules/cairo
+@@ -23,6 +23,7 @@ cairo_configure :=3D \
+ 	&& mv libtool-2 libtool \
+ 	&& chmod 755 libtool
+=20
++cairo_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ cairo_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/cryptsetup b/modules/cryptsetup
+index 4cea7f3..d68da0c 100644
+--- a/modules/cryptsetup
++++ b/modules/cryptsetup
+@@ -20,6 +20,7 @@ cryptsetup_configure :=3D ./configure \
+=20
+ # but after building, replace prefix so that they will be installed
+ # in the correct directory.
++cryptsetup_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ cryptsetup_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	&& $(MAKE) \
+diff --git a/modules/dropbear b/modules/dropbear
+index 998087c..834a3ef 100644
+--- a/modules/dropbear
++++ b/modules/dropbear
+@@ -19,6 +19,7 @@ dropbear_configure :=3D ./configure \
+ 	--disable-wtmpx \
+=20=09
+ dropbear_output :=3D ssh scp dropbear
++dropbear_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ dropbear_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/fbwhiptail b/modules/fbwhiptail
+index f54a62d..1359677 100644
+--- a/modules/fbwhiptail
++++ b/modules/fbwhiptail
+@@ -6,6 +6,7 @@ fbwhiptail_version :=3D git
+ fbwhiptail_dir :=3D fbwhiptail
+ fbwhiptail_repo :=3D https://source.puri.sm/coreboot/fbwhiptail.git
+=20
++fbwhiptail_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ fbwhiptail_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/flashrom b/modules/flashrom
+index 0a29b18..d695818 100644
+--- a/modules/flashrom
++++ b/modules/flashrom
+@@ -11,6 +11,7 @@ flashrom_tar :=3D flashrom-$(flashrom_version).tar.bz2
+ flashrom_url :=3D https://download.flashrom.org/releases/$(flashrom_tar)
+ flashrom_hash :=3D 3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170=
c4dc9dee64
+=20
++flashrom_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ flashrom_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/flashtools b/modules/flashtools
+index d95c215..090362c 100644
+--- a/modules/flashtools
++++ b/modules/flashtools
+@@ -11,6 +11,7 @@ flashtools_tar :=3D flashtools-$(flashtools_version).tar=
.gz
+ flashtools_url :=3D https://github.com/osresearch/flashtools/archive/v$(f=
lashtools_version).tar.gz
+ flashtools_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08=
a2f39302c22c
+=20
++flashtools_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ flashtools_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/frotz b/modules/frotz
+index 611e04a..e2c2e22 100644
+--- a/modules/frotz
++++ b/modules/frotz
+@@ -8,6 +8,7 @@ frotz_hash :=3D dbb5eb3bc95275dcb984c4bdbaea58bc1f1b085b20=
092ce6e86d9f0bf3ba858f
+=20
+ frotz_configure :=3D touch .config
+=20
++frotz_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ frotz_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/gpg b/modules/gpg
+index 4d4440a..6a48664 100644
+--- a/modules/gpg
++++ b/modules/gpg
+@@ -39,6 +39,7 @@ gpg_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++gpg_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ gpg_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(gpg_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/gpg2 b/modules/gpg2
+index 318a4cd..522e518 100644
+--- a/modules/gpg2
++++ b/modules/gpg2
+@@ -50,6 +50,7 @@ gpg2_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++gpg2_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ gpg2_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(gpg2_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/kexec b/modules/kexec
+index d2311c2..b507d81 100644
+--- a/modules/kexec
++++ b/modules/kexec
+@@ -14,6 +14,7 @@ kexec_configure :=3D ./configure \
+ 	--without-lzma \
+ 	&& $(MAKE) clean
+=20
++kexec_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ kexec_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libassuan b/modules/libassuan
+index 3c4e319..6138ec2 100644
+--- a/modules/libassuan
++++ b/modules/libassuan
+@@ -14,6 +14,7 @@ libassuan_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++libassuan_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_=
PATH=3D LIBRARY_PATH=3D
+ libassuan_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libgcrypt b/modules/libgcrypt
+index aa7e1ef..384f672 100644
+--- a/modules/libgcrypt
++++ b/modules/libgcrypt
+@@ -14,6 +14,7 @@ libgcrypt_configure :=3D ./configure \
+ 	--disable-asm \
+ 	--disable-nls \
+=20=09
++libgcrypt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_=
PATH=3D LIBRARY_PATH=3D
+ libgcrypt_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libgpg-error b/modules/libgpg-error
+index 752e11a..3d4d217 100644
+--- a/modules/libgpg-error
++++ b/modules/libgpg-error
+@@ -16,6 +16,7 @@ libgpg-error_configure :=3D ./configure \
+ 	--disable-tests \
+ 	--disable-asm \
+=20
++libgpg-error_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLU=
DE_PATH=3D LIBRARY_PATH=3D CC_FOR_BUILD=3D"$(CC_FOR_BUILD)"
+ libgpg-error_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libksba b/modules/libksba
+index d352913..bd1835b 100644
+--- a/modules/libksba
++++ b/modules/libksba
+@@ -14,6 +14,7 @@ libksba_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++libksba_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ libksba_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libpng b/modules/libpng
+index d6d9e65..33306e2 100644
+--- a/modules/libpng
++++ b/modules/libpng
+@@ -12,6 +12,7 @@ libpng_configure :=3D \
+         --host i386-elf-linux \
+ 	--prefix=3D"/" \
+=20
++libpng_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ libpng_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libremkey-hotp-verification b/modules/libremkey-hotp-=
verification
+index c9b9d45..e7fab7d 100644
+--- a/modules/libremkey-hotp-verification
++++ b/modules/libremkey-hotp-verification
+@@ -6,6 +6,7 @@ libremkey-hotp-verification_version :=3D git
+ libremkey-hotp-verification_dir :=3D libremkey-hotp-verification
+ libremkey-hotp-verification_repo :=3D --recursive https://github.com/Nitr=
okey/nitrokey-hotp-verification
+=20
++libremkey-hotp-verification_make_environment :=3D CPATH=3D C_INCLUDE_PATH=
=3D CPLUS_INCLUDE_PATH=3D LIBRARY_PATH=3D
+ libremkey-hotp-verification_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libusb b/modules/libusb
+index b7fe959..fe274e9 100644
+--- a/modules/libusb
++++ b/modules/libusb
+@@ -19,6 +19,7 @@ libusb_configure :=3D ./configure\
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
+=20
++libusb_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ libusb_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/libusb-compat b/modules/libusb-compat
+index f95854e..78033ef 100644
+--- a/modules/libusb-compat
++++ b/modules/libusb-compat
+@@ -22,6 +22,7 @@ libusb-compat_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++libusb-compat_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCL=
UDE_PATH=3D LIBRARY_PATH=3D
+ libusb-compat_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/lvm2 b/modules/lvm2
+index 91f0f53..def7544 100644
+--- a/modules/lvm2
++++ b/modules/lvm2
+@@ -34,6 +34,7 @@ lvm2_configure :=3D \
+ 	--with-cluster=3Dnone \
+=20
+ # not sure why LIB_SUFFIX is not defined in the cross build
++lvm2_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ lvm2_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/mbedtls b/modules/mbedtls
+index d844b16..2611866 100644
+--- a/modules/mbedtls
++++ b/modules/mbedtls
+@@ -10,6 +10,7 @@ mbedtls_libraries :=3D library/libmbedcrypto.so.0
+=20
+ mbedtls_configure :=3D
+=20
++mbedtls_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ mbedtls_target :=3D \
+ 	SHARED=3D1 \
+ 	DESTDIR=3D$(INSTALL) \
+diff --git a/modules/msrtools b/modules/msrtools
+index 9adfab0..85b5954 100644
+--- a/modules/msrtools
++++ b/modules/msrtools
+@@ -11,6 +11,7 @@ msrtools_tar :=3D msr-tools-$(msrtools_version).tar.gz
+ msrtools_url :=3D https://github.com/intel/msr-tools/archive/msr-tools-$(=
msrtools_version).tar.gz
+ msrtools_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2=
f39302c22c
+=20
++msrtools_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ msrtools_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/musl b/modules/musl
+index eec76de..89b9a0f 100644
+--- a/modules/musl
++++ b/modules/musl
+@@ -24,6 +24,7 @@ musl_configure :=3D ./configure \
+ 	--enable-gcc-wrapper \
+ 	--enable-shared \
+=20
++musl_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ musl_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS_NOCC) \
+diff --git a/modules/newt b/modules/newt
+index cc6341d..bad67c7 100644
+--- a/modules/newt
++++ b/modules/newt
+@@ -8,6 +8,7 @@ newt_tar :=3D newt-$(newt_version).tar.gz
+ newt_url :=3D https://releases.pagure.org/newt/$(newt_tar)
+ newt_hash :=3D 8d66ba6beffc3f786d4ccfee9d2b43d93484680ef8db9397a4fb70b5ad=
bb6dbc
+=20
++newt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ newt_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/npth b/modules/npth
+index e0f30c6..a43d626 100644
+--- a/modules/npth
++++ b/modules/npth
+@@ -14,6 +14,7 @@ npth_configure :=3D ./configure \
+ 	--with-libgpg-error-prefix=3D"$(INSTALL)" \
+ 	--disable-asm \
+=20
++npth_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ npth_target :=3D $(MAKE_JOBS) \
+ 	DESTDIR=3D"$(INSTALL)" \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/pciutils b/modules/pciutils
+index 2ea5b9b..dfee3a0 100644
+--- a/modules/pciutils
++++ b/modules/pciutils
+@@ -16,6 +16,7 @@ pciutils_hash :=3D 64293c6ab9318c40ef262b76d87bd90975317=
59752bac556e50979b1e63cfe6
+ # reproducible.  Otherwise the build path will be embedded
+ # in the library and executables.
+=20
++pciutils_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ pciutils_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/pinentry b/modules/pinentry
+index c0e93d7..a541ce0 100644
+--- a/modules/pinentry
++++ b/modules/pinentry
+@@ -33,6 +33,7 @@ pinentry_configure :=3D ./configure \
+ # Run one build to generate the executables with the pre-defined
+ # exec_prefix and datarootdir, then a second make to install the binaries
+ # into our actual target location
++pinentry_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ pinentry_target :=3D $(MAKE_JOBS) \
+ 	&& $(MAKE) -C $(build)/$(pinentry_dir) \
+ 		DESTDIR=3D"$(INSTALL)" \
+diff --git a/modules/pixman b/modules/pixman
+index 65a2e20..198f8ac 100644
+--- a/modules/pixman
++++ b/modules/pixman
+@@ -13,6 +13,7 @@ pixman_configure :=3D \
+ 	--prefix=3D"/" \
+ 	--disable-gtk
+=20
++pixman_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PAT=
H=3D LIBRARY_PATH=3D
+ pixman_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/popt b/modules/popt
+index b3b0b04..242ae03 100644
+--- a/modules/popt
++++ b/modules/popt
+@@ -11,6 +11,7 @@ popt_configure :=3D ./configure \
+ 	--prefix "/" \
+ 	--host i386-elf-linux \
+=20
++popt_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ popt_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/qrencode b/modules/qrencode
+index fb73c7b..afded70 100644
+--- a/modules/qrencode
++++ b/modules/qrencode
+@@ -14,6 +14,7 @@ qrencode_configure :=3D ./configure \
+ 	--without-tools \
+ 	--host i386-elf-linux \
+=20
++qrencode_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_P=
ATH=3D LIBRARY_PATH=3D
+ qrencode_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/slang b/modules/slang
+index a4ac84b..a338639 100644
+--- a/modules/slang
++++ b/modules/slang
+@@ -18,6 +18,7 @@ slang_configure :=3D ./configure \
+   && mkdir -p src/elfobjs
+=20
+ # Disable parallel make for the install target
++slang_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ slang_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/tpmtotp b/modules/tpmtotp
+index 792dd51..02c6c10 100644
+--- a/modules/tpmtotp
++++ b/modules/tpmtotp
+@@ -11,6 +11,7 @@ tpmtotp_tar :=3D tpmtotp-$(tpmtotp_version).tar.gz
+ tpmtotp_url :=3D https://github.com/osresearch/tpmtotp/archive/v$(tpmtotp=
_version).tar.gz
+ tpmtotp_hash :=3D e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2f=
39302c22c
+=20
++tpmtotp_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PA=
TH=3D LIBRARY_PATH=3D
+ tpmtotp_target :=3D \
+ 	$(CROSS_TOOLS) \
+ 	CFLAGS=3D"-I$(INSTALL)/include" \
+diff --git a/modules/util-linux b/modules/util-linux
+index e3377f6..a50bf40 100644
+--- a/modules/util-linux
++++ b/modules/util-linux
+@@ -22,6 +22,7 @@ util-linux_configure :=3D ./configure \
+ 	--enable-libblkid \
+=20
+=20
++util-linux_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE=
_PATH=3D LIBRARY_PATH=3D
+ util-linux_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \
+diff --git a/modules/zlib b/modules/zlib
+index dbdb44e..a6290b2 100644
+--- a/modules/zlib
++++ b/modules/zlib
+@@ -12,6 +12,7 @@ zlib_configure :=3D \
+ 	./configure \
+ 	--prefix=3D"/" \
+=20
++zlib_make_environment :=3D CPATH=3D C_INCLUDE_PATH=3D CPLUS_INCLUDE_PATH=
=3D LIBRARY_PATH=3D
+ zlib_target :=3D \
+ 	$(MAKE_JOBS) \
+ 	$(CROSS_TOOLS) \




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:40:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:40:47 2019
Received: from localhost ([127.0.0.1]:39833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzj-0005ys-LB
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:47 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzW-0005y0-Dl
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:34 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 940FB3362AB9;
 Tue, 24 Sep 2019 16:40:33 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 3/7] gnu: Add heads-linuxboot.
Date: Tue, 24 Sep 2019 16:01:53 +0200
Message-Id: <20190924140157.23564-4-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-linuxboot): New variable.
---
 gnu/packages/heads.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 94764e9a1f..72565531e3 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -507,3 +507,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)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:40:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:40:47 2019
Received: from localhost ([127.0.0.1]:39827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzX-0005y9-EN
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:47 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzT-0005xj-W6
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:32 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id CF2663362AB9;
 Tue, 24 Sep 2019 16:40:30 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 1/7] gnu: Add musl-cross.
Date: Tue, 24 Sep 2019 16:01:51 +0200
Message-Id: <20190924140157.23564-2-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190924140157.23564-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190924140157.23564-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk           |   1 +
 gnu/packages/heads.scm | 124 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/heads.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 8e535e208b..2ca70bdeaf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -245,6 +245,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/haskell-web.scm			\
   %D%/packages/haskell-xyz.scm			\
   %D%/packages/ham-radio.scm			\
+  %D%/packages/heads.scm			\
   %D%/packages/hexedit.scm			\
   %D%/packages/hugs.scm				\
   %D%/packages/hurd.scm				\
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
new file mode 100644
index 0000000000..b547a374e0
--- /dev/null
+++ b/gnu/packages/heads.scm
@@ -0,0 +1,124 @@
+(define-module (gnu packages heads)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages cpio)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages virtualization))
+
+(define-public musl-cross
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "musl-cross")
+    (version (git-version "0.1" revision commit))
+    (source
+          (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/GregorR/musl-cross")
+                   (commit "3b5b118f1cdddecda3f04b5005f69f962278fc1e")))
+             (file-name "musl-cross-checkout")
+             (sha256
+              (base32 "0pd1b7k4gwbvnyw0677p56d7j0xmv80k5iihkkjrd1mp9zdx90gj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests in main project.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (setenv "SHELL" "bash")
+             (setenv "CONFIG_SHELL" "bash")
+             #t))
+         (add-after 'unpack 'unpack-dependencies
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory
+                                    destination-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))))
+             (for-each (lambda (name)
+                         (install-file* name "tarballs" ""))
+                       '("binutils" "target-gcc-5" "kernel-headers" "musl"))
+             (substitute* "config.sh"
+              (("^CC_BASE_PREFIX=.*")
+               (string-append "CC_BASE_PREFIX=" (assoc-ref outputs "out")
+                              "/crossgcc\n")))
+             ;; Note: Important: source/gcc-5.3.0/gcc/exec-tool.in
+             ;; Note: Important: source/kernel-headers-3.12.6-5/tools/install.sh
+             ;; Note: Important: move-if-change (twice)
+             ;; Make sure that shebangs are patched after new extractions.
+             (substitute* "defs.sh"
+              (("touch \"[$]2/extracted\"")
+               (string-append "touch \"$2/extracted\"
+for s in mkinstalldirs move-if-change compile depcomp callprocs configure \\
+mkdep compile libtool-ldflags config.guess install-sh missing config.sub \\
+config.rpath progtest.m4 lib-ld.m4 acx.m4 gen-fixed.sh mkheader.sh ylwrap \\
+merge.sh godeps.sh lock-and-run.sh print-sysroot-suffix.sh mkconfig.sh \\
+genmultilib exec-tool.in install.sh
+do
+  find . -name $s -exec sed -i -e 's;!/bin/sh;!" (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+  find . -name $s -exec sed -i -e 's; /bin/sh; " (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+done
+" )))
+             #t))
+         (replace 'build
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "./build.sh")))
+         (delete 'install))))
+    (native-inputs
+     `(("bash" ,bash)
+       ("flex" ,flex)
+       ("gmp" ,gmp)
+       ("mpfr" ,mpfr)
+       ("mpc" ,mpc)
+       ("binutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2")
+           (sha256
+            (base32 "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm"))))
+       ("target-gcc-5"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2")
+           (sha256
+            (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq"))))
+       ("kernel-headers"
+        ,(origin
+           (method url-fetch)
+           (uri "http://ftp.barfooze.de/pub/sabotage/tarballs/kernel-headers-3.12.6-5.tar.xz")
+           (sha256
+            (base32 "0p43lvbpy69lbjmvq39g570imj0p8z791bhzrpdnp1nygwshj2wf"))))
+       ("musl"
+        ,(origin
+           (method url-fetch)
+           (uri "http://www.musl-libc.org/releases/musl-1.1.21.tar.gz")
+           (sha256
+            (base32 "0i2z52zgc86af1n1gjiz43hgd85mxjgvgn345zsybja9dxpvchn7"))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Musl-cross gcc 5 toolchain")
+    (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
+    (license license:isc))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:40:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:40:32 2019
Received: from localhost ([127.0.0.1]:39822 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzU-0005xl-4V
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:32 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45404)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzS-0005xc-Mt
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:31 -0400
Received: from localhost.localdomain (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id AF4D13360C4C;
 Tue, 24 Sep 2019 16:40:29 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [WIP v2 0/7] Add heads.
Date: Tue, 24 Sep 2019 16:01:50 +0200
Message-Id: <20190924140157.23564-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190920010248.28082-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This adds heads to Guix.  Heads is minimal Linux that runs as a coreboot or
LinuxBoot payload to provide a secure, flexible boot environment for laptops
and servers.

Heads uses checksums to make sure that all the components are what they are
supposed to be, at build time, at BOOT time and when resuming.

Therefore, it's difficult to replace stuff with our versions.
I'm not sure whether we should--since Heads is supposed to build the same
thing reproducibly everywhere.

A future version will be a variant which does replace Linux by Linux-libre,
but that also changes both the source hashes and the output (and thus the
output hashes).

Danny Milosavljevic (7):
  gnu: Add musl-cross.
  gnu: Add heads.
  gnu: Add heads-linuxboot.
  gnu: Add heads-qemu-linuxboot.
  gnu: Add heads-coreboot.
  gnu: Add heads-qemu-coreboot.
  gnu: Add heads-kgpe-d16.

 gnu/local.mk                                  |   2 +
 gnu/packages/heads.scm                        | 607 ++++++++++++++++++
 .../patches/heads-make-environment.patch      | 446 +++++++++++++
 3 files changed, 1055 insertions(+)
 create mode 100644 gnu/packages/heads.scm
 create mode 100644 gnu/packages/patches/heads-make-environment.patch





Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 24 Sep 2019 14:40:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 10:40:28 2019
Received: from localhost ([127.0.0.1]:39819 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iClzP-0005xT-Sv
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:28 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iClzN-0005xK-VY
 for 37466 <at> debbugs.gnu.org; Tue, 24 Sep 2019 10:40:26 -0400
Received: from localhost (178.112.183.13.wireless.dyn.drei.com
 [178.112.183.13])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id EA3CD3360C46;
 Tue, 24 Sep 2019 16:40:23 +0200 (CEST)
Date: Tue, 24 Sep 2019 16:40:18 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
Message-ID: <20190924164018.082a3733@HIDDEN>
In-Reply-To: <20190920154954.35713605@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
 <20190920140529.234c55ad@alma-ubu>
 <20190920154954.35713605@HIDDEN>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/fOQ0insXI+NT5iTQ5IXJmg5"; protocol="application/pgp-signature"
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 37466
Cc: =?ISO-8859-1?Q?Bj=F6rn_H=F6fling?= <bjoern.hoefling@HIDDEN>,
 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

--Sig_/fOQ0insXI+NT5iTQ5IXJmg5
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

> Maybe at least linux-libre produces bitwise identical outputs to Linux
> for what they care about.  I'll try it.

Status (*mumbles*):

I tried substituting linux-4.14.62 with our linux-libre-4.14.62-source.
It doesn't provide identical output--the bzImage is different, the modules =
are
different and the initrd is different (why the latter? weird...).

--Sig_/fOQ0insXI+NT5iTQ5IXJmg5
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2KKtIACgkQ5xo1VCww
uqVgeQf7BJ3k27yENkpApuhPJXw6EM1fx+PZHwkmz6FW5EawyrChsbnnCJ+uZfVg
RuBWIImNNVdS1y0d8Sq9Bv/QiaJjJQZySl8fXIoQqFl0XhmZ6fK3G94qaDIEG4/9
AzhnQrOxEzPifOToS8JrB8qQfHcqrjUuSwizWbRHmdB0A4YAn/rktnsAtbFZVKpe
cMh5/RdkXfJuQ/IO5FvpAy5nuRi/uRnfMzA/j0VSvUgHgDsc6k6Ll+WgaTTdZJ6m
LKEvlVrWYPMDo/RX1eA3qGboqFEqQirYv1CN0CEvIOUEaaFtISrz8aXNVu6Yn4IN
LkITGls72ZNDcbyxhTji+6h6FRhyyA==
=hw/n
-----END PGP SIGNATURE-----

--Sig_/fOQ0insXI+NT5iTQ5IXJmg5--




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 14:46:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 10:46:02 2019
Received: from localhost ([127.0.0.1]:58282 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBKAb-0000jT-Vt
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 10:46:02 -0400
Received: from lepiller.eu ([89.234.186.109]:37498)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1iBKAZ-0000j3-JW
 for 37466 <at> debbugs.gnu.org; Fri, 20 Sep 2019 10:46:00 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 06ef8145;
 Fri, 20 Sep 2019 14:45:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lepiller.eu; h=date
 :in-reply-to:references:mime-version:content-type
 :content-transfer-encoding:subject:to:cc:from:message-id; s=
 dkim; bh=urCvbEQv379hKPwwmWEeuVnRe9o=; b=OytGVueaMl5KxtYf+bLUQCi
 X2nQGPZh3OIRfhlz+r3//BlSL4LXnCxBsduOBW2hAbepWENT1+RfDKmSyC2xT3n3
 8oAO5jW0Fl3X3EqnEb0BAOkqC8ySGy6bX3yj6T/Esmq5/DoWPI+xZGepfQVzjPd/
 HOydwignFxNoblQS6//A3eOyrJGYdlvo7KoeosdYjf4M/83c9KBfCC5+F3LcEj3C
 8X9q74R+dY7uITKGQ611P0ALa4OghAYn16WlhS7na52n8ICSAL1AGHpAkd1VE0QJ
 FBCFvvc8xsZCIEenmX89v9+u0DZlA+JiiU4w/RgluYoA5uHqXJy4bnUsRGcRsNA=
 =
DomainKey-Signature: a=rsa-sha1; c=nofws; d=lepiller.eu; h=date
 :in-reply-to:references:mime-version:content-type
 :content-transfer-encoding:subject:to:cc:from:message-id; q=dns;
 s=dkim; b=GAh5TLeRlWWEmHTSoWcr+2PlEDOK10qQDg6hcfx5rIORyWdup1YQb
 CnPej7V1i+Ia8JIB1e80oiJ9SeogYRVY3bBthuJ95jXcKbO1K+tXaemf66Y+mIyB
 GhSIuinl530EeslEyhRep7a212NRh/q11+N6WvaSaRsdCCmzVtyMgNqIAate7uIu
 lgKVYB2Rbjfq3hNC29frceyHOnnvU3zxOlIAQmxwX16K6nEljVD9lKjgrGC56zYr
 iGcstm7wcggKkDcUFcNt1JI668RsMoVqAJAVERuTO37GA6n77UURQ3vP+3ndGFx3
 ZIhpTeXeA6tNwAipDIegGJk9wIGYXF8zQ==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 73f594d7
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Fri, 20 Sep 2019 14:45:56 +0000 (UTC)
Date: Fri, 20 Sep 2019 16:45:42 +0200
User-Agent: K-9 Mail for Android
In-Reply-To: <20190920154954.35713605@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
 <20190920140529.234c55ad@alma-ubu> <20190920154954.35713605@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
To: guix-patches@HIDDEN, Danny Milosavljevic <dannym@HIDDEN>,
 =?ISO-8859-1?Q?Bj=F6rn_H=F6fling?= <bjoern.hoefling@HIDDEN>
From: Julien Lepiller <julien@HIDDEN>
Message-ID: <A5384874-68C4-4127-9EB1-BA83BED549A7@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37466
Cc: 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Le 20 septembre 2019 15:49:54 GMT+02:00, Danny Milosavljevic <dannym@scratc=
hpost=2Eorg> a =C3=A9crit :
>Hi Bj=C3=B6rn,
>
>On Fri, 20 Sep 2019 14:05:29 +0200
>Bj=C3=B6rn H=C3=B6fling <bjoern=2Ehoefling@bjoernhoefling=2Ede> wrote:
>
>> That's the non-free kernel, right?
>
>Right=2E
>
>> Besides that neither DNS nor Google knows that host=2E
>
>Hmm, you're right, but it worked for me=2E  Doesn't work now=2E
>Using "www" is probably better anyhow (and works)=2E
>
>> In general, this long list of source-files looks a bit strange: I
>think
>> all/most of these packages are already a Guix package, where
>> the source code is (more or less) verified to be FSDG-compatible,
>> possibly with a snipped=2E Now this package is just getting a huge list
>of
>> unreviewed source tarballs in=2E Hm=2E
>>=20
>> Could we at least somehow reference the source package from Guix?
>
>Well, heads provides an initrd and they want reproducible builds for it
>for
>security purposes--that's the main reason they build a "cross" compiler
>too:
>To have the compiler produce verifiable executables=2E
>
>So basically if we change the version or anything, the hashes won't
>match
>any more and any person going along their installation guide should
>abort the installation--because heads has presumably been tampered
>with=2E
>
>Not sure what to do about it=2E
>
>Maybe at least linux-libre produces bitwise identical outputs to Linux
>for what they care about=2E  I'll try it=2E

Not sure about heads, but some build systems specify the exact version of =
their dependencies, but we don't package all of them in guix=2E In that cas=
e, the guix build-system overwrites the declared hash with the actual hash =
of the package that is used instead=2E Can't you do something similar?




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Sep 2019 14:46:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 10:46:13 2019
Received: from localhost ([127.0.0.1]:58285 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBKAn-0000k8-AG
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 10:46:13 -0400
Received: from lists.gnu.org ([209.51.188.17]:58231)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1iBKAl-0000k0-EH
 for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 10:46:11 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37476)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <julien@HIDDEN>) id 1iBKAh-0002TC-El
 for guix-patches@HIDDEN; Fri, 20 Sep 2019 10:46:09 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <julien@HIDDEN>) id 1iBKAf-0002at-8K
 for guix-patches@HIDDEN; Fri, 20 Sep 2019 10:46:07 -0400
Received: from lepiller.eu ([2a00:5884:8208::1]:56154)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <julien@HIDDEN>) id 1iBKAb-0002ZB-J8
 for guix-patches@HIDDEN; Fri, 20 Sep 2019 10:46:04 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 06ef8145;
 Fri, 20 Sep 2019 14:45:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lepiller.eu; h=date
 :in-reply-to:references:mime-version:content-type
 :content-transfer-encoding:subject:to:cc:from:message-id; s=
 dkim; bh=urCvbEQv379hKPwwmWEeuVnRe9o=; b=OytGVueaMl5KxtYf+bLUQCi
 X2nQGPZh3OIRfhlz+r3//BlSL4LXnCxBsduOBW2hAbepWENT1+RfDKmSyC2xT3n3
 8oAO5jW0Fl3X3EqnEb0BAOkqC8ySGy6bX3yj6T/Esmq5/DoWPI+xZGepfQVzjPd/
 HOydwignFxNoblQS6//A3eOyrJGYdlvo7KoeosdYjf4M/83c9KBfCC5+F3LcEj3C
 8X9q74R+dY7uITKGQ611P0ALa4OghAYn16WlhS7na52n8ICSAL1AGHpAkd1VE0QJ
 FBCFvvc8xsZCIEenmX89v9+u0DZlA+JiiU4w/RgluYoA5uHqXJy4bnUsRGcRsNA=
 =
DomainKey-Signature: a=rsa-sha1; c=nofws; d=lepiller.eu; h=date
 :in-reply-to:references:mime-version:content-type
 :content-transfer-encoding:subject:to:cc:from:message-id; q=dns;
 s=dkim; b=GAh5TLeRlWWEmHTSoWcr+2PlEDOK10qQDg6hcfx5rIORyWdup1YQb
 CnPej7V1i+Ia8JIB1e80oiJ9SeogYRVY3bBthuJ95jXcKbO1K+tXaemf66Y+mIyB
 GhSIuinl530EeslEyhRep7a212NRh/q11+N6WvaSaRsdCCmzVtyMgNqIAate7uIu
 lgKVYB2Rbjfq3hNC29frceyHOnnvU3zxOlIAQmxwX16K6nEljVD9lKjgrGC56zYr
 iGcstm7wcggKkDcUFcNt1JI668RsMoVqAJAVERuTO37GA6n77UURQ3vP+3ndGFx3
 ZIhpTeXeA6tNwAipDIegGJk9wIGYXF8zQ==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 73f594d7
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Fri, 20 Sep 2019 14:45:56 +0000 (UTC)
Date: Fri, 20 Sep 2019 16:45:42 +0200
User-Agent: K-9 Mail for Android
In-Reply-To: <20190920154954.35713605@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
 <20190920140529.234c55ad@alma-ubu> <20190920154954.35713605@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
To: guix-patches@HIDDEN, Danny Milosavljevic <dannym@HIDDEN>,
 =?ISO-8859-1?Q?Bj=F6rn_H=F6fling?= <bjoern.hoefling@HIDDEN>
From: Julien Lepiller <julien@HIDDEN>
Message-ID: <A5384874-68C4-4127-9EB1-BA83BED549A7@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:5884:8208::1
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Le 20 septembre 2019 15:49:54 GMT+02:00, Danny Milosavljevic <dannym@scratc=
hpost=2Eorg> a =C3=A9crit :
>Hi Bj=C3=B6rn,
>
>On Fri, 20 Sep 2019 14:05:29 +0200
>Bj=C3=B6rn H=C3=B6fling <bjoern=2Ehoefling@bjoernhoefling=2Ede> wrote:
>
>> That's the non-free kernel, right?
>
>Right=2E
>
>> Besides that neither DNS nor Google knows that host=2E
>
>Hmm, you're right, but it worked for me=2E  Doesn't work now=2E
>Using "www" is probably better anyhow (and works)=2E
>
>> In general, this long list of source-files looks a bit strange: I
>think
>> all/most of these packages are already a Guix package, where
>> the source code is (more or less) verified to be FSDG-compatible,
>> possibly with a snipped=2E Now this package is just getting a huge list
>of
>> unreviewed source tarballs in=2E Hm=2E
>>=20
>> Could we at least somehow reference the source package from Guix?
>
>Well, heads provides an initrd and they want reproducible builds for it
>for
>security purposes--that's the main reason they build a "cross" compiler
>too:
>To have the compiler produce verifiable executables=2E
>
>So basically if we change the version or anything, the hashes won't
>match
>any more and any person going along their installation guide should
>abort the installation--because heads has presumably been tampered
>with=2E
>
>Not sure what to do about it=2E
>
>Maybe at least linux-libre produces bitwise identical outputs to Linux
>for what they care about=2E  I'll try it=2E

Not sure about heads, but some build systems specify the exact version of =
their dependencies, but we don't package all of them in guix=2E In that cas=
e, the guix build-system overwrites the declared hash with the actual hash =
of the package that is used instead=2E Can't you do something similar?




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 13:50:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 09:50:05 2019
Received: from localhost ([127.0.0.1]:56988 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBJIT-0007Vr-9q
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 09:50:05 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45752)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iBJIR-0007VZ-7f
 for 37466 <at> debbugs.gnu.org; Fri, 20 Sep 2019 09:50:04 -0400
Received: from localhost (77.116.217.78.wireless.dyn.drei.com [77.116.217.78])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 316D53364BD8;
 Fri, 20 Sep 2019 15:50:01 +0200 (CEST)
Date: Fri, 20 Sep 2019 15:49:54 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: =?ISO-8859-1?Q?Bj=F6rn_H=F6fling?= <bjoern.hoefling@HIDDEN>
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
Message-ID: <20190920154954.35713605@HIDDEN>
In-Reply-To: <20190920140529.234c55ad@alma-ubu>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
 <20190920140529.234c55ad@alma-ubu>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/8tCO2BHUY_NKWCIgzpFV7HU"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/8tCO2BHUY_NKWCIgzpFV7HU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Bj=C3=B6rn,

On Fri, 20 Sep 2019 14:05:29 +0200
Bj=C3=B6rn H=C3=B6fling <bjoern.hoefling@HIDDEN> wrote:

> That's the non-free kernel, right?

Right.

> Besides that neither DNS nor Google knows that host.

Hmm, you're right, but it worked for me.  Doesn't work now.
Using "www" is probably better anyhow (and works).

> In general, this long list of source-files looks a bit strange: I think
> all/most of these packages are already a Guix package, where
> the source code is (more or less) verified to be FSDG-compatible,
> possibly with a snipped. Now this package is just getting a huge list of
> unreviewed source tarballs in. Hm.
>=20
> Could we at least somehow reference the source package from Guix?

Well, heads provides an initrd and they want reproducible builds for it for
security purposes--that's the main reason they build a "cross" compiler too:
To have the compiler produce verifiable executables.

So basically if we change the version or anything, the hashes won't match
any more and any person going along their installation guide should
abort the installation--because heads has presumably been tampered with.

Not sure what to do about it.

Maybe at least linux-libre produces bitwise identical outputs to Linux
for what they care about.  I'll try it.

--Sig_/8tCO2BHUY_NKWCIgzpFV7HU
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2E2QIACgkQ5xo1VCww
uqVHzAf/RqxETW1BnnaY0oqKiqDlOsU8lMhebn4DblVj0wWQc/Frk8V4X8ysD5g9
BPN7SORWfm5DSY9Bp0lEuj5pY93yCHNaIWSduGLLZ7ypQYz/9jAgM4agDY5B2AW+
V00Byfas5tRpvosxEMjOTDaM4hh0Lr8+llKnJCI6vJjdI3DXClpwfRQ7xmNzAadU
w8QEBj2iZC2NWkf56dv4sm23M8weHZMjhXOBIKfmG/P72Tr4libp8nhCe62En6if
02h9jEkdMlVcTQziQ6oxhEqoRDLQLxDGkUh+zdd+KcLPhHULrE230hRE1DZhpAqh
75lahkQNWeiEHz8upkVXgQvQcBnN0Q==
=VP1E
-----END PGP SIGNATURE-----

--Sig_/8tCO2BHUY_NKWCIgzpFV7HU--




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 12:05:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 08:05:36 2019
Received: from localhost ([127.0.0.1]:56905 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBHfL-0002lU-T8
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 08:05:36 -0400
Received: from m4s11.vlinux.de ([83.151.27.109]:59976 helo=bjoernhoefling.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bjoern.hoefling@HIDDEN>)
 id 1iBHfH-0002lI-Dx
 for 37466 <at> debbugs.gnu.org; Fri, 20 Sep 2019 08:05:31 -0400
Received: from alma-ubu (pD951F9D0.dip0.t-ipconnect.de [217.81.249.208])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by bjoernhoefling.de (Postfix) with ESMTPSA id D60F13F970;
 Fri, 20 Sep 2019 14:05:29 +0200 (CEST)
Date: Fri, 20 Sep 2019 14:05:29 +0200
From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= <bjoern.hoefling@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#37466] [PATCH 2/4] gnu: Add heads.
Message-ID: <20190920140529.234c55ad@alma-ubu>
In-Reply-To: <20190920073149.2933-2-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
 <20190920073149.2933-2-dannym@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 boundary="Sig_/Oz5SgZIC/RBXtr3hlZWMlL+"; protocol="application/pgp-signature"
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 37466
Cc: 37466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--Sig_/Oz5SgZIC/RBXtr3hlZWMlL+
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Danny,

no full review, just one remark:

On Fri, 20 Sep 2019 09:31:47 +0200
Danny Milosavljevic <dannym@HIDDEN> wrote:

> * gnu/packages/heads.scm (heads): New variable.

[..]

> +    (native-inputs
> +     `(("bash" ,bash)

[..]
> +       ("linux"
> +        ,(origin
> +           (method url-fetch)
> +           (uri
> "https://cdntt.kernel.org/pub/linux/kernel/v4.x/linux-4.14.62.tar.xz")
> +           (sha256
> +            (base32
> "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"))))

That's the non-free kernel, right?
Besides that neither DNS nor Google knows that host.

In general, this long list of source-files looks a bit strange: I think
all/most of these packages are already a Guix package, where
the source code is (more or less) verified to be FSDG-compatible,
possibly with a snipped. Now this package is just getting a huge list of
unreviewed source tarballs in. Hm.

Could we at least somehow reference the source package from Guix?

Bj=C3=B6rn

--Sig_/Oz5SgZIC/RBXtr3hlZWMlL+
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXYTAiQAKCRC/KGy2WT5f
/Q9zAJ9yohTt3/KBrnSmw3y7mB9kSlZqIgCgs0HqbtaWyb1axffFifsqbcbtq5U=
=t6F7
-----END PGP SIGNATURE-----

--Sig_/Oz5SgZIC/RBXtr3hlZWMlL+--




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 07:32:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 03:32:23 2019
Received: from localhost ([127.0.0.1]:56709 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBDOw-0008J0-OO
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 03:32:22 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38098)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iBDOc-0008Hr-W5
 for 37466 <at> 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 0FEAF3363906;
 Fri, 20 Sep 2019 09:32:02 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [PATCH 4/4] gnu: Add heads-qemu-linuxboot.
Date: Fri, 20 Sep 2019 09:31:49 +0200
Message-Id: <20190920073149.2933-4-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190920073149.2933-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/heads.scm (heads-qemu-linuxboot): New variable.
---
 gnu/packages/heads.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index 4412770ae3..815634116b 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -546,3 +546,12 @@ servers.")
              (sha256
               (base32 "1bdj4m9dvih9fhp5q5c6cp5sphzbpag5gp4bz1p8g9lqi49lb7av"))))
        ,@(package-native-inputs heads)))))
+
+(define-public heads-qemu-linuxboot
+  (package
+    (inherit heads-linuxboot)
+    (name "heads-qemu-linuxboot")
+    (arguments
+     `(#:make-flags
+       '("BOARD=qemu-linuxboot")
+       ,@(package-arguments heads-linuxboot)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 07:32:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 03:32:22 2019
Received: from localhost ([127.0.0.1]:56707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBDOw-0008It-F8
	for submit <at> 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 <dannym@HIDDEN>) id 1iBDOb-0008HY-Qr
 for 37466 <at> 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 <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [PATCH 3/4] gnu: Add heads-linuxboot.
Date: Fri, 20 Sep 2019 09:31:48 +0200
Message-Id: <20190920073149.2933-3-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190920073149.2933-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* 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)))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 07:32:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 03:32:22 2019
Received: from localhost ([127.0.0.1]:56705 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBDOl-0008IO-FO
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 03:32:22 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38076)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iBDOa-0008HV-FN
 for 37466 <at> 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 5128B3365515;
 Fri, 20 Sep 2019 09:31:59 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [PATCH 2/4] gnu: Add heads.
Date: Fri, 20 Sep 2019 09:31:47 +0200
Message-Id: <20190920073149.2933-2-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190920073149.2933-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
 <20190920073149.2933-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm (heads): New variable.
---
 gnu/packages/heads.scm | 378 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 378 insertions(+)

diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
index b547a374e0..de97c8de6c 100644
--- a/gnu/packages/heads.scm
+++ b/gnu/packages/heads.scm
@@ -4,8 +4,12 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
@@ -13,8 +17,11 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages cpio)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization))
@@ -122,3 +129,374 @@ done
     (synopsis "Musl-cross gcc 5 toolchain")
     (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
     (license license:isc))))
+
+(define-public heads
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "heads")
+    (version (git-version "0.1" revision commit))
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+             (url "https://github.com/osresearch/heads.git")
+             (commit commit)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "0sgyqm4ss88hfp8miz40mw40kj7qp2khr7jcvscwv87bd5g9nwnx"))
+      (patches (search-patches "heads-build-environment.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("bash" ,bash)
+       ("git" ,git)
+       ("perl" ,perl)
+       ("cpio" ,cpio)
+       ("m4" ,m4)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("curl" ,curl) ; FIXME: Remove.
+       ("zlibx" ,zlib)
+       ("musl-cross" ,musl-cross)
+       ("elfutils" ,elfutils)
+       ("bc" ,bc)
+       ("findutils" ,findutils)
+       ("flashtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/flashtools.git")
+                 (commit "9acce09aeb635c5bef01843e495b95e75e8da135")))
+           (file-name "flashtools-checkout")
+           (sha256
+            (base32 "0r4gj3nzr67ycd39k1vjzxfzkp90yacrdgxhc1z5jfvxfq4x91c1"))))
+       ("tpmtotp"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/tpmtotp.git")
+                 (commit "18b860fdcf5a55537c8395b891f2b2a5c24fc00a")))
+           (file-name "tpmtotp-checkout")
+           (sha256
+            (base32 "112p5afkrbipr0d8x9r9mrxrr3xyf97s2y3f32p41vs951sksqnv"))))
+       ("msrtools"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/osresearch/msr-tools.git")
+                 (commit "572ef8a2b873eda15a322daa48861140a078b92c")))
+           (file-name "msr-tools-checkout")
+           (sha256
+            (base32 "0an1ypj5pin9l413vn4gxzi3x6ir1rba9jv6n5gk6s9dq803lb6p"))))
+       ("coreboot-blobs"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-blobs-4.8.1.tar.xz")
+           (sha256
+            (base32 "15g222xj1zdn8i8qz0pw2jf28h66dljb1q5isw2ml05gwfd51ahq"))))
+       ("coreboot"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.coreboot.org/releases/coreboot-4.8.1.tar.xz")
+           (sha256
+            (base32 "08xdd5drk8yd37a3z5hc81qmgsybv6201i28hcggxh980vdz9pgh"))))
+       ("linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.62.tar.xz")
+           (sha256
+            (base32 "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji"))))
+       ("musl" ; useless
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.musl-libc.org/releases/musl-1.1.15.tar.gz")
+           (sha256
+            (base32 "1ymhxkskivzph0q34zadwfglc5gyahqajm7chqqn2zraxv3lgr4p"))))
+       ("busybox"
+        ,(origin
+           (method url-fetch)
+           (uri "https://busybox.net/downloads/busybox-1.28.0.tar.bz2")
+           (sha256
+            (base32 "1701carjf02y7r3djm1yvyd5kzrcxm4szinp7agfv7fmvfvm6ib0"))))
+       ("zlib"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.zlib.net/zlib-1.2.11.tar.gz")
+           (sha256
+            (base32 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
+       ("mbedtls"
+        ,(origin
+           (method url-fetch)
+           (uri "https://tls.mbed.org/download/mbedtls-2.4.2-gpl.tgz")
+           (sha256
+            (base32 "17r9qs585gqghcf5yavb1cnvsigl0f8r0k8rklr5a855hrajs7yh"))))
+       ("kexec-tools"
+        ,(origin
+           (method url-fetch)
+           (uri "https://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.16.tar.gz")
+           (sha256
+            (base32 "0fkg5y3wxvkqrjii90iz1i59qd6hhq7ar27f0sgv7jbppyczq5yg"))))
+       ("qrencode"
+        ,(origin
+           (method url-fetch)
+           (uri "https://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz")
+           (sha256
+            (base32 "0wiagx7i8p9zal53smf5abrnh9lr31mv0p36wg017401jrmf5577"))))
+       ("pciutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/software/utils/pciutils/pciutils-3.5.4.tar.xz")
+           (sha256
+            (base32 "0rpy7kkb2y89wmbcbfjjjxsk2x89v5xxhxib4vpl131ip5m3qab4"))))
+       ("util-linux"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-2.29.2.tar.xz")
+           (sha256
+            (base32 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"))))
+       ("flashrom"
+        ,(origin
+           (method url-fetch)
+           (uri "https://download.flashrom.org/releases/flashrom-1.0.tar.bz2")
+           (sha256
+            (base32 "0r7fkpfc8w51n8ffbhclj4wa3kwrk0ijv1acwpw5myx5bchzl0ip"))))
+       ("popt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://launchpad.net/popt/head/1.16/+download/popt-1.16.tar.gz")
+           (sha256
+            (base32 "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"))))
+       ("lvm2"
+        ,(origin
+           (method url-fetch)
+           (uri "https://mirrors.kernel.org/sourceware/lvm2/LVM2.2.02.168.tgz")
+           (sha256
+            (base32 "03b62hcsj9z37ckd8c21wwpm07s9zblq7grfh58yzcs1vp6x38r3"))))
+       ("cryptsetup"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cryptsetup-1.7.3.tar.xz")
+           (sha256
+            (base32 "00nwd96m9yq4k3cayc04i5y7iakkzana35zxky6hpx2w8zl08axg"))))
+       ("libgpg-error"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.32.tar.bz2")
+           (sha256
+            (base32 "1jj08ns4sh1hmafqp1giskvdicdz18la516va26jycy27kkwaif3"))))
+       ("libgcrypt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.3.tar.bz2")
+           (sha256
+            (base32 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"))))
+       ("libksba"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz2")
+           (sha256
+            (base32 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
+       ("libassuan"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.1.tar.bz2")
+           (sha256
+            (base32 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
+       ("npth"
+        ,(origin
+           (method url-fetch)
+           (uri "https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2")
+           (sha256
+            (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
+       ("libusb"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.21/libusb-1.0.21.tar.bz2")
+           (sha256
+            (base32 "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx"))))
+       ("libusb-compat"
+        ,(origin
+           (method url-fetch)
+           (uri "https://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2")
+           (sha256
+            (base32 "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"))))
+       ("dropbear"
+        ,(origin
+           (method url-fetch)
+           (uri "https://matt.ucc.asn.au/dropbear/releases/dropbear-2016.74.tar.bz2")
+           (sha256
+            (base32 "14c8f4gzixf0j9fkx68jgl85q7b05852kk0vf09gi6h0xmafl817"))))
+       ("pinentry"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.tar.bz2")
+           (sha256
+            (base32 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
+       ("gnupg"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.10.tar.bz2")
+           (sha256
+            (base32 "05f9804g72pffdxgvxjmjzkfcpjg1x221g9rwcr8fi51hrxd77br"))))
+       ("slang"
+        ,(origin
+           (method url-fetch)
+           (uri "https://www.jedsoft.org/releases/slang/slang-2.3.1a.tar.bz2")
+           (sha256
+            (base32 "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l"))))
+       ("newt"
+        ,(origin
+           (method url-fetch)
+           (uri "https://releases.pagure.org/newt/newt-0.52.20.tar.gz")
+           (sha256
+            (base32 "1g3dpfnvaw7vljbr7nzq1rl88d6r8cmrvvng9inphgzwxxmvlrld"))))
+
+       ;;; coreboot cross; FIXME: Extract.
+
+       ("gmp"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz")
+           (sha256
+            (base32 "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7"))))
+       ("mpfr"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpfr/mpfr-3.1.5.tar.xz")
+           (sha256
+            (base32 "1g32l2fg8f62lcyzzh88y3fsh6rk539qc6ahhdgvx7wpnf1dwpq1"))))
+       ("mpc"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/mpc/mpc-1.0.3.tar.gz")
+           (sha256
+            (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))
+       ("binutils-2.30"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/binutils/binutils-2.30.tar.xz")
+           (sha256
+            (base32 "1rhshw4m5m2pjz8g15hpiwhp52kn0pj0b5dxy0v7lwigmspbhikf"))))
+       ("gcc-8"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz")
+           (sha256
+            (base32 "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x"))))))
+    (arguments
+     `(#:tests? #f ; Toplevel makefile has no tests.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; For edk2.
+             (setenv "BUILD_CC" "gcc") ; FIXME: musl *musl-cross*/x86_64-linux-musl/bin/x86_64-linux-musl-gcc || ./x86_64-linux-musl/x86_64-linux-musl/bin/musl-gcc.
+             ;; busybox needs the original values (for VERY few tools, but more than 0).
+             ;; Disable wget.
+             (setenv "WGET" "true")
+             ;; Work around mcheck.h problem (in glibc!?)
+             (substitute* "modules/popt"
+              (("[.]/configure") "CFLAGS=\"-D__END_DECLS -D__BEGIN_DECLS -D__THROW\" ./configure"))
+             #t))
+         (add-after 'unpack 'unpack-heads-packages
+           (lambda* (#:key inputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory destination-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))
+                 ;(invoke "tar" "-xf" source-file "-C" "build")
+))
+             (mkdir-p "packages")
+             (setenv "GUIX_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+             (setenv "GUIX_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
+             (setenv "GUIX_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+             (setenv "GUIX_CPATH" (getenv "CPATH"))
+             (for-each (lambda (name)
+                         (install-file* name "packages" ".tmp"))
+                       '("linux" "coreboot-blobs" "coreboot" "busybox" "zlib" "mbedtls" "kexec-tools" "qrencode" "pciutils" "util-linux" "flashrom" "popt" "lvm2" "cryptsetup" "libgpg-error" "libgcrypt" "libksba" "libassuan" "npth" "libusb" "libusb-compat" "dropbear" "pinentry" "gnupg" "slang" "newt" "musl"))
+             (mkdir-p "build")
+             (mkdir-p "build/musl-cross-git/tarballs")
+             (mkdir-p "build/coreboot-4.8.1/util/crossgcc/tarballs")
+             (for-each (lambda (name)
+                         (install-file* name "build/coreboot-4.8.1/util/crossgcc/tarballs" ""))
+                       '("gmp" "mpfr" "mpc" "binutils-2.30" "gcc-8"))
+             (copy-recursively (assoc-ref inputs "musl-cross") "build/musl-cross-git")
+             (copy-recursively (assoc-ref inputs "tpmtotp") "build/tpmtotp-git")
+             (copy-recursively (assoc-ref inputs "flashtools") "build/flashtools-0.0.1")
+             (copy-recursively (assoc-ref inputs "msrtools") "build/msrtools-git")
+
+             (setenv "MUSL_DIR" (assoc-ref inputs "musl-cross"))
+             (setenv "CROSS" (string-append (getenv "MUSL_DIR") "/crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux-")) ; Note: Useless
+             (substitute* "Makefile"
+              ;; Disable our non-cross toolchain environment.
+              (("CROSS_TOOLS_NOCC := ")
+               ; CPP=" (getenv "CROSS") "cpp CXXCPP=" (getenv "CROSS") "cpp "
+               (string-append "CROSS_TOOLS_NOCC := C_INCLUDE_PATH= CPLUS_INCLUDE_PATH= LIBRARY_PATH= CPATH= "))
+              ;; Disable git.
+              (("git submodule update --init")
+               "true submodule update --init")
+              ;; Re-enable our non-cross toolchain environment selectively.
+              (("^WGET.*")
+               (string-append "HOSTCC =" ; for busybox
+                              " C_INCLUDE_PATH=" (or (getenv "GUIX_C_INCLUDE_PATH") "")
+                              " CPLUS_INCLUDE_PATH=" (or (getenv "GUIX_CPLUS_INCLUDE_PATH") "")
+                              " CPATH=" (or (getenv "GUIX_CPATH") "")
+                              " LIBRARY_PATH=" (or (getenv "GUIX_LIBRARY_PATH") "")
+                              " gcc\n"
+                              "CC_FOR_BUILD = $(HOSTCC)\n" ; for libgpg-error
+                              "BUILD_CC = $(HOSTCC)\n")) ; for kexec-tools
+              ;; Disable git, patch shebangs, and selectively re-enable host compiler.
+              (("(git clone.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in Makefile Makefile.in configure lib/configure config.sub config.guess tools/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Makefile.rules scripts/* applets/usage_compressed po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in *-config.in src/*-config.in applets/install.sh applets/busybox.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry.sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests/runtest ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>;~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^HOSTCC.*$$$$;HOSTCC=C_INCLUDE_PATH=\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=\"$(GUIX_CPLUS_INCLUDE_PATH)\" CPATH=\"$(GUIX_CPATH)\" LIBRARY_PATH=\"$(GUIX_LIBRARY_PATH)\" gcc;' \"$$$$s\" ; fi ; done)
+" "true" (assoc-ref inputs "bash") (assoc-ref inputs "bash")))
+              (("(tar -xf.*)." _ tar)
+               (format #f "(~a) && (cd $(build)/$($1_base_dir) && for s in Makefile Makefile.in configure lib/configure config.sub config.guess tools/install.sh tools/scripts/Makefile.include tools/power/cpupower/Makefile Makefile.rules scripts/* applets/usage_compressed po/Makefile.in.in po/Makefile.in po/Makefile make.tmpl.in *-config.in src/*-config.in applets/install.sh applets/busybox.mkll tests/pkits/* tests/openpgp/* tests/fake-pinentries/fake-pinentry.sh tests/*/Makefile tests/inittests tests/runtests tests/Makefile.in tests/runtest ; do if [ -f \"$$$$s\" ] ; then sed -i -e 's;/bin/sh\\>;~a/bin/sh;' -e 's;/bin/pwd\\>;pwd;' -e 's;/usr/bin/file\\>;file;' -e 's;/bin/false\\>;false;' -e 's;/bin/bash\\>;~a/bin/bash;' -e 's;git clone;true clone;' -e 's;^HOSTCC.*$$$$;HOSTCC=C_INCLUDE_PATH=\"$(GUIX_C_INCLUDE_PATH)\" CPLUS_INCLUDE_PATH=\"$(GUIX_CPLUS_INCLUDE_PATH)\" CPATH=\"$(GUIX_CPATH)\" LIBRARY_PATH=\"$(GUIX_LIBRARY_PATH)\" gcc;' \"$$$$s\" ; fi ; done)
+" tar (assoc-ref inputs "bash") (assoc-ref inputs "bash"))))
+             ;(substitute* "modules/musl-cross"
+             ; (("/bin/echo") "echo"))
+             (call-with-output-file "patches/coreboot-4.8.1/9999-shell.patch"
+               (lambda (port)
+                 (format port "--- coreboot-4.8.1/util/crossgcc/buildgcc.orig 2019-09-13 14:45:12.463998974 +0200
++++ coreboot-4.8.1/util/crossgcc/buildgcc 2019-09-13 14:46:49.808268216 +0200
+@@ -462,6 +462,13 @@
+ 			}
+ 		done
+ 		touch \"${dir}/.unpack_success\"
++  for s in \"${dir}/Makefile\" \"${dir}/configure\" \"${dir}/config.sub\" \"${dir}/config.guess\"
++  do
++   if [ -f \"${s}\" ]
++   then
++    sed -i -e 's;/bin/sh\\>;~a/bin/sh;' \"${s}\"
++   fi
++  done
+ 	)
+ }
+ 
+" (assoc-ref inputs "bash"))))
+             #t))
+         (add-after 'install 'install-images
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (make-flags-assoc (map (lambda (x)
+                                             (string-split x #\=))
+                                           make-flags))
+                    (BOARD (car (assoc-ref make-flags-assoc "BOARD")))
+                    (out-images (string-append out "/libexec/heads/" BOARD "/images")))
+               (mkdir -p out-images)
+               (copy-recursively (string-append "build/" BOARD) out-images)
+               ;; Contains timestamp.
+               (delete-file (string-append out-images "/hashes.txt"))
+               #t))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Heads: coreboot/LinuxBoot payload")
+    (description "A minimal Linux that runs as a coreboot or LinuxBoot ROM
+payload to provide a secure, flexible boot environment for laptops and
+servers.")
+    (license license:gpl2+))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at 37466 <at> debbugs.gnu.org:


Received: (at 37466) by debbugs.gnu.org; 20 Sep 2019 07:32:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 20 03:32:11 2019
Received: from localhost ([127.0.0.1]:56700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBDOa-0008HW-Cc
	for submit <at> debbugs.gnu.org; Fri, 20 Sep 2019 03:32:11 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:38072)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iBDOX-0008HG-Bs
 for 37466 <at> debbugs.gnu.org; Fri, 20 Sep 2019 03:31:58 -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 46F463365515;
 Fri, 20 Sep 2019 09:31:55 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 37466 <at> debbugs.gnu.org
Subject: [PATCH 1/4] gnu: Add musl-cross.
Date: Fri, 20 Sep 2019 09:31:46 +0200
Message-Id: <20190920073149.2933-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190920010248.28082-1-dannym@HIDDEN>
References: <20190920010248.28082-1-dannym@HIDDEN>
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 37466
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/heads.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk           |   1 +
 gnu/packages/heads.scm | 124 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/heads.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index ad85894ebe..4fc22d6fb4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -245,6 +245,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/haskell-web.scm			\
   %D%/packages/haskell-xyz.scm			\
   %D%/packages/ham-radio.scm			\
+  %D%/packages/heads.scm			\
   %D%/packages/hexedit.scm			\
   %D%/packages/hugs.scm				\
   %D%/packages/hurd.scm				\
diff --git a/gnu/packages/heads.scm b/gnu/packages/heads.scm
new file mode 100644
index 0000000000..b547a374e0
--- /dev/null
+++ b/gnu/packages/heads.scm
@@ -0,0 +1,124 @@
+(define-module (gnu packages heads)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages cpio)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages virtualization))
+
+(define-public musl-cross
+  (let ((revision "1")
+        (commit "b7f2249b665705939dc4eca67d11553c72164f4b"))
+  (package
+    (name "musl-cross")
+    (version (git-version "0.1" revision commit))
+    (source
+          (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/GregorR/musl-cross")
+                   (commit "3b5b118f1cdddecda3f04b5005f69f962278fc1e")))
+             (file-name "musl-cross-checkout")
+             (sha256
+              (base32 "0pd1b7k4gwbvnyw0677p56d7j0xmv80k5iihkkjrd1mp9zdx90gj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests in main project.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (setenv "SHELL" "bash")
+             (setenv "CONFIG_SHELL" "bash")
+             #t))
+         (add-after 'unpack 'unpack-dependencies
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (define (install-file* source-key destination-directory
+                                    destination-suffix)
+               (let* ((source-file (assoc-ref inputs source-key))
+                      (source-basename (basename source-file))
+                      (source-parts (string-split source-basename #\-))
+                      (drop (@ (srfi srfi-1) drop))
+                      (destination-file
+                       (string-join (drop source-parts 1) "-")))
+                 (copy-file source-file
+                  (string-append destination-directory "/"
+                                 destination-file destination-suffix))))
+             (for-each (lambda (name)
+                         (install-file* name "tarballs" ""))
+                       '("binutils" "target-gcc-5" "kernel-headers" "musl"))
+             (substitute* "config.sh"
+              (("^CC_BASE_PREFIX=.*")
+               (string-append "CC_BASE_PREFIX=" (assoc-ref outputs "out")
+                              "/crossgcc\n")))
+             ;; Note: Important: source/gcc-5.3.0/gcc/exec-tool.in
+             ;; Note: Important: source/kernel-headers-3.12.6-5/tools/install.sh
+             ;; Note: Important: move-if-change (twice)
+             ;; Make sure that shebangs are patched after new extractions.
+             (substitute* "defs.sh"
+              (("touch \"[$]2/extracted\"")
+               (string-append "touch \"$2/extracted\"
+for s in mkinstalldirs move-if-change compile depcomp callprocs configure \\
+mkdep compile libtool-ldflags config.guess install-sh missing config.sub \\
+config.rpath progtest.m4 lib-ld.m4 acx.m4 gen-fixed.sh mkheader.sh ylwrap \\
+merge.sh godeps.sh lock-and-run.sh print-sysroot-suffix.sh mkconfig.sh \\
+genmultilib exec-tool.in install.sh
+do
+  find . -name $s -exec sed -i -e 's;!/bin/sh;!" (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+  find . -name $s -exec sed -i -e 's; /bin/sh; " (assoc-ref inputs "bash")
+"/bin/sh;' '{}' ';'
+done
+" )))
+             #t))
+         (replace 'build
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "./build.sh")))
+         (delete 'install))))
+    (native-inputs
+     `(("bash" ,bash)
+       ("flex" ,flex)
+       ("gmp" ,gmp)
+       ("mpfr" ,mpfr)
+       ("mpc" ,mpc)
+       ("binutils"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2")
+           (sha256
+            (base32 "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm"))))
+       ("target-gcc-5"
+        ,(origin
+           (method url-fetch)
+           (uri "https://ftpmirror.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2")
+           (sha256
+            (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq"))))
+       ("kernel-headers"
+        ,(origin
+           (method url-fetch)
+           (uri "http://ftp.barfooze.de/pub/sabotage/tarballs/kernel-headers-3.12.6-5.tar.xz")
+           (sha256
+            (base32 "0p43lvbpy69lbjmvq39g570imj0p8z791bhzrpdnp1nygwshj2wf"))))
+       ("musl"
+        ,(origin
+           (method url-fetch)
+           (uri "http://www.musl-libc.org/releases/musl-1.1.21.tar.gz")
+           (sha256
+            (base32 "0i2z52zgc86af1n1gjiz43hgd85mxjgvgn345zsybja9dxpvchn7"))))))
+    (home-page "https://github.com/osresearch/heads")
+    (synopsis "Musl-cross gcc 5 toolchain")
+    (description "Musl-cross toolchain: binutils, gcc 5 and musl.")
+    (license license:isc))))




Information forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Sep 2019 01:19:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 19 21:19:52 2019
Received: from localhost ([127.0.0.1]:56598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iB7aR-0007ed-U1
	for submit <at> debbugs.gnu.org; Thu, 19 Sep 2019 21:19:52 -0400
Received: from lists.gnu.org ([209.51.188.17]:38957)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1iB7aP-0007eV-8R
 for submit <at> debbugs.gnu.org; Thu, 19 Sep 2019 21:19:49 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49860)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <dannym@HIDDEN>) id 1iB7aO-0005zb-4C
 for guix-patches@HIDDEN; Thu, 19 Sep 2019 21:19:49 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1iB7LR-0006Ix-UH
 for guix-patches@HIDDEN; Thu, 19 Sep 2019 21:04:22 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:34490)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1iB7LR-0006Ia-OX
 for guix-patches@HIDDEN; Thu, 19 Sep 2019 21:04:21 -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 12E9B33621A1;
 Fri, 20 Sep 2019 03:04:16 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/4] Add heads.
Date: Fri, 20 Sep 2019 03:02:48 +0200
Message-Id: <20190920010248.28082-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.23.0
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 85.13.145.193
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Danny Milosavljevic (4):
  gnu: Add musl-cross.
  gnu: Add heads.
  gnu: Add heads-linuxboot.
  gnu: Add heads-qemu-linuxboot.

 gnu/local.mk           |   1 +
 gnu/packages/heads.scm | 557 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 558 insertions(+)
 create mode 100644 gnu/packages/heads.scm





Acknowledgement sent to Danny Milosavljevic <dannym@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#37466; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.