From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kA3NA+GDk19aaQAA0tVLHw (envelope-from ) for ; Sat, 24 Oct 2020 01:31:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oAIsO+CDk1/1aQAAB5/wlQ (envelope-from ) for ; Sat, 24 Oct 2020 01:31:12 +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 7E7849401BE for ; Sat, 24 Oct 2020 01:31:12 +0000 (UTC) Received: from localhost ([::1]:56176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kW8Oj-0001J4-Ns for larch@yhetil.org; Fri, 23 Oct 2020 21:31:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kW8Oc-0001Il-P7 for guix-patches@gnu.org; Fri, 23 Oct 2020 21:31:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47217) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kW8Oc-0007cO-8w for guix-patches@gnu.org; Fri, 23 Oct 2020 21:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kW8Oc-0006GM-4u for guix-patches@gnu.org; Fri, 23 Oct 2020 21:31:02 -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: Sat, 24 Oct 2020 01:31:02 +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.160350306124067 (code B ref 41066); Sat, 24 Oct 2020 01:31:02 +0000 Received: (at 41066) by debbugs.gnu.org; 24 Oct 2020 01:31:01 +0000 Received: from localhost ([127.0.0.1]:58763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW8Ob-0006G7-2X for submit@debbugs.gnu.org; Fri, 23 Oct 2020 21:31:01 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:56476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW8OX-0006Fx-8F for 41066@debbugs.gnu.org; Fri, 23 Oct 2020 21:30:59 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 51A3F3363A8C; Sat, 24 Oct 2020 03:30:54 +0200 (CEST) Date: Sat, 24 Oct 2020 03:30:51 +0200 From: Danny Milosavljevic Message-ID: <20201024033051.00720ac1@scratchpost.org> In-Reply-To: <87eelpp0pn.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> 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_/2DlCA5G10_20G7KKdhuhXo4"; 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: NNS16vTBXmn2 --Sig_/2DlCA5G10_20G7KKdhuhXo4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Fri, 23 Oct 2020 14:48:36 +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"))) Ohhh! That's right. That's much better. Can a profile be created with th= ose in it? Especially because of the profile hook... > I think we should look at how to simplify this interface. Intuitively, > I would expect the =E2=80=98bootloader-chain=E2=80=99 to take a list of <= bootloader> > records and return a record. > Is this something that can be achieved? If not, what are the extra > constraints that need to be taken into account? That is not easily possible, and is also logically not what happens anyway. The use case of this entire patchset is when one (for some reason) can't bo= ot the final bootloader directly, then one uses some chain of bootloaders to get the final bootloader to boot. That especially means that all the bootloaders before the final bootloader WILL NOT GET THE GUIX GENERATIONS MENU. It is also pretty uncommon/impossible to use each usual bootloader installer in order to install all the bootloaders one after another. Just think of what would happen if multiple x86_64 bootloaders all tried to install themselves into the first sector of the drive. That's not gonna work correctly. What actually happens is that there's some kind of payload area in the first bootloader where you can put the second bootloader, and some kind of payload area in the second bootloader where you can put the third bootloader... and= so on. Except for the final bootloader, which has the Linux kernel in the pay= load area (as far as the final bootloader is concerned, it can do everything as = if it was the first and only thing that was loaded at boot so far). That means the final bootloader can use the normal config files and general= ly proceed like all our standalone bootloaders do. None of the previous bootl= oaders in the chain can do that, generally. >bootloader-profile > Yes, if it=E2=80=99s about building a profile, you could just use a > object. Would that work here? Huh? Isn't he doing that already? That's what that procedure does. Or am I misunderstanding? > >From a quick look at the patch, I don=E2=80=99t fully understand yet wha= t=E2=80=99s =20 > going on. I suggested to Stefan to use a profile with a profile hook in order to configure all those bootloaders of a bootloader chain correctly. That's what he does here. Usually, Guix bootloader *packages* have a lot of junk that (1) you wouldn't want on a esp partition (wastes space) and also stuff that would be duplica= tes with other bootloaders (COPYING etc). Therefore, it's nice to be able to filter what files of those packages get used. I think your suggestion in t= he beginning is the best one. (file-append u-boot "/libexec/u-boot.bin") inde= ed! The profile hook can then use whatever methods to configure all those bootloaders correctly. --Sig_/2DlCA5G10_20G7KKdhuhXo4 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl+Tg8sACgkQ5xo1VCww uqUeZQgAo67Se5YiIqjMFWvoQTCmCGRpkVYaM28IkNoRFxY2mOroQWvFzRSONi2B 7JRzJJSHXOwg6HMZbW7epbvOD/deNEn+3NK7xWP3sJN/pnQgtmZTDIOFsXX0VfIn HSAm2prDA3lqDVr59kRTUl8rXllfNqkrfWsfQnlrdC/Pw9GHXu6/XRp3KCYwX9n5 mNYVXbPUnPjlujn9H5LZwygg6zsryC1ZzsVAmrHuQh2ebdMuhdaLKvrU7K70Ouaa BIz07HimYjo/15fptJSZfyjOIwLXrPSb1oHDfQxHhM64TrhecZV1eYhy2A5xbmG1 lDKm1lx3gfSNrMcy4l8D4GAgidIxPw== =Xy83 -----END PGP SIGNATURE----- --Sig_/2DlCA5G10_20G7KKdhuhXo4--