GNU bug report logs - #57070
[PATCH] bootloader: extlinux: support for optional FDTDIR

Previous Next

Package: guix-patches;

Reported by: Reza Alizadeh Majd <r.majd <at> pantherx.org>

Date: Tue, 9 Aug 2022 10:28:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pavel Shlyak <p.shlyak <at> pantherx.org>
To: 57070 <at> debbugs.gnu.org
Subject: [bug#57070] [PATCH] bootloader: extlinux: support for optional FDTDIR
Date: Thu, 25 Aug 2022 22:16:48 +0300
Hello, Mathieu
Thanks for joining us here!

Firstly, I kindly ask everyone in this thread to CC me as emails from this thread are not delivered to me for some reason I don’t really understand. I get emails from all other threads but this one.

Secondly, to reply you question "where is located the device tree that is loaded?", I would like to refer uboot source code comments, as I have not seen this point documented anywhere else. Check boot/pxe_utils.c

/*
	 * fdt usage is optional:
	 * It handles the following scenarios.
	 *
	 * Scenario 1: If fdt_addr_r specified and "fdt" or "fdtdir" label is
	 * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r to
	 * bootm, and adjust argc appropriately.
	 *
	 * If retrieve fails and no exact fdt blob is specified in pxe file with
	 * "fdt" label, try Scenario 2.
	 *
	 * Scenario 2: If there is an fdt_addr specified, pass it along to
	 * bootm, and adjust argc appropriately.
	 *
	 * Scenario 3: If there is an fdtcontroladdr specified, pass it along to
	 * bootm, and adjust argc appropriately.
	 *
	 * Scenario 4: fdt blob is not available.
	 */

In other words, if there’s no fdtdir, uboot just passes the fdt_addr to bootm command, that means it passes the pointer to device tree loaded by firmware (or previous bootloader) to the kernel. If fdt_addr is also missing, it passes fdtcontroladdr to the kernel. If all of the previous scenarios don’t work, it passes no FDT and kernel boots without device tree, that is absolutely normal on some devices, check x86.

As for the tests and documentation, I think I should leave these questions to Reza, as they have more experience and deeper understanding.

Sincerely,
Pavel



This bug report was last modified 2 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.