From patchwork Tue Aug 9 10:30:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reza Alizadeh Majd X-Patchwork-Id: 41428 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 86E1027BBEA; Tue, 9 Aug 2022 11:32:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E9A4327BBE9 for ; Tue, 9 Aug 2022 11:32:20 +0100 (BST) Received: from localhost ([::1]:39652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLMX4-0002zR-DZ for patchwork@mira.cbaines.net; Tue, 09 Aug 2022 06:32:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMWo-0002z1-HB for guix-patches@gnu.org; Tue, 09 Aug 2022 06:32:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLMWn-0002T9-VI for guix-patches@gnu.org; Tue, 09 Aug 2022 06:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLMWn-0006fT-Om for guix-patches@gnu.org; Tue, 09 Aug 2022 06:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR References: <20220809145730.435ef8d0@pantherx.org> In-Reply-To: <20220809145730.435ef8d0@pantherx.org> Resent-From: Reza Alizadeh Majd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Aug 2022 10:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57070 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57070@debbugs.gnu.org Cc: Reza Alizadeh Majd Received: via spool by 57070-submit@debbugs.gnu.org id=B57070.166004107125558 (code B ref 57070); Tue, 09 Aug 2022 10:32:01 +0000 Received: (at 57070) by debbugs.gnu.org; 9 Aug 2022 10:31:11 +0000 Received: from localhost ([127.0.0.1]:42653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLMVz-0006e9-1T for submit@debbugs.gnu.org; Tue, 09 Aug 2022 06:31:11 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:53033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLMVt-0006d9-Gw for 57070@debbugs.gnu.org; Tue, 09 Aug 2022 06:31:10 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BE0CD32002F9; Tue, 9 Aug 2022 06:30:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 09 Aug 2022 06:30:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1660041058; x=1660127458; bh=M8+JU0JgxZbiqlyTSQPFcUIH0 N2UICjCr8S7WWw1Ytc=; b=Wa6j4SyBf3mBunOVE8YcPFujl0O9/AidQbyVkpP/a n+pYer0OM9MEOTyQAmlVaLGd+/hSIqlQEQ3wZ7ZZ2HVzFFTURDhHBfhEwC/Krrea uhYQgbg/RnOUFEUVRh3GL7hSH7F7sPlI1dU6LFx8S2MxQkGQfsgxMrTK6V/5OYkO TtOlOGte8sv64dPrB0Esu73w5JkVdpr1BI2+2J67jtlfz5VOsFo2dkCIPqsUu1yk t44ktlQWb2VUd5l6Pj383WSoz4GBOrF32TDjq5ZnLTaG6IUMTbwHlJKgjP5eXL4V SWCaeAlOlbDb2DRmZIsJQhifHD8MpDMvy7JBhOPnns9Yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1660041058; x=1660127458; bh=M8+JU0JgxZbiqlyTSQPFcUIH0N2UICjCr8S 7WWw1Ytc=; b=5B4bNdnp7IcL/O3SNyjpifAiCIuAy2PsMM0W5Uuiok5r+gyvnDN gpKyzYHVK2z+ddZJyyrfhFFfLTx13Arjt3cxY3qaLIUhmwLOwGJcQQkubD4Xm+Ty 28BTrTsVEVp1Nk7riXKvjSplaKn2ruOfXhNYZH+wCDP29DjBwcCVVKH4HhrnJl4f HaXduvAX4CzrV/wmPbMF9v+QVDpiMWNl8nf60f52AdUdM8KC5ZvQ1Q2kYWwPW18w G0QcJ0pgmgJthLdB8IU+MZhKTD0VKuMVnMwnjX9p9O6yj7e4wFRXhyhECye58hhE IGREgJu1+xdBJ85j1UGYWiZYEQ+Kw17KQhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdegtddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeftvgiirgcutehlihiirgguvghhucforghjugcuoehrrdhmrghj ugesphgrnhhthhgvrhigrdhorhhgqeenucggtffrrghtthgvrhhnpefgheejhfelhfeuhe etvdfgieeffeekvdelkedujeeuvdejjedvheehffdvfeegkeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrdhmrghjugesphgrnhhthhgvrh igrdhorhhg X-ME-Proxy: Feedback-ID: i063944dc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Aug 2022 06:30:55 -0400 (EDT) From: Reza Alizadeh Majd Date: Tue, 9 Aug 2022 15:00:44 +0430 Message-Id: <20220809103044.27964-1-r.majd@pantherx.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.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 * gnu/bootloader.scm ()[ignore-fdtdir?]: new field. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): add FDTDIR line based on bootloader field of . --- gnu/bootloader.scm | 5 ++++- gnu/bootloader/extlinux.scm | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 9cf5457873..acf51bff7a 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -54,6 +54,7 @@ (define-module (gnu bootloader) bootloader-disk-image-installer bootloader-configuration-file bootloader-configuration-file-generator + bootloader-ignore-fdtdir? bootloader-configuration bootloader-configuration? @@ -173,7 +174,9 @@ (define-record-type* (disk-image-installer bootloader-disk-image-installer (default #f)) (configuration-file bootloader-configuration-file) - (configuration-file-generator bootloader-configuration-file-generator)) + (configuration-file-generator bootloader-configuration-file-generator) + (ignore-fdtdir? bootloader-ignore-fdtdir? + (default #f))) ;;; diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm index 6b5ff298e7..084ed1e7c9 100644 --- a/gnu/bootloader/extlinux.scm +++ b/gnu/bootloader/extlinux.scm @@ -38,6 +38,10 @@ (define* (extlinux-configuration-file config entries (define all-entries (append entries (bootloader-configuration-menu-entries config))) + (define ignore-fdtdir? + (let ((bootloader (bootloader-configuration-bootloader config))) + (bootloader-ignore-fdtdir? bootloader))) + (define (menu-entry->gexp entry) (let ((label (menu-entry-label entry)) (kernel (menu-entry-linux entry)) @@ -46,12 +50,16 @@ (define (menu-entry->gexp entry) #~(format port "LABEL ~a MENU LABEL ~a KERNEL ~a - FDTDIR ~a/lib/dtbs + ~a INITRD ~a APPEND ~a ~%" #$label #$label - #$kernel (dirname #$kernel) #$initrd + #$kernel + (if (not #$ignore-fdtdir?) + (string-append "FDTDIR " (dirname #$kernel) "/lib/dtbs") + "") + #$initrd (string-join (list #$@kernel-arguments))))) (define builder