GNU bug report logs - #31416
[PATCH 0/4] Generalize bootloader installer selection.

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, 11 May 2018 14:36:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 31416) by debbugs.gnu.org; 14 May 2018 08:31:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 14 04:31:27 2018
Received: from localhost ([127.0.0.1]:33231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fI8tD-0000j2-DP
	for submit <at> debbugs.gnu.org; Mon, 14 May 2018 04:31:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fI8tC-0000dE-48
 for 31416 <at> debbugs.gnu.org; Mon, 14 May 2018 04:31:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fI8t2-0006qn-4I
 for 31416 <at> debbugs.gnu.org; Mon, 14 May 2018 04:31:21 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60912)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fI8t2-0006qP-0f; Mon, 14 May 2018 04:31:16 -0400
Received: from [193.50.110.240] (port=53356 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fI8t1-0002To-Fi; Mon, 14 May 2018 04:31:15 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader.
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-3-dannym@HIDDEN>
 <87603rnbi5.fsf@HIDDEN> <20180513125925.66a91367@HIDDEN>
 <20180513131510.4a88c298@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 226 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 14 May 2018 10:31:13 +0200
In-Reply-To: <20180513131510.4a88c298@HIDDEN> (Danny Milosavljevic's
 message of "Sun, 13 May 2018 13:15:10 +0200")
Message-ID: <87o9hibpv2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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: -6.0 (------)

Danny Milosavljevic <dannym@HIDDEN> skribis:

> P.S. how do I make make-u-boot-package default triplet to the host triple=
t?
> (%current-system) is not a gnu triplet, right?

You could do:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(guix utils)
scheme@(guile-user)> (nix-system->gnu-triplet (%current-system))
$2 =3D "x86_64-unknown-linux-gnu"
--8<---------------cut here---------------end--------------->8---

Ludo=E2=80=99.




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 13:46:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 09:46:23 2018
Received: from localhost ([127.0.0.1]:60336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHrKQ-0000s1-Dv
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 09:46:22 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:47438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fHrKO-0000rt-Tu
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 09:46:21 -0400
Received: from localhost (178.113.247.28.wireless.dyn.drei.com
 [178.113.247.28])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id E60CC3361494;
 Sun, 13 May 2018 15:46:18 +0200 (CEST)
Date: Sun, 13 May 2018 15:46:15 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader.
Message-ID: <20180513154615.32ccd51b@HIDDEN>
In-Reply-To: <20180513125925.66a91367@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-3-dannym@HIDDEN>
 <87603rnbi5.fsf@HIDDEN> <20180513125925.66a91367@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/OvihLZ1I_gWSNK/izqCl86a"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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_/OvihLZ1I_gWSNK/izqCl86a
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

The number of boards vs. the number of SOCs:

u-boot-2018.05$ tools/genboardscfg.py
u-boot-2018.05$ wc -l boards.cfg
1249 boards.cfg
u-boot-2018.05$ cat boards.cfg |tail +7 |awk '{print $4}' |sort |uniq  |gre=
p -v '^$' |wc -l # 4 is the "SOC" column
86

--Sig_/OvihLZ1I_gWSNK/izqCl86a
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

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

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlr4QacACgkQ5xo1VCww
uqUdgwgAhDRyt37yLSqNDnU8XOoWlmEFlbWJJebEdM9eAGxwTNZFUaucWOVw7kgk
HWbqnPco2jeL13Rhn75GVQJ9pT4oYn7HsYUJoZW2kvCvMRIg/D2hTu0eqsXd7KVu
6WxYRfEWKyeCsEc3LwXQrNIfQc8iPZBK0DFbSsY3TtWhHa2SO3FxoBktLo7KE+8b
JafA849Ot8y45SFUXKhCEg+weVH1qqXOXByJDAoMjX58Dp8mySTvoQuKmZTFbnAn
yNYPWokC8pKdAE1kyx3cbbXDai8NHQnTp5gzHttRI6pGD3I9mKA3WlXr/bXKdZH2
wsBu5feKe7BqOp4fAdVN2WgSrNeoyg==
=AAXz
-----END PGP SIGNATURE-----

--Sig_/OvihLZ1I_gWSNK/izqCl86a--




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 12:09:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 08:09:24 2018
Received: from localhost ([127.0.0.1]:60291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHpoa-00057B-I9
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 08:09:24 -0400
Received: from mail.fsfe.org ([217.69.89.162]:44948)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jlicht@HIDDEN>) id 1fHpoV-00056v-Va
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 08:09:23 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.fsfe.org (Postfix) with ESMTP id 9E37263CFA8
 for <31416 <at> debbugs.gnu.org>; Sun, 13 May 2018 14:09:13 +0200 (CEST)
Received: from mail.fsfe.org ([127.0.0.1])
 by localhost (cavendish.fsfeurope.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id xAlUJXW5B+ec for <31416 <at> debbugs.gnu.org>;
 Sun, 13 May 2018 14:09:13 +0200 (CEST)
Received: by mail-ua0-f171.google.com with SMTP id d4-v6so6527489ual.10
 for <31416 <at> debbugs.gnu.org>; Sun, 13 May 2018 05:09:13 -0700 (PDT)
X-Gm-Message-State: ALKqPwcf57DVcwz4O22sZcj6dsagI0zXmXEGHVsk3Qv1tzSpkSIptbMB
 0Ov17chziMgytzLweyPKDZr2KDGDVNObEvWen5o=
X-Google-Smtp-Source: AB8JxZr0p9qKNTwArxL5a7+jj2w6gu2ULvOMFyEgL6xhSj7TnCj7sazoEoleu2Yn+jECAPnFmjIZXsPQhf5Q/VfpoKc=
X-Received: by 2002:a9f:25f5:: with SMTP id
 108-v6mr8301171uaf.178.1526213346938; 
 Sun, 13 May 2018 05:09:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.97.132 with HTTP; Sun, 13 May 2018 05:09:06 -0700 (PDT)
In-Reply-To: <20180511143652.26935-1-dannym@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
From: Jelle Licht <jlicht@HIDDEN>
Date: Sun, 13 May 2018 14:09:06 +0200
X-Gmail-Original-Message-ID: <CAPsKtf+esBz7jveWjF8BLbRTAKikm7m6LwzUEhwBZgeeQn7jzQ@HIDDEN>
Message-ID: <CAPsKtf+esBz7jveWjF8BLbRTAKikm7m6LwzUEhwBZgeeQn7jzQ@HIDDEN>
Subject: Re: [bug#31416] [PATCH 1/4] system: Add os-with-u-boot.
To: Danny Milosavljevic <dannym@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000655581056c153c88"
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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: -6.0 (------)

--000000000000655581056c153c88
Content-Type: text/plain; charset="UTF-8"

2018-05-11 16:36 GMT+02:00 Danny Milosavljevic <dannym@HIDDEN>:
[...]

> +@subsection Building the Installation Image for ARM boards
> +
> +Many ARM boards require a board-specific bootloader in order to boot.
> +
> +If you build an entire disk image and the is not still available otherwise
> +(on another available drive etc), it's advisable to build an image that
> +includes the bootloader, specifically:
>
`and the' seems to miss something after it.

> +
> +@example
> +guix system disk-image --system=armhf-linux -e '((@ (gnu system install)
> os-with-u-boot) (@ (gnu system install) installation-os)
> "A20-OLinuXino-Lime2")'
> +@end example
> +
> +Or if you don't cross compile:
>

nitpick: I do not like contractions in writing, but if we already use them
elsewhere, disregard this ;-).

> +
> +@example
> +guix system disk-image -e '((@ (gnu system install) os-with-u-boot) (@
> (gnu system install) installation-os) "A20-OLinuXino-Lime2")'
> +@end example
> +
> +"A20-OLinuXino-Lime2" is the name of the board.  If you specify an invalid
> +board, you get a list.
>

Could you clarify what you mean when you say you get a list?

> [...]
>
>
Thanks for working on this! I really want to see GuixSD on ARM succeed as
well.

--000000000000655581056c153c88
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">2018-05-11 16:36 GMT+02:00 Danny Milosavljevic <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:dannym@HIDDEN" target=3D"_blank">dannym@scratchpos=
t.org</a>&gt;</span>:<br>[...]<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+@subsec=
tion Building the Installation Image for ARM boards<br>
+<br>
+Many ARM boards require a board-specific bootloader in order to boot.<br>
+<br>
+If you build an entire disk image and the is not still available otherwise=
<br>
+(on another available drive etc), it&#39;s advisable to build an image tha=
t<br>
+includes the bootloader, specifically:<br></blockquote><div>`and the&#39; =
seems to miss something after it.=C2=A0 <br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">
+<br>
+@example<br>
+guix system disk-image --system=3Darmhf-linux -e &#39;((@ (gnu system inst=
all) os-with-u-boot) (@ (gnu system install) installation-os) &quot;A20-OLi=
nuXino-Lime2&quot;)&#39;<br>
+@end example<br>
+<br>
+Or if you don&#39;t cross compile:<br></blockquote><div><br></div><div>nit=
pick: I do not like contractions in writing, but if we already use them els=
ewhere, disregard this ;-). <br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+@example<br>
+guix system disk-image -e &#39;((@ (gnu system install) os-with-u-boot) (@=
 (gnu system install) installation-os) &quot;A20-OLinuXino-Lime2&quot;)&#39=
;<br>
+@end example<br>
+<br>
+&quot;A20-OLinuXino-Lime2&quot; is the name of the board.=C2=A0 If you spe=
cify an invalid<br>
+board, you get a list.<br></blockquote><div><br></div><div>Could you clari=
fy what you mean when you say you get a list? <br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">[...]<br>
<br>
</blockquote></div><br></div><div class=3D"gmail_extra">Thanks for working =
on this! I really want to see GuixSD on ARM succeed as well.<br></div><div =
class=3D"gmail_extra"><br></div></div>

--000000000000655581056c153c88--




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 11:15:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 07:15:21 2018
Received: from localhost ([127.0.0.1]:60254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHoyG-0001tC-WC
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 07:15:21 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:36880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fHoyE-0001t4-Vr
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 07:15:19 -0400
Received: from localhost (178.113.247.28.wireless.dyn.drei.com
 [178.113.247.28])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id A1A653360E18;
 Sun, 13 May 2018 13:15:17 +0200 (CEST)
Date: Sun, 13 May 2018 13:15:10 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader.
Message-ID: <20180513131510.4a88c298@HIDDEN>
In-Reply-To: <20180513125925.66a91367@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-3-dannym@HIDDEN>
 <87603rnbi5.fsf@HIDDEN> <20180513125925.66a91367@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/gOR0kV3IYsO6kajRDr0Yzl="; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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_/gOR0kV3IYsO6kajRDr0Yzl=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

> To infer the triplet, we can search for "CONFIG_ARM64=3Dy".

Not really, it's not in the u-boot tarball before it started building it.  =
Hmm...

But you're right, it shouldn't be cross-compiling it in the first place if =
"-s"
works (or if the user builds it on the target anyway), so we could just pun=
t on
this entirely.

P.S. how do I make make-u-boot-package default triplet to the host triplet?
(%current-system) is not a gnu triplet, right?

--Sig_/gOR0kV3IYsO6kajRDr0Yzl=
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

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

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlr4Hj4ACgkQ5xo1VCww
uqUelwf+NSon41e+Ug7nrhsD9StoojGWyZWLg+We59M417Sp1Sge4Y35XjKCn2DN
G3EN0Ur6l6oZx6iwyxa0NYRHgIj5Y2ALdTzRHgB06zi/yj/udyjrOk1nA7Z9kj1+
Kf5GVkrXxD8FaQEwgHJp8rwuAukM7IwE+XRfVpljfH5MTnx8/A/W5mTIjq5QArxZ
eDvZNcncwaTrWo89GpOQhADr+CqD2W+YSeWdP8K1A8HAtRKsFo2GiBJCVagDym2q
04jBGs4spWQbmpjpXylhfQRTCGP2waGQWc4X6vsLCECian+H0Ex/QD+UG6dJ/EZX
0mjEuIgtvZfLATBtr3c3eVcdosTvnQ==
=6ciW
-----END PGP SIGNATURE-----

--Sig_/gOR0kV3IYsO6kajRDr0Yzl=--




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 11:03:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 07:03:52 2018
Received: from localhost ([127.0.0.1]:60249 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHon9-0001dc-Vh
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 07:03:52 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:36052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fHon7-0001dT-Nt
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 07:03:50 -0400
Received: from localhost (178.113.247.28.wireless.dyn.drei.com
 [178.113.247.28])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id BD3CA3360E18;
 Sun, 13 May 2018 13:03:48 +0200 (CEST)
Date: Sun, 13 May 2018 13:03:43 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader.
Message-ID: <20180513125925.66a91367@HIDDEN>
In-Reply-To: <87603rnbi5.fsf@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-3-dannym@HIDDEN>
 <87603rnbi5.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/X0O.OCNyBNFz+hRHD=I5i2w"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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_/X0O.OCNyBNFz+hRHD=I5i2w
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Ludo,

>   (define-record-type <board>
>     (board name triplet installer)
>     =E2=80=A6)
>=20
> Thoughts?

The idea of make-u-boot-bootloader (and os-with-u-boot) was that it would f=
ree
us from having to play whack-a-mole regarding u-boot (except for the
installation methods of which there are much fewer than boards or chip mode=
ls)
and also free the user from having to know anything but the board name.

With your idea it would mean that we'd have to carry a huge list of <board>=
s,
defining the board and architecture and installer, right? (or I guess the
user would have to create it on-the-fly)

That's exactly what I was trying to avoid :)

I know my method isn't perfect either - I should have said "WIP" - but the =
idea
is that the user would just use os-with-u-boot and specify his board name -=
 and the
rest is magically being worked out (for all boards in u-boot).

I'm trying to keep to information that is available within u-boot (like .co=
nfig)
so we don't have to maintain the stuff ourselves.  The installer was suppos=
ed
to read out the u-boot parts and infer the correct incantations to use by i=
tself.

To infer the triplet, we can search for "CONFIG_ARM64=3Dy".

The SOC should be fine to infer as in this patch.

No chance inferring the actual installation commands, though.  Too bad...

They've got all kinds of funny config entries like

  CONFIG_SPL_FIT_GENERATOR=3D"board/sunxi/mksunxi_fit_atf.sh"

but I don't see the installation commands / info... hrmmmm...

--Sig_/X0O.OCNyBNFz+hRHD=I5i2w
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

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

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlr4G48ACgkQ5xo1VCww
uqUgMwf/V4cYk1sanQH+JdOeSBWxm9wmmIfBrE+yL9Tzf7LUHFeT+XvfAfz8caGr
q/Zihs7SsYiCuaxqoJ/p8oYzBbuygi4NfXBcvhSj3ebBcZ/iKLxcW0mGjJvG6zyp
aGdAEqq163LZlo09EMh80tonKw5lRuGo0W8k7guEeOqi4wf6kaljIPMsQwF9UqIy
/HH+virEd7L4TSmAcN0rAZyehPzjfdhqiDLXCIBFgsTFyEkidUk1gE24GtHj6ZjL
12Oq5hcpZb7JIoArYgk9Ju4KRUibROhMUNg5+qtmgbqw8kkjjEQq/KGKDcRsDbLh
GTZX0HQWWnBQeHxqTbDavJkA2C2Rsg==
=nkRx
-----END PGP SIGNATURE-----

--Sig_/X0O.OCNyBNFz+hRHD=I5i2w--




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 10:44:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 06:44:00 2018
Received: from localhost ([127.0.0.1]:60234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHoTw-00018D-IP
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 06:44:00 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:34672)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fHoTu-000184-V3
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 06:43:59 -0400
Received: from localhost (178.113.246.214.wireless.dyn.drei.com
 [178.113.246.214])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 12A583360E18;
 Sun, 13 May 2018 12:43:56 +0200 (CEST)
Date: Sun, 13 May 2018 12:43:50 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: [bug#31416] [PATCH 2/4] bootloader: install-u-boot:
 Automatically select the correct installer.
Message-ID: <20180513124350.0053f8e2@HIDDEN>
In-Reply-To: <87d0xznbpw.fsf@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-2-dannym@HIDDEN>
 <87d0xznbpw.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/0wph_3xynCvhJkvUzxbL4Rs"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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_/0wph_3xynCvhJkvUzxbL4Rs
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Ludo,

On Sun, 13 May 2018 11:31:23 +0200
ludo@HIDDEN (Ludovic Court=C3=A8s) wrote:

> Last, isn=E2=80=99t it a bit hacky?  :-)  Previously every <bootloader> w=
ould
> contain its installation method, so this was unambiguous, but now we=E2=
=80=99re
> back to guessing what installation method to use.

Yeah, it's a bit hacky.

But I don't like the weird spreading-out of bootloader installers as
opposed to bootloader packages either.  It would be nicest if upstream
just included installation scripts :P

How the board will boot depends *only* on the Sytem-On-a-Chip in use -
for example all the Allwinner sunxi chips boot the same way.

Usually it's just what the vendor decided to use years (decades) ago
and it stays the same over many many chip generations.

--Sig_/0wph_3xynCvhJkvUzxbL4Rs
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

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

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlr4FuYACgkQ5xo1VCww
uqUGUQf/bFOdIC+30tEFxJz6r4OMMHcVu1MLldiJ4IC5jrMVCzy4NG6OUpvlKVC3
X4CXpEbQZ/53oj4Slnubl6ByyPf/YsAFjp1o2UjTVuG7z3qKrkrroY7lNBRQwmoj
K2O3rRZZi0tO5SAFR3ahOtjlRKny9G77887RLZqen+ywU/zijEexKRCSGYPtYP/M
lZS5/TDeGldPcDOZ2UF7s0pIexdzk1abTCnW6Iec4zuJTlL+h+CBPeU2A9ysKTP9
kaV8apIjy3FOPHjutqW8XDR54SfQQ3u9c2ddVBrDueoaFMZCZWMBEyBOxXbbfcxi
KKLD08EfqC7k0xWWWd/eKqKmGXwfKw==
=tkCo
-----END PGP SIGNATURE-----

--Sig_/0wph_3xynCvhJkvUzxbL4Rs--




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 09:36:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 05:36:14 2018
Received: from localhost ([127.0.0.1]:60177 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHnQK-00040d-Tq
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 05:36:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46179)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fHnQJ-00040M-Ld
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 05:36:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fHnQD-0005YN-Qg
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 05:36:06 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42524)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fHnQD-0005YJ-N6; Sun, 13 May 2018 05:36:05 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41358 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fHnQC-0004WJ-ON; Sun, 13 May 2018 05:36:05 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader.
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-3-dannym@HIDDEN>
Date: Sun, 13 May 2018 11:36:02 +0200
In-Reply-To: <20180511143652.26935-3-dannym@HIDDEN> (Danny
 Milosavljevic's message of "Fri, 11 May 2018 16:36:51 +0200")
Message-ID: <87603rnbi5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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: -6.0 (------)

Danny Milosavljevic <dannym@HIDDEN> skribis:

> +(define (make-u-boot-bootloader bootloader-package)
> +  "Given BOOTLOADER-PACKAGE, make a bootloader that can install."
>    (bootloader
> -   (inherit u-boot-bootloader)
> -   (installer install-allwinner-u-boot)))
> +    (inherit u-boot-bootloader)
> +    (package bootloader-package)))

What about making it entirely dynamic similar to the =E2=80=98cross-gcc=E2=
=80=99
procedure?

Like:

  (define (u-boot-bootloader board)
    (bootloader
      (installer (board-installer board))
      (package (make-u-boot-package (board-name board)
                                    (board-triplet board)))))

where:

  (define-record-type <board>
    (board name triplet installer)
    =E2=80=A6)

Thoughts?

Ludo=E2=80=99.




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 09:31:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 05:31:34 2018
Received: from localhost ([127.0.0.1]:60172 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHnLq-0003u6-AS
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 05:31:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fHnLo-0003tu-OJ
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 05:31:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fHnLi-0003lh-NM
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 05:31:27 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42486)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fHnLi-0003lb-Ix; Sun, 13 May 2018 05:31:26 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41206 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fHnLi-0007Ns-4v; Sun, 13 May 2018 05:31:26 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#31416] [PATCH 2/4] bootloader: install-u-boot: Automatically
 select the correct installer.
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
 <20180511143652.26935-2-dannym@HIDDEN>
Date: Sun, 13 May 2018 11:31:23 +0200
In-Reply-To: <20180511143652.26935-2-dannym@HIDDEN> (Danny
 Milosavljevic's message of "Fri, 11 May 2018 16:36:50 +0200")
Message-ID: <87d0xznbpw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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: -6.0 (------)

Danny Milosavljevic <dannym@HIDDEN> skribis:

> * gnu/bootloader/u-boot.scm (install-u-boot): Automatically select the co=
rrect
> installer.
> ---
>  gnu/bootloader/u-boot.scm | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
> index bc8f98f32..e0941c961 100644
> --- a/gnu/bootloader/u-boot.scm
> +++ b/gnu/bootloader/u-boot.scm
> @@ -41,7 +41,24 @@
>  (define install-u-boot
>    #~(lambda (bootloader device mount-point)
>        (if bootloader
> -        (error "Failed to install U-Boot"))))
> +        (let* ((config-file-name (string-append bootloader "/libexec/.co=
nfig"))
> +               (soc (call-with-input-file config-file-name
> +                                          (let loop ((line (read-line po=
rt)))
> +                                            (if (not (eof-object? line))
> +                                                (let ((match
> +                                                       (string-match
> +                                                        "^CONFIG_SYS_SOC=
=3D\"([^\"]*)\""
> +                                                        line)))
> +                                                  (if match
> +                                                      (match:substring m=
atch 1)
> +                                                      (loop (read-line p=
ort))))
> +                                                #f)))))
> +          (match soc
> +           ("am33xx" (install-beaglebone-black-u-boot bootloader device =
mount-point))
> +           ("mx6" (install-imx-u-boot bootloader device mount-point))
> +           ("sunxi" (install-allwinner-u-boot bootloader device mount-po=
int))
> +           (_ (error "Failed to install U-Boot (no installation method f=
ound)"
> +                     soc)))))))

Hmm =E2=80=98install-beaglebone-black-u-boot=E2=80=99 & co are not in the s=
ame stage
AFAICS; are you missing #$ escapes here?

Also we=E2=80=99re probably missing (ice-9 rdelim) and (ice-9 regex) as in =
the
build stage.

Last, isn=E2=80=99t it a bit hacky?  :-)  Previously every <bootloader> wou=
ld
contain its installation method, so this was unambiguous, but now we=E2=80=
=99re
back to guessing what installation method to use.

Ludo=E2=80=99.




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

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


Received: (at 31416) by debbugs.gnu.org; 13 May 2018 09:24:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 13 05:24:41 2018
Received: from localhost ([127.0.0.1]:60167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fHnFB-0003jP-Gv
	for submit <at> debbugs.gnu.org; Sun, 13 May 2018 05:24:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44673)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fHnF9-0003jC-Tn
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 05:24:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fHnF3-0000co-Ha
 for 31416 <at> debbugs.gnu.org; Sun, 13 May 2018 05:24:34 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42431)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fHnF3-0000ck-DF; Sun, 13 May 2018 05:24:33 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40796 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fHnF2-0006Bs-Qa; Sun, 13 May 2018 05:24:33 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#31416] [PATCH 1/4] system: Add os-with-u-boot.
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
Date: Sun, 13 May 2018 11:24:30 +0200
In-Reply-To: <20180511143652.26935-1-dannym@HIDDEN> (Danny
 Milosavljevic's message of "Fri, 11 May 2018 16:36:49 +0200")
Message-ID: <87in7rnc1d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31416
Cc: 31416 <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: -6.0 (------)

Hello!

Great that you=E2=80=99re streamlining GuixSD on ARM!

Danny Milosavljevic <dannym@HIDDEN> skribis:

> * gnu/system/install.scm (os-with-u-boot): New procedure.
> * gnu/packages/bootloaders.scm (make-u-boot-package): Export.
> * doc/guix.texi (Building the Installation Image for ARM boards): New
> subsection.

[...]

> +@subsection Building the Installation Image for ARM boards

=E2=80=9CBoards=E2=80=9D

> +Many ARM boards require a board-specific bootloader in order to boot.

Maybe: =E2=80=9Crequire a specific variant of the
@uref{http://www.denx.de/wiki/U-Boot/, U-Boot} bootloader.=E2=80=9D

> +If you build an entire disk image and the is not still available otherwi=
se
> +(on another available drive etc), it's advisable to build an image that
> +includes the bootloader, specifically:
> +
> +@example
> +guix system disk-image --system=3Darmhf-linux -e '((@ (gnu system instal=
l) os-with-u-boot) (@ (gnu system install) installation-os) "A20-OLinuXino-=
Lime2")'
> +@end example

Note: In Texinfo you need to double all the at signs.

> +Or if you don't cross compile:

It=E2=80=99s not cross-compilation.  :-)

But I don=E2=80=99t think you need to repeat the command line.

> +"A20-OLinuXino-Lime2" is the name of the board.  If you specify an inval=
id
   ^
@code

> +board, you get a list.

I think the patch is otherwise OK.

Ludo=E2=80=99.




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

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


Received: (at 31416) by debbugs.gnu.org; 11 May 2018 14:37:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 11 10:37:06 2018
Received: from localhost ([127.0.0.1]:58555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fH9AQ-0006v3-EE
	for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:06 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:52840)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fH9AN-0006uk-LZ
 for 31416 <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:04 -0400
Received: from dayas.3.home (178.113.179.231.wireless.dyn.drei.com
 [178.113.179.231])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 96F0F336596E;
 Fri, 11 May 2018 16:37:02 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 31416 <at> debbugs.gnu.org
Subject: [PATCH 4/4] bootloader: Simplify bootloader installer selection.
Date: Fri, 11 May 2018 16:36:52 +0200
Message-Id: <20180511143652.26935-4-dannym@HIDDEN>
X-Mailer: git-send-email 2.16.2
In-Reply-To: <20180511143652.26935-1-dannym@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
Tags: patch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
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/bootloader/u-boot.scm (u-boot-bootloader): Delete variable.
(u-boot-a20-olinuxino-lime-bootloader): Delete variable.
(u-boot-a20-olinuxino-lime2-bootloader): Delete variable.
(u-boot-a20-olinuxino-micro-bootloader): Delete variable.
(u-boot-banana-pi-m2-ultra-bootloader): Delete variable.
(u-boot-beaglebone-black-bootloader): Delete variable.
(u-boot-mx6cuboxi-bootloader): Delete variable.
(u-boot-nintendo-nes-classic-edition-bootloader): Delete variable.
(u-boot-novena-bootloader): Delete variable.
(u-boot-wandboard-bootloader): Delete variable.
* gnu/packages/bootloader.scm (u-boot-beagle-bone-black): Rename to...
(u-boot-beaglebone-black): ...this.
* gnu/system/examples/beaglebone-black.tmpl: Use make-u-boot-bootloader.
* gnu/system/install.scm (os-with-u-boot): Use make-u-boot-bootloader.
(beaglebone-black-installation-os): Use make-u-boot-bootloader.
(a20-olinuxino-lime-installation-os): Use make-u-boot-bootloader.
(a20-olinuxino-lime2-emmc-installation-os): Use make-u-boot-bootloader.
(a20-olinuxino-micro-installation-os): Use make-u-boot-bootloader.
(banana-pi-m2-ultra-installation-os): Use make-u-boot-bootloader.
(mx6cuboxi-installation-os): Use make-u-boot-bootloader.
(novena-installation-os): Use make-u-boot-bootloader.
(nintendo-nes-classic-edition-installation-os): Use make-u-boot-bootloader.
(wandboard-installation-os): Use make-u-boot-bootloader.
---
 gnu/bootloader/u-boot.scm                 | 39 +------------------------------
 gnu/packages/bootloaders.scm              |  2 +-
 gnu/system/examples/beaglebone-black.tmpl |  2 +-
 gnu/system/install.scm                    | 21 ++++++++---------
 4 files changed, 13 insertions(+), 51 deletions(-)

diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index feda17f99..f804997a4 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -27,17 +27,7 @@
   #:use-module (guix monads)
   #:use-module (guix records)
   #:use-module (guix utils)
-  #:export (u-boot-bootloader
-            u-boot-a20-olinuxino-lime-bootloader
-            u-boot-a20-olinuxino-lime2-bootloader
-            u-boot-a20-olinuxino-micro-bootloader
-            u-boot-banana-pi-m2-ultra-bootloader
-            u-boot-beaglebone-black-bootloader
-            u-boot-mx6cuboxi-bootloader
-            u-boot-nintendo-nes-classic-edition-bootloader
-            u-boot-novena-bootloader
-            u-boot-wandboard-bootloader
-            make-u-boot-bootloader))
+  #:export (make-u-boot-bootloader))
 
 (define install-u-boot
   #~(lambda (bootloader device mount-point)
@@ -110,30 +100,3 @@
   (bootloader
     (inherit u-boot-bootloader)
     (package bootloader-package)))
-
-(define u-boot-beaglebone-black-bootloader
-  (make-u-boot-bootloader u-boot-beagle-bone-black))
-
-(define u-boot-nintendo-nes-classic-edition-bootloader
-  (make-u-boot-bootloader u-boot-nintendo-nes-classic-edition))
-
-(define u-boot-a20-olinuxino-lime-bootloader
-  (make-u-boot-bootloader u-boot-a20-olinuxino-lime))
-
-(define u-boot-a20-olinuxino-lime2-bootloader
-  (make-u-boot-bootloader u-boot-a20-olinuxino-lime2))
-
-(define u-boot-a20-olinuxino-micro-bootloader
-  (make-u-boot-bootloader u-boot-a20-olinuxino-micro))
-
-(define u-boot-banana-pi-m2-ultra-bootloader
-  (make-u-boot-bootloader u-boot-banana-pi-m2-ultra))
-
-(define u-boot-mx6cuboxi-bootloader
-  (make-u-boot-bootloader u-boot-mx6cuboxi))
-
-(define u-boot-wandboard-bootloader
-  (make-u-boot-bootloader u-boot-wandboard))
-
-(define u-boot-novena-bootloader
-  (make-u-boot-bootloader u-boot-novena))
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 526e53384..759abdc92 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -424,7 +424,7 @@ also initializes the boards (RAM etc).")
 (define-public u-boot-malta
   (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
 
-(define-public u-boot-beagle-bone-black
+(define-public u-boot-beaglebone-black
   (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
 
 (define-public u-boot-pine64-plus
diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/examples/beaglebone-black.tmpl
index 97201330c..1fd03dab9 100644
--- a/gnu/system/examples/beaglebone-black.tmpl
+++ b/gnu/system/examples/beaglebone-black.tmpl
@@ -13,7 +13,7 @@
   ;; Assuming /dev/mmcblk1 is the eMMC, and "my-root" is
   ;; the label of the target root file system.
   (bootloader (bootloader-configuration
-               (bootloader u-boot-beaglebone-black-bootloader)
+               (bootloader (make-u-boot-bootloader u-boot-beaglebone-black))
                (target "/dev/mmcblk1")))
 
   ;; This module is required to mount the SD card.
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index b563e8b5b..7508f95a8 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -396,8 +396,7 @@ If you want a serial console, make sure to specify one in your
 operating-system's kernel-arguments (\"console=ttyS0\" or similar)."
   (operating-system (inherit os)
     (bootloader (bootloader-configuration
-                 (bootloader (bootloader (inherit u-boot-bootloader)
-                              (package (make-u-boot-package board triplet))))
+                 (bootloader (make-u-boot-bootloader (make-u-boot-package board triplet)))
                  (target bootloader-target)))))
 
 (define* (embedded-installation-os bootloader bootloader-target tty
@@ -418,7 +417,7 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
     (initrd-modules (append extra-modules %base-initrd-modules))))
 
 (define beaglebone-black-installation-os
-  (embedded-installation-os u-boot-beaglebone-black-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-beaglebone-black)
                             "/dev/sda"
                             "ttyO0"
                             #:extra-modules
@@ -427,42 +426,42 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
 
 
 (define a20-olinuxino-lime-installation-os
-  (embedded-installation-os u-boot-a20-olinuxino-lime-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-a20-olinuxino-lime)
                             "/dev/mmcblk0" ; SD card storage
                             "ttyS0"))
 
 (define a20-olinuxino-lime2-emmc-installation-os
-  (embedded-installation-os u-boot-a20-olinuxino-lime2-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-a20-olinuxino-lime2)
                             "/dev/mmcblk1" ; eMMC storage
                             "ttyS0"))
 
 (define a20-olinuxino-micro-installation-os
-  (embedded-installation-os u-boot-a20-olinuxino-micro-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-a20-olinuxino-micro)
                             "/dev/mmcblk0" ; SD card storage
                             "ttyS0"))
 
 (define banana-pi-m2-ultra-installation-os
-  (embedded-installation-os u-boot-banana-pi-m2-ultra-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-banana-pi-m2-ultra)
                             "/dev/mmcblk1" ; eMMC storage
                             "ttyS0"))
 
 (define mx6cuboxi-installation-os
-  (embedded-installation-os u-boot-mx6cuboxi-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-mx6cuboxi)
                             "/dev/mmcblk0" ; SD card storage
                             "ttymxc0"))
 
 (define novena-installation-os
-  (embedded-installation-os u-boot-novena-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-novena)
                             "/dev/mmcblk1" ; SD card storage
                             "ttymxc1"))
 
 (define nintendo-nes-classic-edition-installation-os
-  (embedded-installation-os u-boot-nintendo-nes-classic-edition-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-nintendo-nes-classic-edition)
                             "/dev/mmcblk0" ; SD card (solder it yourself)
                             "ttyS0"))
 
 (define wandboard-installation-os
-  (embedded-installation-os u-boot-wandboard-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-wandboard)
                             "/dev/mmcblk0" ; SD card storage
                             "ttymxc0"))
 




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

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


Received: (at 31416) by debbugs.gnu.org; 11 May 2018 14:37:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 11 10:37:06 2018
Received: from localhost ([127.0.0.1]:58553 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fH9AQ-0006v1-1G
	for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:06 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:52818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fH9AM-0006uW-HW
 for 31416 <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:02 -0400
Received: from dayas.3.home (178.113.179.231.wireless.dyn.drei.com
 [178.113.179.231])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 76E293360DA7;
 Fri, 11 May 2018 16:37:01 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 31416 <at> debbugs.gnu.org
Subject: [PATCH 3/4] bootloader: Add make-u-boot-bootloader.
Date: Fri, 11 May 2018 16:36:51 +0200
Message-Id: <20180511143652.26935-3-dannym@HIDDEN>
X-Mailer: git-send-email 2.16.2
In-Reply-To: <20180511143652.26935-1-dannym@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
Tags: patch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
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/bootloader/u-boot.scm (make-u-boot-bootloader): New procedure.
(u-boot-allwinner-bootloader): Delete variable.
(u-boot-imx-bootloader): Delete variable.
(u-boot-beaglebone-black-bootloader): Modify.
(u-boot-nintendo-nes-classic-edition-bootloader): Modify.
(u-boot-a20-olinuxino-lime-bootloader): Modify.
(u-boot-a20-olinuxino-lime2-bootloader): Modify.
(u-boot-a20-olinuxino-micro-bootloader): Modify.
(u-boot-banana-pi-m2-ultra-bootloader): Modify.
(u-boot-mx6cuboxi-bootloader): Modify.
(u-boot-wandboard-bootloader): Modify.
(u-boot-novena-bootloader): Modify.
---
 gnu/bootloader/u-boot.scm | 54 ++++++++++++++---------------------------------
 1 file changed, 16 insertions(+), 38 deletions(-)

diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index e0941c961..feda17f99 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -36,7 +36,8 @@
             u-boot-mx6cuboxi-bootloader
             u-boot-nintendo-nes-classic-edition-bootloader
             u-boot-novena-bootloader
-            u-boot-wandboard-bootloader))
+            u-boot-wandboard-bootloader
+            make-u-boot-bootloader))
 
 (define install-u-boot
   #~(lambda (bootloader device mount-point)
@@ -104,58 +105,35 @@
    (package #f)
    (installer install-u-boot)))
 
-(define u-boot-beaglebone-black-bootloader
-  (bootloader
-   (inherit u-boot-bootloader)
-   (package u-boot-beagle-bone-black)
-   (installer install-beaglebone-black-u-boot)))
-
-(define u-boot-allwinner-bootloader
+(define (make-u-boot-bootloader bootloader-package)
+  "Given BOOTLOADER-PACKAGE, make a bootloader that can install."
   (bootloader
-   (inherit u-boot-bootloader)
-   (installer install-allwinner-u-boot)))
+    (inherit u-boot-bootloader)
+    (package bootloader-package)))
 
-(define u-boot-imx-bootloader
-  (bootloader
-   (inherit u-boot-bootloader)
-   (installer install-imx-u-boot)))
+(define u-boot-beaglebone-black-bootloader
+  (make-u-boot-bootloader u-boot-beagle-bone-black))
 
 (define u-boot-nintendo-nes-classic-edition-bootloader
-  (bootloader
-    (inherit u-boot-allwinner-bootloader)
-    (package u-boot-nintendo-nes-classic-edition)))
+  (make-u-boot-bootloader u-boot-nintendo-nes-classic-edition))
 
 (define u-boot-a20-olinuxino-lime-bootloader
-  (bootloader
-   (inherit u-boot-allwinner-bootloader)
-   (package u-boot-a20-olinuxino-lime)))
+  (make-u-boot-bootloader u-boot-a20-olinuxino-lime))
 
 (define u-boot-a20-olinuxino-lime2-bootloader
-  (bootloader
-   (inherit u-boot-allwinner-bootloader)
-   (package u-boot-a20-olinuxino-lime2)))
+  (make-u-boot-bootloader u-boot-a20-olinuxino-lime2))
 
 (define u-boot-a20-olinuxino-micro-bootloader
-  (bootloader
-   (inherit u-boot-allwinner-bootloader)
-   (package u-boot-a20-olinuxino-micro)))
+  (make-u-boot-bootloader u-boot-a20-olinuxino-micro))
 
 (define u-boot-banana-pi-m2-ultra-bootloader
-  (bootloader
-   (inherit u-boot-allwinner-bootloader)
-   (package u-boot-banana-pi-m2-ultra)))
+  (make-u-boot-bootloader u-boot-banana-pi-m2-ultra))
 
 (define u-boot-mx6cuboxi-bootloader
-  (bootloader
-   (inherit u-boot-imx-bootloader)
-   (package u-boot-mx6cuboxi)))
+  (make-u-boot-bootloader u-boot-mx6cuboxi))
 
 (define u-boot-wandboard-bootloader
-  (bootloader
-   (inherit u-boot-imx-bootloader)
-   (package u-boot-wandboard)))
+  (make-u-boot-bootloader u-boot-wandboard))
 
 (define u-boot-novena-bootloader
-  (bootloader
-   (inherit u-boot-imx-bootloader)
-   (package u-boot-novena)))
+  (make-u-boot-bootloader u-boot-novena))




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

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


Received: (at 31416) by debbugs.gnu.org; 11 May 2018 14:37:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 11 10:37:04 2018
Received: from localhost ([127.0.0.1]:58550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fH9AN-0006un-Nb
	for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:03 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:52810)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fH9AL-0006u3-Es
 for 31416 <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:01 -0400
Received: from dayas.3.home (178.113.179.231.wireless.dyn.drei.com
 [178.113.179.231])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 7DDC43361628;
 Fri, 11 May 2018 16:37:00 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 31416 <at> debbugs.gnu.org
Subject: [PATCH 2/4] bootloader: install-u-boot: Automatically select the
 correct installer.
Date: Fri, 11 May 2018 16:36:50 +0200
Message-Id: <20180511143652.26935-2-dannym@HIDDEN>
X-Mailer: git-send-email 2.16.2
In-Reply-To: <20180511143652.26935-1-dannym@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
 <20180511143652.26935-1-dannym@HIDDEN>
Tags: patch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
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/bootloader/u-boot.scm (install-u-boot): Automatically select the correct
installer.
---
 gnu/bootloader/u-boot.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index bc8f98f32..e0941c961 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -41,7 +41,24 @@
 (define install-u-boot
   #~(lambda (bootloader device mount-point)
       (if bootloader
-        (error "Failed to install U-Boot"))))
+        (let* ((config-file-name (string-append bootloader "/libexec/.config"))
+               (soc (call-with-input-file config-file-name
+                                          (let loop ((line (read-line port)))
+                                            (if (not (eof-object? line))
+                                                (let ((match
+                                                       (string-match
+                                                        "^CONFIG_SYS_SOC=\"([^\"]*)\""
+                                                        line)))
+                                                  (if match
+                                                      (match:substring match 1)
+                                                      (loop (read-line port))))
+                                                #f)))))
+          (match soc
+           ("am33xx" (install-beaglebone-black-u-boot bootloader device mount-point))
+           ("mx6" (install-imx-u-boot bootloader device mount-point))
+           ("sunxi" (install-allwinner-u-boot bootloader device mount-point))
+           (_ (error "Failed to install U-Boot (no installation method found)"
+                     soc)))))))
 
 (define install-beaglebone-black-u-boot
   ;; http://wiki.beyondlogic.org/index.php?title=BeagleBoneBlack_Upgrading_uBoot




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

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


Received: (at 31416) by debbugs.gnu.org; 11 May 2018 14:37:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 11 10:37:02 2018
Received: from localhost ([127.0.0.1]:58547 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fH9AM-0006uY-Et
	for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:02 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:52802)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fH9AK-0006u1-Ot
 for 31416 <at> debbugs.gnu.org; Fri, 11 May 2018 10:37:01 -0400
Received: from dayas.3.home (178.113.179.231.wireless.dyn.drei.com
 [178.113.179.231])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 5494A3360DA7;
 Fri, 11 May 2018 16:36:59 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 31416 <at> debbugs.gnu.org
Subject: [PATCH 1/4] system: Add os-with-u-boot.
Date: Fri, 11 May 2018 16:36:49 +0200
Message-Id: <20180511143652.26935-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.16.2
In-Reply-To: <20180511143515.23435-1-dannym@HIDDEN>
References: <20180511143515.23435-1-dannym@HIDDEN>
Tags: patch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31416
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/system/install.scm (os-with-u-boot): New procedure.
* gnu/packages/bootloaders.scm (make-u-boot-package): Export.
* doc/guix.texi (Building the Installation Image for ARM boards): New
subsection.
---
 doc/guix.texi                | 21 +++++++++++++++++++++
 gnu/packages/bootloaders.scm |  2 +-
 gnu/system/install.scm       | 16 +++++++++++++++-
 3 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 637c9c3f4..b2b173ded 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8733,6 +8733,27 @@ Have a look at @file{gnu/system/install.scm} in the source tree,
 and see also @ref{Invoking guix system} for more information
 about the installation image.
 
+@subsection Building the Installation Image for ARM boards
+
+Many ARM boards require a board-specific bootloader in order to boot.
+
+If you build an entire disk image and the is not still available otherwise
+(on another available drive etc), it's advisable to build an image that
+includes the bootloader, specifically:
+
+@example
+guix system disk-image --system=armhf-linux -e '((@ (gnu system install) os-with-u-boot) (@ (gnu system install) installation-os) "A20-OLinuXino-Lime2")'
+@end example
+
+Or if you don't cross compile:
+
+@example
+guix system disk-image -e '((@ (gnu system install) os-with-u-boot) (@ (gnu system install) installation-os) "A20-OLinuXino-Lime2")'
+@end example
+
+"A20-OLinuXino-Lime2" is the name of the board.  If you specify an invalid
+board, you get a list.
+
 @node System Configuration
 @section System Configuration
 
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c0a0101c5..526e53384 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -359,7 +359,7 @@ tree binary files.  These are board description files used by Linux and BSD.")
 also initializes the boards (RAM etc).")
     (license license:gpl2+)))
 
-(define (make-u-boot-package board triplet)
+(define-public (make-u-boot-package board triplet)
   "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
   (let ((same-arch? (if (string-prefix? (%current-system)
                                         (gnu-triplet->nix-system triplet))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index a2917e485..b563e8b5b 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -52,7 +52,8 @@
             mx6cuboxi-installation-os
             nintendo-nes-classic-edition-installation-os
             novena-installation-os
-            wandboard-installation-os))
+            wandboard-installation-os
+            os-with-u-boot))
 
 ;;; Commentary:
 ;;;
@@ -386,6 +387,19 @@ You have been warned.  Thanks for being so brave.\x1b[0m
                      nvi                          ;:wq!
                      %base-packages))))
 
+(define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
+                         (triplet "arm-linux-gnueabihf"))
+  "Given OS, amend it with the u-boot bootloader for BOARD,
+installed to BOOTLOADER-TARGET (a drive), compiled for TRIPLET.
+
+If you want a serial console, make sure to specify one in your
+operating-system's kernel-arguments (\"console=ttyS0\" or similar)."
+  (operating-system (inherit os)
+    (bootloader (bootloader-configuration
+                 (bootloader (bootloader (inherit u-boot-bootloader)
+                              (package (make-u-boot-package board triplet))))
+                 (target bootloader-target)))))
+
 (define* (embedded-installation-os bootloader bootloader-target tty
                                    #:key (extra-modules '()))
   "Return an installation os for embedded systems.




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

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


Received: (at submit) by debbugs.gnu.org; 11 May 2018 14:35:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 11 10:35:47 2018
Received: from localhost ([127.0.0.1]:58541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fH997-0006ru-Q7
	for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:35:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1fH996-0006rc-Ua
 for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:35:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1fH991-0004JB-2a
 for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:35:39 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47717)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1fH990-0004J7-VC
 for submit <at> debbugs.gnu.org; Fri, 11 May 2018 10:35:38 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58778)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1fH98x-0002mE-7H
 for guix-patches@HIDDEN; Fri, 11 May 2018 10:35:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1fH98u-0004HZ-58
 for guix-patches@HIDDEN; Fri, 11 May 2018 10:35:35 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:48248)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1fH98t-0004H0-Ua
 for guix-patches@HIDDEN; Fri, 11 May 2018 10:35:32 -0400
Received: from dayas.3.home (178.113.179.231.wireless.dyn.drei.com
 [178.113.179.231])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 0D9DB336034F;
 Fri, 11 May 2018 16:35:27 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/4] Generalize bootloader installer selection.
Date: Fri, 11 May 2018 16:35:15 +0200
Message-Id: <20180511143515.23435-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.16.2
Tags: patch
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
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: -6.0 (------)

Danny Milosavljevic (4):
  system: Add os-with-u-boot.
  bootloader: install-u-boot: Automatically select the correct
    installer.
  bootloader: Add make-u-boot-bootloader.
  bootloader: Simplify bootloader installer selection.

 doc/guix.texi                             | 21 ++++++++
 gnu/bootloader/u-boot.scm                 | 88 ++++++++-----------------------
 gnu/packages/bootloaders.scm              |  4 +-
 gnu/system/examples/beaglebone-black.tmpl |  2 +-
 gnu/system/install.scm                    | 33 ++++++++----
 5 files changed, 70 insertions(+), 78 deletions(-)





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#31416; 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, 14 May 2018 08:30:02 UTC

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