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 qLqlJNJjtV/4UwAA0tVLHw (envelope-from ) for ; Wed, 18 Nov 2020 18:11:30 +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 gPRvINJjtV+wPwAAbx9fmQ (envelope-from ) for ; Wed, 18 Nov 2020 18:11:30 +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 0509C940149 for ; Wed, 18 Nov 2020 18:11:29 +0000 (UTC) Received: from localhost ([::1]:42052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfRvU-0000Nv-PY for larch@yhetil.org; Wed, 18 Nov 2020 13:11:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfRrC-0005me-SM for guix-patches@gnu.org; Wed, 18 Nov 2020 13:07:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfRrC-0000PN-I0 for guix-patches@gnu.org; Wed, 18 Nov 2020 13:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kfRrC-00052d-C7 for guix-patches@gnu.org; Wed, 18 Nov 2020 13:07:02 -0500 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: Wed, 18 Nov 2020 18:07: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: Stefan Cc: 41066@debbugs.gnu.org, Mathieu Othacehe , Efraim Flashner , Maxim Cournoyer Received: via spool by 41066-submit@debbugs.gnu.org id=B41066.160572277219321 (code B ref 41066); Wed, 18 Nov 2020 18:07:02 +0000 Received: (at 41066) by debbugs.gnu.org; 18 Nov 2020 18:06:12 +0000 Received: from localhost ([127.0.0.1]:36440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfRqN-00051Y-Lq for submit@debbugs.gnu.org; Wed, 18 Nov 2020 13:06:11 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:45692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfRqJ-00051M-8t for 41066@debbugs.gnu.org; Wed, 18 Nov 2020 13:06:10 -0500 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id ABAD3336066C; Wed, 18 Nov 2020 19:06:04 +0100 (CET) Date: Wed, 18 Nov 2020 19:05:59 +0100 From: Danny Milosavljevic Message-ID: <20201118190559.1f9fed82@scratchpost.org> In-Reply-To: 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> <20201116103346.55ff8422@scratchpost.org> <20201117164755.1a27422b@scratchpost.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_/rRLsv7NFicm8sG6adOME+zT"; 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: ns3122888.ip-94-23-21.eu 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: m2dMK/aWvtLb --Sig_/rRLsv7NFicm8sG6adOME+zT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Stefan, On Tue, 17 Nov 2020 21:27:42 +0100 Stefan wrote: > For example the profile contains at least these folders from the grub pac= kage, plus the collection/: >=20 > /gnu/store/=E2=80=A6-bootloader-profile/collection > /gnu/store/=E2=80=A6-bootloader-profile/etc > /gnu/store/=E2=80=A6-bootloader-profile/share > /gnu/store/=E2=80=A6-bootloader-profile/lib > /gnu/store/=E2=80=A6-bootloader-profile/bin > /gnu/store/=E2=80=A6-bootloader-profile/sbin Ohhh, that's right. It actually contains the grub installer--which it got = from the grub-efi derivation. The actual boot EFI file is not in the grub-efi derivation. I wonder if it is possible (one day!) to have a package that actually conta= ins the EFI boot file that the grub installer generated. That would be a lot nicer--though I'm not sure whether that stuff depends on the system and thus cannot be "pre-generated". > But the /boot/ folder finally contains something like this, with most of = it being content from the collection/, where the GRUB files get installed b= elaw /boot/efi/: >=20 > /boot/bcm2710-rpi-3-b.dtb > /boot/bootcode.bin > /boot/bootloader.txt > /boot/config.txt > /boot/custom.txt > /boot/efi/ > /boot/fixup.dat > /boot/gnu/ > /boot/grub/ > /boot/overlays/ > /boot/u-boot.bin >=20 > Actually one could say that the profile hook is a kind of =E2=80=98pre-in= staller=E2=80=99 for everything not related to GRUB, able to prepare everyt= hing, but unable to write into the /boot folder. >=20 > > If there are no good reasons to do it like that, I'd just put the > > profile into $output directly instead--it's easier to understand, and a= lso it's > > how other profiles are being used. =20 >=20 > Not having the collection folder would mean that the installer would need= to assume much more about the result of the profile hook, to copy the righ= t files to /boot. I agree. Let's leave it inside subdir "collection". > > (2) The COPY-FILES? flag is kinda weird. > > I would prefer if INSTALLER just defaulted to a procedure that: does co= py > > files, and then calls the final bootloader installer. > > If the user doesn't want it then the user could still pass a INSTALLER > > that doesn't (for example the user could pass #:installer > > (bootloader-installer final-bootloader)). =20 >=20 > Agreed. > Another possibility would be to remove the collection folder within a hoo= k. I don't like that that much because it's mutating too much and thus composability goes down. > > I would prefer if the user would just change the INSTALLER in the case = he wants > > to not use the profile (which is kinda weird?!) or pack it or whatever.= =20 >=20 > OK, I see, in case of a custom installer we can skip the copying complete= ly. That makes sense.=20 Could you send an updated patch that does it like that? Or do you rather w= ant the old variant ? > > (3) Why isn't the final bootloader installed last? I would have expect= ed > > it to be installed last so that if it does packing of the profile conte= nts > > in order to quickly find it at boot, it would have to have all the files > > of the profiles already, no? =20 >=20 > I thought about the order as well. My conclusion was that a file from the= collection should be able to overwrite a file installed from final-bootloa= der, for example to install own device-tree files. Yeah, that makes sense--if a little unusual (thus should be documented). --Sig_/rRLsv7NFicm8sG6adOME+zT Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl+1YocACgkQ5xo1VCww uqV6YAgAhtQPVeHSg98Cr8TqymrJJ86pgWQFpxSYaIQvbcXgdaWdFwDGv1Y1DPi0 X9nrmL1aw97NX81PFghjuHeMoEVqMDRdrEvSNlf7xyJZ4XEHdzH6vgl2zd9r5xfb jp6mAhtO7zFB+kYUHvy6gzVvtUCeDARbXlF6i954dkSw4cY+/mMUn6SBncLh0Bym rzqovKaKlk67tb4nz4jUY8b3z1rL8zfoxB0KFwVS8u8QX/NwFS80cO28I5DTLW3r A7bHeczgVE+LOKT4/iRWKj0YVWNphsdP9qnVClfUmA4UtiyG/rGiK5NDNVDtcXej i8+VHkZoJnY5KLuGO+R+5aSf817s4A== =ncES -----END PGP SIGNATURE----- --Sig_/rRLsv7NFicm8sG6adOME+zT--