From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2I0JBB3IlF/YDgAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 00:34:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 7oF0OxzIlF/vYAAAbx9fmQ (envelope-from ) for ; Sun, 25 Oct 2020 00:34:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EEF4C94014A for ; Sun, 25 Oct 2020 00:34:35 +0000 (UTC) Received: from localhost ([::1]:54228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWTzW-0002rw-St for larch@yhetil.org; Sat, 24 Oct 2020 20:34:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWTz0-0002Jd-Fo for guix-patches@gnu.org; Sat, 24 Oct 2020 20:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWTyz-0003sH-Ur for guix-patches@gnu.org; Sat, 24 Oct 2020 20:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWTyz-0005Pz-PD for guix-patches@gnu.org; Sat, 24 Oct 2020 20:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41066] [PATCH] gnu: bootloader: Support for chain loading. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Oct 2020 00:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Stefan , Mathieu Othacehe , 41066@debbugs.gnu.org, Efraim Flashner , Maxim Cournoyer Received: via spool by 41066-submit@debbugs.gnu.org id=B41066.160358603620816 (code B ref 41066); Sun, 25 Oct 2020 00:34:01 +0000 Received: (at 41066) by debbugs.gnu.org; 25 Oct 2020 00:33:56 +0000 Received: from localhost ([127.0.0.1]:35532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWTyu-0005Pf-Cu for submit@debbugs.gnu.org; Sat, 24 Oct 2020 20:33:56 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:59326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWTyq-0005PV-Fp for 41066@debbugs.gnu.org; Sat, 24 Oct 2020 20:33:55 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 93E6133679F7; Sun, 25 Oct 2020 02:33:50 +0200 (CEST) Date: Sun, 25 Oct 2020 02:33:45 +0200 From: Danny Milosavljevic Message-ID: <20201025023345.73d515d2@scratchpost.org> In-Reply-To: <87a6wbiofb.fsf@gnu.org> References: <7A4ABEA8-4500-4D55-BCCE-BFB37FB06B2C@vodafonemail.de> <20200524131316.4c6e8a50@scratchpost.org> <3197004D-0131-4781-99FD-60EBE434E794@vodafonemail.de> <023CBBED-35CD-4AD3-97C4-0DE0B7623B9A@vodafonemail.de> <6E5ECFBA-57F4-485F-9403-1D04CF82062D@vodafonemail.de> <4D71A75A-5722-457C-A5CE-98CE51A53450@vodafonemail.de> <975EC414-6A81-444B-9BB0-AE303C6A9511@vodafonemail.de> <20201022194630.597302a2@scratchpost.org> <87eelpp0pn.fsf@gnu.org> <20201024033051.00720ac1@scratchpost.org> <87a6wbiofb.fsf@gnu.org> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/1kkicjp4rvHwH=kuatN1toZ"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.39 X-TUID: 8jwrkxFf0l1i --Sig_/1kkicjp4rvHwH=kuatN1toZ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Sat, 24 Oct 2020 18:22:48 +0200 Ludovic Court=C3=A8s wrote: > >> (bootloader-chain grub-efi-netboot-bootloader > >> (list (file-append u-boot "/libexec/u-boot.bin") > >> (file-append firmware "/firmware"))) =20 > > > > Ohhh! That's right. That's much better. Can a profile be created wit= h those > > in it? Especially because of the profile hook... =20 >=20 > Yes, there=E2=80=99s first-class objects that one can use in ge= xps: >=20 > (profile (content (manifest (entries =E2=80=A6)))) Nice! I haven't used those before, so no idea whether it would be better here. > Sorry, I don=E2=80=99t see why this prevents an API that more closely mat= ches > the idea of a chain of bootloaders (but perhaps I=E2=80=99d just need to = spend > more time studying this.) It doesn't prevent that API--but this narrow use case here doesn't need it. And I do not intend to implement the general use case--we all decided again= st general chainloading and then introduced full support for bootloaders other than grub (which then do not chainload grub--they totally could have!). But this use case with lots of bootloaders on an ESP partition (or Raspberr= y Pi equivalent) is easy enough. Maybe we should change the name of the main procedure to be less general, though. "chain-esp-bootloaders" ? If you could check it out more, that would help. I think how the patch is now is fine for the narrow use case: chainloading the normal guix bootloader using other bootloaders (or whatever else! Maybe a turtle is loading the f= inal guix bootloader--who knows ;) ). The code here can only chain bootloaders in the ESP partition (actually, the Raspberry Pi equivalent of the latter). > >>bootloader-profile =20 > > =20 > >> Yes, if it=E2=80=99s about building a profile, you could just use a > >> object. Would that work here? =20 > > > > Huh? Isn't he doing that already? > > > > That's what that procedure does. Or am I misunderstanding? =20 >=20 > It=E2=80=99s not using code from (guix profiles) IIRC. =46rom the patch: >+(define (bootloader-profile packages package-contents files) >[...] >+ (profile (content (packages->manifest packages)) >+ (name "bootloader-profile") >+ (hooks (list bootloader-collection)) >+ (locales? #f) >+ (allow-collisions? #f) >+ (relative-symlinks? #f))) Maybe I don't understand what you mean... but that "profile" is from (guix profiles). In any case, maybe we should just call it "esp-bootloader-chain" or maybe just "raspberry-pi-bootloader-chain". --Sig_/1kkicjp4rvHwH=kuatN1toZ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl+Ux+kACgkQ5xo1VCww uqUE/ggAhTYWhzDug/JbwSaL2akUe5n4xpx3mMcVtfyhk+FCMjcemeY3CaNHKFb5 QFnQkCLgd7CKY1rRizXpKHROhydZ8Mp0W4n7EC9FQUSrKMBY77CvPNbH6fbFx4HE uQo8TfCLFH70ZYeTENzSPq4zkENSQ1AmAXfD2hwppmJYzvFG+8Tr3suv4z4iTeei 694xqCzyD7mM2D/JEWVHQHejeYbBKhDXRHWi2JK2zJ/KkX5yhFxoP3z235Whhlq/ dP07Ao2yNS35om51bFILgd/6dcR7vVXDSfkdsVY3O9ydEIxtFY9EchIWl3rXydTJ c9+MjFyIJKUpBJ9iFhtEfhdzM8bh1w== =cE7A -----END PGP SIGNATURE----- --Sig_/1kkicjp4rvHwH=kuatN1toZ--