unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Pavel Shlyak <p.shlyak@pantherx.org>
Cc: vagrant@debian.org, 57070@debbugs.gnu.org,
	Tobias Geerinckx-Rice <me@tobias.gr>
Subject: [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR
Date: Mon, 22 Aug 2022 23:17:13 +0200	[thread overview]
Message-ID: <d3166843-9033-ad13-d117-85673e5270f4@telenet.be> (raw)
In-Reply-To: <13223735-7417-4785-81F8-43715A135574@pantherx.org>


[-- Attachment #1.1.1.1: Type: text/plain, Size: 4909 bytes --]


On 22-08-2022 21:19, Pavel Shlyak wrote:
> Subject:
> Re: [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR
> From:
> Pavel Shlyak <p.shlyak@pantherx.org>
> Date:
> 22-08-2022 21:19
>
> To:
> Maxime Devos <maximedevos@telenet.be>
> CC:
> 57070@debbugs.gnu.org, vagrant@debian.org, Tobias Geerinckx-Rice 
> <me@tobias.gr>
>
>
>> Could you point me at the documentation or code that claims or does that? I am not finding any evidence that device trees are generated at boot.
> Google «device tree raspberry bootloader», 1st resulthttps://forums.raspberrypi.com/viewtopic.php?t=329799

That web page does not claim that anywhere.

>> If the bootloader can, surely the kernel can.
> Bootloader runs on GPU on Raspberry. It cannot run kernel.
> Also, check m1n1 on Apple. It has docs.

I have never claimed that the GPU can run the kernel.

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

Bootloaders running on the GPU is something I'm not used to at all, it's 
not something I had expected, see later.

>> I believe the kernel folks will appreciate a patch fixing the DT for RPI3b+ and Compute Module 4.
> And for other devices that behave the same way? You’re literally promoting making GUIX not bootable on all devices alike.

I literally never wrote such a thing. In what sentences did I promote that?

Even if you meant 'implied' instead of 'literally', then that still 
doesn't make sense to me; I'm running Guix System, it's in my own 
interest to keep it bootable on my device.

>> DTs are a kernel thing, e.g. the Linux documentationhttps://www.kernel.org/doc/html/latest/devicetree/usage-model.html  mentions DT, also, Linux.  I could not find any information on bootloaders loading DTs.
> Because you didn’t search for it.
I did search for it, figuring out an _appropriate_ query and finding 
relevant results is another matter.
>   Google
No. It has monopoly and privacy problems.
>   «device tree raspberry bootloader», the first link is about bootloader forming the device treehttps://forums.raspberrypi.com/viewtopic.php?t=329799.
Generating the DT is a different matter from loading the DT.  It's also 
about firmware, not the bootloader.
>   Google «uboot device tree»https://u-boot.readthedocs.io/en/latest/usage/fdt_overlays.html  to know how uboot manipulates them.
These overlays look rather manual, to be done by the user for individual 
models, I don't see the relevancy.
> Moreover, Raspberry PI uboot uses DTB to boot on the board as inhttps://patchwork.ozlabs.org/project/uboot/patch/20191106144104.28177-1-matthias.bgg@kernel.org/  (Instead of using the embedded DTB as done in RPi3 we use the devicetree provided by the firmware.)
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.
>> bootloaders don't magically have access to more information than kernels
> They do, if they are run on a separate core on the SOC that linux or arm core has no access to.  Checkhttps://github.com/christinaa/rpi-open-firmware

That's a setup I would not have expected.

AFAIK nothing is stopping Linux from sending some code to the separate 
core to figure out the relevant information and sending it back to 
Linux. But given the unusual setup, I would consider it plausible that 
Linux people want to delegate such responsibility to the bootloader.

Was this (i.e. "they are run on a separate core on the SOC ...") the 
case for the Raspberry device you are trying to support?

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

>> My point is that supporting more devices would be nice, but this patch isn't the way to do it.
> Well, there is no other way to support devices that require DTB not to be loaded with uboot. The solutions you suggest are not possible.
>
> Moreover, keep in mind FDTDIR is not in thehttp://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/  specification and making is permanent we basically violate it.

And is this a bad thing, and if so, perhaps FDTDIR could be added to the 
specification? Guix being in violation of some specification is not in 
itself a bug, for example the store model of Guix is not 'Linux Standard 
Base'.

It might be a bad thing, but there's a step missing in your argument.

> Since we’ve not come to any understanding here, I kindly invite Vagrant and Tobias to join the discussion. They seem to be familiar with the relevant parts of GUIX.

See the 'If so, figuring out the appropriate options ...' above.

Also, again, it's Guix, not GUIX. GUIX is a Microsoft thing.

Greetings,
Maxime

[-- Attachment #1.1.1.2: Type: text/html, Size: 12394 bytes --]

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2022-08-22 21:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 10:27 [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR Reza Alizadeh Majd
2022-08-09 10:30 ` Reza Alizadeh Majd
2022-08-15  9:27   ` Mathieu Othacehe
2022-08-16 18:10   ` Reza Alizadeh Majd
2022-08-25 17:35     ` Mathieu Othacehe
2022-08-28  8:19       ` Reza Alizadeh Majd
2022-08-28 15:49         ` Mathieu Othacehe
2022-08-29 18:17           ` Reza Alizadeh Majd
2022-08-30  6:53             ` bug#57070: " Mathieu Othacehe
2022-08-10  9:31 ` [bug#57070] " Maxime Devos
2022-08-15 10:57   ` Tobias Geerinckx-Rice via Guix-patches via
2022-08-10  9:32 ` Maxime Devos
2022-08-16 17:08   ` Reza Alizadeh Majd
2022-08-16 18:44     ` Maxime Devos
2022-08-10 14:37 ` Pavel Shlyak
2022-08-11 10:00   ` Maxime Devos
2022-08-11 11:13     ` Pavel Shlyak
2022-08-10 14:46 ` Pavel Shlyak
2022-08-20 10:15 ` Pavel Shlyak
2022-08-22  8:54   ` Maxime Devos
2022-08-22 10:52     ` Pavel Shlyak
2022-08-22 18:57       ` Maxime Devos
2022-08-22 19:19         ` Pavel Shlyak
2022-08-22 21:17           ` Maxime Devos [this message]
2022-08-22 21:29             ` Pavel Shlyak
2022-08-23 18:11           ` Vagrant Cascadian
2022-08-25 19:16 ` Pavel Shlyak
2022-08-30  6:52   ` Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3166843-9033-ad13-d117-85673e5270f4@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=57070@debbugs.gnu.org \
    --cc=me@tobias.gr \
    --cc=p.shlyak@pantherx.org \
    --cc=vagrant@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).