From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YCzKML028mJZEQAAbAwnHQ (envelope-from ) for ; Tue, 09 Aug 2022 12:28:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KL+6ML028mKMYgAAauVa8A (envelope-from ) for ; Tue, 09 Aug 2022 12:28:13 +0200 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 4EF83E1A1 for ; Tue, 9 Aug 2022 12:28:13 +0200 (CEST) Received: from localhost ([::1]:36164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLMT6-0008Tw-Fv for larch@yhetil.org; Tue, 09 Aug 2022 06:28:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMSw-0008TP-RQ for guix-patches@gnu.org; Tue, 09 Aug 2022 06:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLMSw-0001f3-Ii for guix-patches@gnu.org; Tue, 09 Aug 2022 06:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLMSw-0006VE-EH for guix-patches@gnu.org; Tue, 09 Aug 2022 06:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR Resent-From: Reza Alizadeh Majd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Aug 2022 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57070 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57070@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166004086524945 (code B ref -1); Tue, 09 Aug 2022 10:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Aug 2022 10:27:45 +0000 Received: from localhost ([127.0.0.1]:42614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLMSf-0006UG-5s for submit@debbugs.gnu.org; Tue, 09 Aug 2022 06:27:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:51646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLMSd-0006U9-NI for submit@debbugs.gnu.org; Tue, 09 Aug 2022 06:27:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMSd-0008Qc-IO for guix-patches@gnu.org; Tue, 09 Aug 2022 06:27:43 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:60797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMSb-0001dX-G0 for guix-patches@gnu.org; Tue, 09 Aug 2022 06:27:43 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8921F320083A for ; Tue, 9 Aug 2022 06:27:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 09 Aug 2022 06:27:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1660040858; x=1660127258; bh=plk4gqNeVR b9bvddwShSYgV43GC4hKHFUOLZDA298hs=; b=tNB7qLh/BIvxpiA//JyEA9eQGd UJyIc67Zuql7vSJcL0sybiclovKbNX3Ax0no1iBxb4NW4R3JVWxHc1XAVo9Ln70U sisGbwtU1EohIL1/xyAn6G9BOltQLbyV/13G3rFqS3OUU/U225vkUrgqjuxXqJOw d/VSw8Mpp6Z2Kpi6WNL1GOn9TGqJXhPMFMR90ZjjHitTXx5W8AIcViZ7L5yiQMeX ceFQsXGijpGnu6vlqu6MSUdJiE0S9sU/LctMrjpcTC3uitwWUJ+HowjUdhOHHLK3 kaboGyiCVCN0b4bNEovj08/9lieKsRA+powPF+KLVHIH8vyq8uzDGNAJYw5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=1660040858; x=1660127258; bh=plk4gqNeVRb9bvddwShSYgV43GC4 hKHFUOLZDA298hs=; b=nn706G2o7Pe6yVyGb/Nt9UUMzW0qzgiRkIQmM/mkYvB2 1rv66nOsXlUYfKBvvOL/9hVku1w5tdho4P/ten4+NJ1eARByybQbLoT50vtMNsw6 8l9phprUVVLxloyC9fpVeU/cncb2LLVn6MMsNtpUiBCh0fTT/mIm8AHgFpWSSHS2 CpJxG+KyHNdofdhq1xaGEiOpJLiVpPaeJAjwvcfVUbYRtpuvmaIp8e54uDHsXQhS shK2WsPa+qRNqcigLUE+FVFKIvmhXbFyqYNpN/i3CVhaasqPsbBfZd7uteR4aaBv iAPuXASv8gCPXCaWa2KwhsDkJ5HjXp8fPUkPEjU1Jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdegtddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkohfogggtgfesthhqre dtredtjeenucfhrhhomheptfgviigrucetlhhiiigruggvhhcuofgrjhguuceorhdrmhgr jhgusehprghnthhhvghrgidrohhrgheqnecuggftrfgrthhtvghrnhepffevfeefffeghf dvleehieduteevheethfekkefgteeugfehhfefvedvheeufedtnecuffhomhgrihhnpehp rghnthhhvghrgidrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehrrdhmrghjugesphgrnhhthhgvrhigrdhorhhg X-ME-Proxy: Feedback-ID: i063944dc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Aug 2022 06:27:36 -0400 (EDT) Date: Tue, 9 Aug 2022 14:57:30 +0430 From: Reza Alizadeh Majd Message-ID: <20220809145730.435ef8d0@pantherx.org> Organization: PantherX X-Mailer: Claws Mail 4.1.0 (GTK 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=64.147.123.24; envelope-from=r.majd@pantherx.org; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660040893; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=plk4gqNeVRb9bvddwShSYgV43GC4hKHFUOLZDA298hs=; b=ZzRBMP+B0w24tw84Q+iTURBJ1BR2NZSN5K9Msivmj17Vklz5yTF6x8V1wAtz4E4UeKvLMu VSPzKaFyMukjph5EV0ugUsTLHEQQ9RIJ1LUOFkngLzAJaLmvGKhBstVRwtDrVj2uUioV1k H0TA1otNtqMFE5vT7uMce+972iTq0jLCb37g3c1wLnvxXpMe9IOjqjxgf8gPZ7UUHABPMC vx6nuu/TW71im+w++F/T2ryb5vGTgtQklQVGl3fs4S2EYRmNxfOu1c/PWoK3vfR2x8zP0E hhe5v8n178lKh0Z8fX63evLj5pJnFa6nwdrTNW5BDpy+PKlTh9b+T1bd23Fc5g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660040893; a=rsa-sha256; cv=none; b=o+/bDHXrP8j9su/Qx88iDShJDaK9icLWHUKtGttj+oPYGLOrOxMiTFmUoG8xGb0ZMP6tnM Pvehc+Yjnu0dO+SilNPQbb4PkLuwMVbXtL7sDZ4dhl5AKHnVJ+CuVB4e/DHOrBCs5iWPtI a/h3N8u31Y2xN62mmGRIF/jhNp59ijPXCxHdde8PcduVjVGDj02qGi3JW0r1eYFWIwllHX dx5n+hZmLJn51AEdVxxTA2MSn06siZd+lGh7/uy9s7m8LskcrAI50SwU4pf9E8e/uhqfD4 GVjh9Tl2093tX95c7eopE9Xb1/aQkC/K0M3lqGKZ83PpWp2mjTLqLIkJ1zxtcw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b="tNB7qLh/"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=nn706G2o; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b="tNB7qLh/"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=nn706G2o; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4EF83E1A1 X-Spam-Score: 0.81 X-Migadu-Scanner: scn1.migadu.com X-TUID: /ZYeXB2oEauL There are situations that u-boot doesn't have to load from the device tree. some provide the device tree using a vendor bootloader (like what raspberry-pi does) or with an external bootloader that chainloads the u-boot (what Asahi does for m1n1 bootloader).=20 Unfortunately we couldn't find any reliable document to enforce u-boot to pass the device tree via `extlinux.conf`, however during our tests, we found that removing the `FDTDIR` line from the `extlinux.conf` tend us to do so. There is also no reliable way to guess if u-boot bootloader should load device tree or not on a specific hardware. in addition, there are hardware that can be booted with both firmware device tree on some kernels and with special device tree on other (modified) kernels.=20 so we propose the following patch to define an optional parameter in `bootloader` record, called `ignore-fdtdir?` which by default is set to `#f` to keep the current behavior unchanged. if this paramter is set to `#t`, the `FDTDIR` line will be discarded from the `extlinux.conf` and u-boot doesn't load the device tree automatically. This patch was tested on a Raspberry PI and in a VM. It is proven to preserve the old behavior. We=E2=80=99d love to hear your feedback and hope= we can support more arm hardware in the future. Regards, Reza --=20 Reza Alizadeh Majd PantherX Team https://pantherx.org