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 qKrpJ6gytF9IbgAA0tVLHw (envelope-from ) for ; Tue, 17 Nov 2020 20:29:28 +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 QC7hI6gytF/NNwAAB5/wlQ (envelope-from ) for ; Tue, 17 Nov 2020 20:29:28 +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 4CE4594042B for ; Tue, 17 Nov 2020 20:29:28 +0000 (UTC) Received: from localhost ([::1]:34954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf7bT-0005bu-4B for larch@yhetil.org; Tue, 17 Nov 2020 15:29:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf7b4-0005a6-M7 for guix-patches@gnu.org; Tue, 17 Nov 2020 15:29:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kf7b4-000191-Cc for guix-patches@gnu.org; Tue, 17 Nov 2020 15:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kf7b4-0005Nw-9i for guix-patches@gnu.org; Tue, 17 Nov 2020 15:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#41066] [PATCH] gnu: bootloader: Support for chain loading. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 17 Nov 2020 20:29: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: Danny Milosavljevic Cc: 41066@debbugs.gnu.org, Mathieu Othacehe , Efraim Flashner , Maxim Cournoyer Received: via spool by 41066-submit@debbugs.gnu.org id=B41066.160564488220631 (code B ref 41066); Tue, 17 Nov 2020 20:29:02 +0000 Received: (at 41066) by debbugs.gnu.org; 17 Nov 2020 20:28:02 +0000 Received: from localhost ([127.0.0.1]:33055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf7a6-0005Md-Aw for submit@debbugs.gnu.org; Tue, 17 Nov 2020 15:28:02 -0500 Received: from mx009.vodafonemail.xion.oxcs.net ([153.92.174.39]:9829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf7a4-0005M3-0y for 41066@debbugs.gnu.org; Tue, 17 Nov 2020 15:28:01 -0500 Received: from vsmx002.vodafonemail.xion.oxcs.net (unknown [192.168.75.192]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTP id 6D215603F12; Tue, 17 Nov 2020 20:27:54 +0000 (UTC) Received: from macbook-pro.kuh-wiese.my-router.de (unknown [145.254.41.84]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 3C912604278; Tue, 17 Nov 2020 20:27:43 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Stefan In-Reply-To: <20201117164755.1a27422b@scratchpost.org> Date: Tue, 17 Nov 2020 21:27:42 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: 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: Apple Mail (2.3124) X-VADE-STATUS: LEGIT X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) 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.99 X-TUID: 24UK82/g5VzQ Hi Danny! > I've reviewed and pushed the first part (s;HOOK;HOOKS;) now as guix = master > commit ede4117f7f18e118003f2599f5c8e985dfbdf9a5. OK, thanks. > Could you explain what this is for in your use case? I don't yet = understand > the reason for this complexity. Sure. > (1) Why is there a $output/collection subdirectory? Is there = something > else than that in the profile output? =20 The profile contains first of all the GRUB package with all its tools = and files. This profile is the =E2=80=98package=E2=80=99 argument to the = GRUB installer. Having the profile hook create the collection folder = eases the task for an installer. The simple idea is to copy all the = additional files along with the installed GRUB bootloader into /boot. = Without the collection/ the installer would require the list of files as = well and reimplement the same functionality as already inside the hook, = to copy the files into the /boot/ folder. For example the profile contains at least these folders from the grub = package, plus the collection/: /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 But the /boot/ folder finally contains something like this, with most of = it being content from the collection/, where the GRUB files get = installed belaw /boot/efi/: /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 Actually one could say that the profile hook is a kind of = =E2=80=98pre-installer=E2=80=99 for everything not related to GRUB, able = to prepare everything, but unable to write into the /boot folder. > 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 = also it's > how other profiles are being used. 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 right files to /boot. > (2) The COPY-FILES? flag is kinda weird. > I would prefer if INSTALLER just defaulted to a procedure that: does = copy > 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)). Agreed. Another possibility would be to remove the collection folder = within a hook. > 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. OK, I see, in case of a custom installer we can skip the copying = completely. That makes sense.=20 > (3) Why isn't the final bootloader installed last? I would have = expected > it to be installed last so that if it does packing of the profile = contents > in order to quickly find it at boot, it would have to have all the = files > of the profiles already, no? 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-bootloader, for example to install own device-tree files. What do think? Bye Stefan=