From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5505CECAAA1 for ; Mon, 19 Sep 2022 18:50:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D16E584B20; Mon, 19 Sep 2022 20:50:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VWkIJD+M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8AEB84AD6; Mon, 19 Sep 2022 20:50:34 +0200 (CEST) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 87BC984B30 for ; Mon, 19 Sep 2022 20:50:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=e.tomell@gmail.com Received: by mail-wm1-x330.google.com with SMTP id az24-20020a05600c601800b003a842e4983cso96022wmb.0 for ; Mon, 19 Sep 2022 11:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=Sz3og7DRekAswGlGQ6iswlB91ME+0kxP7FKdKu5YTfw=; b=VWkIJD+MijJuufr7MBp4NHeWpPAazUGhsvkj0s+klktGXMIaFPdj/fBmLFjgRpLvLd YCBtPpy22mWfUENdufQpSxTS9wa0yplnVJpUh/+aLui0/PmrDxoEv92C2eue+9suHI7b 8wHv2swI9JC0C5qoFW6oxc7uwR1Z/d2SyUWzepv6YCI8vRbc6RHtD6bly5nPS0KIIXpn VE2yydYTrhhraMyTZAaBr+LFmna7XEQjTfNxrhNZPQxBYgLN/A0QfScv7IAA3mFpDcO/ rpQJegVNnpJRjqOptBl2PoNBIqFeJ4xMgWAUVeYAHLU3yzbcOV3a7mYi9/ly7bLoKsJD sKaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=Sz3og7DRekAswGlGQ6iswlB91ME+0kxP7FKdKu5YTfw=; b=L2/fAajvkkWtbiM0dKigKv/sVEZ3h/pF4bIdh+aHLSsdWPySYzCtAnDClvR+JYbydC 6e40MbXqTp9o9WTTYUwtmCXhOsVp0RWggybbdbFIH5sOKyMq6T2Lxr7ysuI++A1HlJZW LSQPLF0m/EgXY6f1OTr+uE5hagN1Cl0ywLAhsIebPPYe0hrRZVs13JtXUEVi7EGj2d+4 +n5C/VuA/uNmASkl49YeYhgtZEdwH9G++P/Fg/Y5Yodjm0Aqqp2aeFv/OdC6isqRUzk0 E1msGQPW8j1QVaPFNqx4jGtlrNo7suf+iX95CISWukMOsxg93vxvXtivjgUPuWTB/bwc BtwQ== X-Gm-Message-State: ACgBeo2MyM0pwoMWw8z9Qqh5gSU/9dz/C0q+6jM23NlBoSzGrwsoDEkM QuZOm5ey5mmMfhILZuwLTAFy/y1u7ZZ7y0fQ X-Google-Smtp-Source: AA6agR6HeFrB6KBmGzS9kr54TGEqeDHA49gPDDghJwGiFUCLgGkUpIb/zJfeqHwdIgYgiRVdKOPbIQ== X-Received: by 2002:a05:600c:548b:b0:3b4:61f4:804e with SMTP id iv11-20020a05600c548b00b003b461f4804emr19226019wmb.188.1663613431671; Mon, 19 Sep 2022 11:50:31 -0700 (PDT) Received: from localhost.localdomain ([2001:b07:5d38:6a65:a6bb:6dff:fe7c:d4d7]) by smtp.gmail.com with ESMTPSA id k23-20020a7bc317000000b003b4868eb6bbsm17150102wmj.23.2022.09.19.11.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 11:50:31 -0700 (PDT) From: Edoardo Tomelleri To: u-boot@lists.denx.de Cc: Edoardo Tomelleri , Amjad Ouled-Ameur , Artem Lapkin , Heinrich Schuchardt , Jerome Brunet , Neil Armstrong , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Ramon Fried , Simon Glass , Wolfgang Denk , Zhang Ning , Zhaofeng Li Subject: [PATCH] cmd: pxe: add alias devicetree-overlay for fdtoverlays Date: Mon, 19 Sep 2022 20:50:20 +0200 Message-Id: <20220919185020.588407-1-e.tomell@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This adds keyword devicetree-overlay as an alias for fdtoverlays in extlinux (sysboot) and pxe to better follow the Boot Loader Specification, improves documentation around them by adding an example for both fdtoverlays and devicetree-overlay and the environment variable required for this feature. Signed-off-by: Edoardo Tomelleri --- boot/pxe_utils.c | 2 ++ doc/README.pxe | 4 ++++ doc/develop/distro.rst | 26 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index a364fa8bb5..d5c215ae2c 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -380,6 +380,7 @@ err: /** * label_boot_fdtoverlay() - Loads fdt overlays specified in 'fdtoverlays' + * or 'devicetree-overlay' * * @ctx: PXE context * @label: Label to process @@ -809,6 +810,7 @@ static const struct token keywords[] = { {"devicetreedir", T_FDTDIR}, {"fdtdir", T_FDTDIR}, {"fdtoverlays", T_FDTOVERLAYS}, + {"devicetree-overlay", T_FDTOVERLAYS}, {"ontimeout", T_ONTIMEOUT,}, {"ipappend", T_IPAPPEND,}, {"background", T_BACKGROUND,}, diff --git a/doc/README.pxe b/doc/README.pxe index 75caa01c4a..14aa078d52 100644 --- a/doc/README.pxe +++ b/doc/README.pxe @@ -163,6 +163,8 @@ fdtoverlays [...] - if this label is chosen, use tftp to retrieve the DT and then applied in the load order to the fdt blob stored at the address indicated in the fdt_addr_r environment variable. +devicetree-overlay [...] - alias for fdtoverlays, see above. + kaslrseed - set this label to request random number from hwrng as kaslr seed. append - use as the kernel command line when booting this @@ -178,6 +180,8 @@ fdt - if this label is chosen, use tftp to retrieve the fdt blob the fdt_addr_r environment variable, and that address will be passed to bootm. +devicetree - alias for fdt, see above. + fdtdir - if this label is chosen, use tftp to retrieve a fdt blob relative to . If the fdtfile environment variable is set, / is retrieved. Otherwise, the diff --git a/doc/develop/distro.rst b/doc/develop/distro.rst index 3ee3dac6a2..920e173548 100644 --- a/doc/develop/distro.rst +++ b/doc/develop/distro.rst @@ -81,6 +81,8 @@ as specified at BootLoaderSpec_: * Does not document the fdtdir option, which automatically selects the DTB to pass to the kernel. +See also doc/README.pxe under 'pxe file format'. + One example extlinux.conf generated by the Fedora installer is:: # extlinux.conf generated by anaconda @@ -115,6 +117,25 @@ One example extlinux.conf generated by the Fedora installer is:: fdtdir /boot/dtb-3.16.0-0.rc6.git1.1.fc22.armv7hl+lpae +One example of hand-crafted extlinux.conf:: + + menu title Select kernel + timeout 100 + + label Arch with uart devicetree overlay + kernel /arch/Image.gz + initrd /arch/initramfs-linux.img + fdt /dtbs/arch/board.dtb + fdtoverlays /dtbs/arch/overlay/uart0-gpio0-1.dtbo + append console=ttyS0,115200 console=tty1 rw root=UUID=fc0d0284-ca84-4194-bf8a-4b9da8d66908 + + label Arch with uart devicetree overlay but with Boot Loader Specification keys + kernel /arch/Image.gz + initrd /arch/initramfs-linux.img + devicetree /dtbs/arch/board.dtb + devicetree-overlay /dtbs/arch/overlay/uart0-gpio0-1.dtbo + append console=ttyS0,115200 console=tty1 rw root=UUID=fc0d0284-ca84-4194-bf8a-4b9da8d66908 + Another hand-crafted network boot configuration file is:: TIMEOUT 100 @@ -214,6 +235,11 @@ fdt_addr_r: A size of 1MB for the FDT/DTB seems reasonable. +fdtoverlay_addr_r: + Mandatory. The location in RAM where DTB overlays will be temporarily + stored and then applied in the load order to the fdt blob stored at the + address indicated in the fdt_addr_r environment variable. + fdtfile: Mandatory. the name of the DTB file for the specific board for instance the espressobin v5 board the value is "marvell/armada-3720-espressobin.dtb" -- 2.37.3