From patchwork Sat Mar 27 22:03:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan X-Patchwork-Id: 28142 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 70A6227BD07; Sat, 27 Mar 2021 22:04:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CF62227BD06 for ; Sat, 27 Mar 2021 22:04:27 +0000 (GMT) Received: from localhost ([::1]:59854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQH2g-00075z-Se for patchwork@mira.cbaines.net; Sat, 27 Mar 2021 18:04:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQH2J-00075g-9b for guix-patches@gnu.org; Sat, 27 Mar 2021 18:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQH2I-0001cO-Ba for guix-patches@gnu.org; Sat, 27 Mar 2021 18:04:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQH2I-0002fF-5p for guix-patches@gnu.org; Sat, 27 Mar 2021 18:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Mar 2021 22:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44543 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?utf-8?q?L=C3=A9o?= Le Bouter Cc: Danny Milosavljevic , 44543@debbugs.gnu.org, Mathieu Othacehe Received: via spool by 44543-submit@debbugs.gnu.org id=B44543.161688260710195 (code B ref 44543); Sat, 27 Mar 2021 22:04:02 +0000 Received: (at 44543) by debbugs.gnu.org; 27 Mar 2021 22:03:27 +0000 Received: from localhost ([127.0.0.1]:45110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQH1i-0002eM-Uw for submit@debbugs.gnu.org; Sat, 27 Mar 2021 18:03:27 -0400 Received: from smtpout2.vodafonemail.de ([145.253.239.133]:33898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQH1f-0002e9-RF for 44543@debbugs.gnu.org; Sat, 27 Mar 2021 18:03:26 -0400 Received: from smtp.vodafone.de (smtpa04.fra-mediabeam.com [10.2.0.35]) by smtpout2.vodafonemail.de (Postfix) with ESMTP id 6CF0C120CEF; Sat, 27 Mar 2021 23:03:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-smtpout-mb-15sep; t=1616882598; bh=vWs2JAuIUQGRE8PW4hZHSk7ZXRoAmeIwmmKRuA4IPQ0=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=NPedW1hXvEu+ft0NqosZ5xYamHBerX/M5/NPMOoYJI4f9vSoSnMFkHdKZ5Gmo6bN4 P1f1EbAFEOc7WX59SgB7W1u71bqKcR3MXusE2qzGblyDIu9tFFp4YYIMq2d5hGmwza sxgdagdAVrhzovhHHQiiwpBM+hTh2oEwt6+h/XJA= Received: from macbook-pro.kuh-wiese.my-router.de (ipservice-092-218-117-078.092.218.pools.vodafone-ip.de [92.218.117.78]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id C0BFD14017C; Sat, 27 Mar 2021 22:03:15 +0000 (UTC) Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Stefan In-Reply-To: <832c926ec211cab21f63ed9578c67662db7426cf.camel@zaclys.net> Date: Sat, 27 Mar 2021 23:03:15 +0100 Message-Id: <067A8489-6150-4632-878C-BB239B1674FD@vodafonemail.de> References: <20201116103231.2c151d33@scratchpost.org> <6C52CE60-8585-4FC4-BCBC-B901CB75B35F@vodafonemail.de> <20201116150108.26a2daa7@scratchpost.org> <422D2441-7132-4983-9EFF-E6C87120CCCB@vodafonemail.de> <9537F85E-03CA-4784-85BD-0637C7A16F31@vodafonemail.de> <832c926ec211cab21f63ed9578c67662db7426cf.camel@zaclys.net> X-Mailer: Apple Mail (2.3124) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 2903 X-purgate-ID: 155817::1616882596-00004492-1A99838C/0/0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Léo! > I would prefer if you opened one single bug with all the changes so I > can test the whole thing, right now I don't feel at ease reviewing > things like this. I see. I’m doing little steps, sending patches for the parts which I think are ready. > How can I be sure what you are submitting is the > right abstraction for your future work? True. In this case you only have the bootloader examples that I gave. This patch is just a building block to generate some config.txt in a modular and comfortable way. There is a bootloader installer copying any listed file-like-object. Who knows, in future there might be a TianoCore bootloader, then a similar patch might be required to provide a raspi-tianocore-bootloader-txt. > Are you sure that abstraction > will be right for your future patches? Yes. There are basically three decisions to take for a Guix System: 32 or 64 bit, which device tree (depends on the linux kernel), which bootloader. Beyond this anything is a custom setting. > If anything needs to be changed > I feel like one big patchset about Raspberry Pi 3B+ support will be > easier to review (at least for me). I see, this is not yet testable for you out of the box to boot a system. What is testable right now is an incomplete bootloader. At least it is possible to inspect what files will be generated by this patch and copied into /boot. It must even be buildable for x86_64. (bootloader (bootloader-configuration (target "/boot") (bootloader (efi-bootloader-chain (list raspi-config-txt raspi-bcm27-dtb-txt raspi-u-boot-bootloader-txt) grub-efi-netboot-bootloader #:installer (chain-efi-bootloader-installer (install-grub-efi-netboot "efi/boot"))))) Bye Stefan P.S. If you change your mind and want to test that bootloader, then you should know that GRUB depends on qemu and unfortunately qemu is failing its test on aarch64 since some months. Then this patch may help you get going. diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 2262aa6197..3732320df8 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -161,8 +161,9 @@ (arguments `(;; FIXME: Disable tests on i686 to work around ;; . - #:tests? ,(or (%current-target-system) - (not (string=? "i686-linux" (%current-system)))) + #:tests? ,(and (not (target-aarch64?)) + (or (%current-target-system) + (not (string=? "i686-linux" (%current-system))))) #:configure-flags (list "--enable-usb-redir" "--enable-opengl" "--enable-docs"