From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0OsOIXL1A2NVEgEAbAwnHQ (envelope-from ) for ; Mon, 22 Aug 2022 23:30:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MGQoIHL1A2OH6AAAG6o9tA (envelope-from ) for ; Mon, 22 Aug 2022 23:30:26 +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 696552F711 for ; Mon, 22 Aug 2022 23:30:25 +0200 (CEST) Received: from localhost ([::1]:47842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQF04-0005AH-AL for larch@yhetil.org; Mon, 22 Aug 2022 17:30:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQEzj-00059L-1z for guix-patches@gnu.org; Mon, 22 Aug 2022 17:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQEzi-0004XY-EH for guix-patches@gnu.org; Mon, 22 Aug 2022 17:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQEzi-0007Lf-5g for guix-patches@gnu.org; Mon, 22 Aug 2022 17:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR Resent-From: Pavel Shlyak Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Aug 2022 21:30:02 +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: Maxime Devos Cc: 57070@debbugs.gnu.org Received: via spool by 57070-submit@debbugs.gnu.org id=B57070.166120376328175 (code B ref 57070); Mon, 22 Aug 2022 21:30:02 +0000 Received: (at 57070) by debbugs.gnu.org; 22 Aug 2022 21:29:23 +0000 Received: from localhost ([127.0.0.1]:41950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQEz4-0007KN-RR for submit@debbugs.gnu.org; Mon, 22 Aug 2022 17:29:23 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:46989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQEz2-0007K6-I7 for 57070@debbugs.gnu.org; Mon, 22 Aug 2022 17:29:21 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 630A95C00D6; Mon, 22 Aug 2022 17:29:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 22 Aug 2022 17:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1661203753; x=1661290153; bh=GbO5HxsfXK OFMmk+M1KCle4DU7rWzYBRAPQEvvp8+DU=; b=Al7Nhc3lrZuv3JvWIGtaTpxx1+ qgTWVLR9kE2gKYZSAFZwOUNkQgF91mmooz+OYvUZNHm/ZWzXAHkhwUA852gXykUz TAAoL5ZAZJspwBENcS87iSwwtAooCOm/3QXyMSC1wTuS65MzJSdT7JNRF2wgZPtH J4NPDl/pGmFGtOkYQ8iAkhy+jh4uim6L4q0JbOhtupYuYBgjitPnrnl42oLMQjNG ASqwIyA6Xa7BABJF/QAwxQtQErVMPcGaxGO9JHCGK75YY0Vy7hgCQ8+mxhbxSDtk mmh7yf19lrk6vFIsg23/v/aqFJ+bD+rMBWtgSStqfQjA+fpN58hH+T9UtgQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references: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=1661203753; x=1661290153; bh=GbO5HxsfXKOFMmk+M1KCle4DU7rW zYBRAPQEvvp8+DU=; b=O8G4kICFCc1kYlzPYHi4CJg0oHx2LRzVl2EpfkcWfvGR my0VJZ6d9p4Pm5JwCm1/Tz38+3zvQKensp3S8sQSubSo0WsZwgrnHPbS/ZennXdl BMUZBhYWWsgwH3Y3EOmoF1dk3UaOWfPIWT4q5IJFzYG2k1iQmzojik448s3Wa4Ay FtmXdUkUpoojCqlT2UC0AFNs+8udO3qy0wnLmlIxt2qMXt6NIoPnXuWyduwWfnJO NXWZNU4o07o/SVilyNgD5ddj8jM6/C1rinOdvDplS2g6IYxVPKcUHJ/GM30Gt4DH kIkt/8P+paYIghPSUllH2oZKvRJEBleEPGpwACNJVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeijedgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhkfgtggfuffgjvefvfhfosegrtdhmrehhtdejnecuhfhrohhmpefrrghv vghlucfuhhhlhigrkhcuoehprdhshhhlhigrkhesphgrnhhthhgvrhigrdhorhhgqeenuc ggtffrrghtthgvrhhnpeehjedugfekgffhjeekkeetfeehhfeffeevudeitdefiefffeei ffeuhffhieegteenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphdrshhhlhihrghksehprghn thhhvghrgidrohhrgh X-ME-Proxy: Feedback-ID: idda946d0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Aug 2022 17:29:12 -0400 (EDT) From: Pavel Shlyak Message-Id: <9C1A13AC-4FAA-4D45-8579-FF88D5E69A90@pantherx.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_14550530-0BF4-4FA0-BFD5-4253F3EAD310" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Date: Tue, 23 Aug 2022 00:29:11 +0300 In-Reply-To: References: <20220809145730.435ef8d0@pantherx.org> <483BAA4D-ADDE-43C2-B1E3-BADAD7C43E7D@pantherx.org> <85904cd4-576d-81d0-2cfc-05ff0ab802a6@telenet.be> <13223735-7417-4785-81F8-43715A135574@pantherx.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) 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=1661203826; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=GbO5HxsfXKOFMmk+M1KCle4DU7rWzYBRAPQEvvp8+DU=; b=UN4k5eNkh0GVD8HoSHC6WcAAreefHFDCKKsGdZEwOfpx0ns5doflBw+ft2Ew0j6mVdD9z7 ej2yn3uywJwHcmg1/lLzEc25es0q1XeHOiVGw9tBfWoKSA7Ybkaz1nyTUF26uM1MvHJ0WA wLBSnBNSB8QtAvPFrMea1pUqYucefqIKXTJ6oIhlwJ7RCa6UyDf2YnxV0KS9pJZV5Ajf1a hKmV72OEd2ZSLPD4xjtolDxYSTxIJP0RbOkA42jbmBUvhLsIUPKon+7LMML/aEMQ3UFi3x rD7yHdPsXkemvu381DWyLtwXXXJDbGELQY2l6G3VZVJze/gjw2kRwFZY5HWkrw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661203826; a=rsa-sha256; cv=none; b=GccJFkOl4Feyfz5MJZlHwmhU9ibLmYMF2tzVoBRk0v4JRDrV6Td4nybnGhzwLCnRXvdawA mZQhLx/TVoapzTyNMgg+03B8g4I2qO1MflwoQ4rNuWmX4K14fZLJCmF9b/Sl1kaiVfReIZ VG+KlpWhZxhJqHiFG6UPleA4SKLuYjpHK3HLBVjzTLHF2YwlgDNJedNkpE1gKUOoAHKugN snaZsuFT4wNbdIKh3bl+IImhAZhAnEmykDZxehjrW71xc2Rvmz2d9oasvIClaDzlb9srE5 /nMHK6Gz7dt9KlCbLK0DXhVhzxinIQQloTHMWllAKjESZ/RM07CBT4VKUneBFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=Al7Nhc3l; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=O8G4kICF; 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: 1.99 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=Al7Nhc3l; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=O8G4kICF; 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: 696552F711 X-Spam-Score: 1.99 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0CHFoA8BxbG8 --Apple-Mail=_14550530-0BF4-4FA0-BFD5-4253F3EAD310 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > That web page does not claim that anywhere. Here's a rough list of the DT changes performed by the firmware, besides = merging the obvious dtoverlays and dtparams: * Applying the "upstream" overlay, if "upstream_kernel=3D1". * Changing the CPU ID declarations on a Pi 2+ (BCM2837 vs BCM2836). * Adding i2c_vc and i2c_arm labels and aliases (and their relatives). * If the board has a POWER_LOW GPIO declared in dt-blob.bin, using that = to configure the pwr_led node. * Adding the Bluetooth flow control pins to the "uart0_pins" node, on = boards that support it. * Setting numerous items to /chosen - bootargs (the command line), = rpi-boardrev-ext, rpi-country-code (Pi 400), details of the bootloader = version, boot-mode, linux,initrd-start and linux,initrd-end. * Adding a copy of the bootloader configuration. * Loading the vl805 overlay on CM4s which have "VL805=3D1" in their = bootloader configuration. * Automatically loading overlays for supported cameras that are = detected. * Automatically loading overlays for the PoE HATs, switching between = firmware-driven and I2C-driven as needed. * Expanding the dma-ranges property of the emmc2bus node on BCM2711C0. * Disabling the old OTG USB controller and enabling the XHCI controller = if "otg_mode=3D1". * Loading the appropriate rpi- display overlay. * Setting the aliases "serial0" and "serial1" to point to the = console/user UART and the Bluetooth/spare UART, respectively. * Adding information about the HAT in "/hat". * Copying any significant error messages to "/chosen/user-warning", from = where it can be read by the GUI and turned into notifications. * Declaring the available RAM. * Passing the board revision, serial number, kaslr seed and rng seed. * Limiting the size of the CMA region to 256MB if < 2GB RAM or gpu_mem > = 256. * Expanding the inbound window declared by the pcie0 dma-ranges property = on a C0, moving the base address to 0x4_00000000 regardless. * Setting the MDIO address of the Ethernet PHY. * Declaring a simple-framebuffer, if wanted. > What does m1n1 have to do with anything here? m1n1 isn't extlinux and = isn't packaged in Guix. It chainloads uboot > Going by the mention of 'defconfig' and 'arch/arm' and 'configs', this = appears to be a patch to Linux, not uboot. As such, it appears that the = device tree information is used by Linux here, there is no information = there on whether it is used by U-Boot. I cannot agree. = https://github.com/u-boot/u-boot/blob/master/arch/arm/mach-bcm283x/Kconfig= = = https://github.com/u-boot/u-boot/blob/master/configs/A10-OLinuXino-Lime_de= fconfig = > And is this a bad thing, and if so, perhaps FDTDIR could be added to = the specification? I don=E2=80=99t think so. Keep in mind the source code in Guix is named = extlinux.scm and the file is named extlinux.conf and extlinux doesn=E2=80=99= t support FDTDIR > If so, figuring out the appropriate options to let U-boot pass the = device tree to Linux seems reasonable to me. Of course it passes device tree. The problem in question is the source = of that device tree: in my case, it should not be loaded from a file. --Apple-Mail=_14550530-0BF4-4FA0-BFD5-4253F3EAD310 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 > That web page = does not claim that anywhere.

Here's a = rough list of the DT changes performed by the firmware, besides merging = the obvious dtoverlays and dtparams:
* Applying the = "upstream" overlay, if "upstream_kernel=3D1".
* Changing = the CPU ID declarations on a Pi 2+ (BCM2837 vs BCM2836).
* = Adding i2c_vc and i2c_arm labels and aliases (and their relatives).
* If the board has a POWER_LOW GPIO declared in dt-blob.bin, = using that to configure the pwr_led node.
* Adding the = Bluetooth flow control pins to the "uart0_pins" node, on boards that = support it.
* Setting numerous items to /chosen - bootargs = (the command line), rpi-boardrev-ext, rpi-country-code (Pi 400), details = of the bootloader version, boot-mode, linux,initrd-start and = linux,initrd-end.
* Adding a copy of the bootloader = configuration.
* Loading the vl805 overlay on CM4s which = have "VL805=3D1" in their bootloader configuration.
* = Automatically loading overlays for supported cameras that are = detected.
* Automatically loading overlays for the PoE = HATs, switching between firmware-driven and I2C-driven as needed.
* Expanding the dma-ranges property of the emmc2bus node on = BCM2711C0.
* Disabling the old OTG USB controller and = enabling the XHCI controller if "otg_mode=3D1".
* Loading = the appropriate rpi- display overlay.
* Setting the = aliases "serial0" and "serial1" to point to the console/user UART and = the Bluetooth/spare UART, respectively.
* Adding = information about the HAT in "/hat".
* Copying any = significant error messages to "/chosen/user-warning", from where it can = be read by the GUI and turned into notifications.
* = Declaring the available RAM.
* Passing the board revision, = serial number, kaslr seed and rng seed.
* Limiting the = size of the CMA region to 256MB if < 2GB RAM or gpu_mem > 256.
* Expanding the inbound window declared by the pcie0 = dma-ranges property on a C0, moving the base address to 0x4_00000000 = regardless.
* Setting the MDIO address of the Ethernet = PHY.
* Declaring a simple-framebuffer, if wanted.

> What does m1n1 have to do with = anything here? m1n1 isn't extlinux and isn't packaged in Guix.

It chainloads uboot

> Going by the mention of = 'defconfig' and 'arch/arm' and 'configs', this appears to be a patch to = Linux, not uboot. As such, it appears that the device tree information = is used by Linux here, there is no information there on whether it = is used by U-Boot.

I cannot agree.

And is this a bad thing, = and if so, perhaps FDTDIR could be added to the = specification?

I don=E2=80=99t think so. Keep in mind the source code in = Guix is named extlinux.scm and the file is named extlinux.conf and = extlinux doesn=E2=80=99t support FDTDIR

If so, figuring out the appropriate options = to let U-boot pass the device tree to Linux seems reasonable to = me.

Of course = it passes device tree. The problem in question is the source of that = device tree: in my case, it should not be loaded from a file.


= --Apple-Mail=_14550530-0BF4-4FA0-BFD5-4253F3EAD310--