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 9121BEB64DA for ; Thu, 22 Jun 2023 20:25:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4729F8638A; Thu, 22 Jun 2023 22:25:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="h3HNnAxk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 667D6863B8; Thu, 22 Jun 2023 22:25:26 +0200 (CEST) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 08CB2863A0 for ; Thu, 22 Jun 2023 22:25:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f4b2bc1565so10408852e87.2 for ; Thu, 22 Jun 2023 13:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1687465516; x=1690057516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pQkfuQBy3ml3A6KqpZccrnXrtqEs9qGbxtJFL9P0kW8=; b=h3HNnAxk5RPBTMAKhoLxPuisydbIZAp2C3ArG2e1nAACWyEc/9WvCNwlE3fYKLC0cG CwsoILv+1ZfD7CjaZKdM4nn7dbJAnsZ41EZso17zPiMY3Jr+BRqcIvnwEdcpdV8++5Q+ YpSR2NmiJhcmfUjFeEIvhSn5/4LwqyaZqYsOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687465516; x=1690057516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pQkfuQBy3ml3A6KqpZccrnXrtqEs9qGbxtJFL9P0kW8=; b=R7ybsYb+RlAEOQN6WnYlvpsRjZHp0vXeAlo0HPH/a1Pulf1uQ5IZlZkjlqj/JuotzQ EPnLjVXNVTwqZmyAu4SdDBVtthTUbjwe9Dl+Bocmrf9O09yBD3ePmM6xbLwChLGUYO5z MubZ/dT6fwtSLVCbpLSpPL3Y1/62u5uoP/VW00TIxNEyCzgkczPbhJilq0AXOcB7h0oN 9T+1MxS4nXZtc7eUweYvJ149r3Fkj0HTxp6MBGw0ezQ0E24AhKR82E1+cZE+olDVS7xA Ckkm6JXp6S0LM87pQoInNn/PCs7bMR6XTJ4jsdVdwkYrJN0cMXxJd8CaChC4ibI3722Y 559A== X-Gm-Message-State: AC+VfDwyIBNTo/Y/HAObJgjm/6IFY+l3I+xk38wDr3XaANA63MkTo5Nm Xw2QMYPPMCLE1kjH0gm4Pi20neEOvyc9aav6EIw/mg== X-Google-Smtp-Source: ACHHUZ4H2Rb9OP665WyhaQFNDrcPSW4KbeY3tPcpbvjLzOYznt4G+13mDNTeSYf+dFb3OBT4JCNYVA== X-Received: by 2002:a19:4302:0:b0:4f8:6ac4:85 with SMTP id q2-20020a194302000000b004f86ac40085mr8631863lfa.19.1687465515893; Thu, 22 Jun 2023 13:25:15 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-132-213-210.dab.02.net. [82.132.213.210]) by smtp.gmail.com with ESMTPSA id x24-20020a05600c21d800b003f8e4b22bc2sm352770wmj.44.2023.06.22.13.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 13:25:15 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass Subject: [PATCH 9/9] doc: Bring in the command-syntax extensions Date: Thu, 22 Jun 2023 21:21:16 +0100 Message-ID: <20230622202120.2182848-9-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog In-Reply-To: <20230622202120.2182848-1-sjg@chromium.org> References: <20230622202120.2182848-1-sjg@chromium.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Bring this file into the documentation. Signed-off-by: Simon Glass --- .../fit/command_syntax_extensions.rst} | 166 ++++++++++-------- doc/usage/fit/index.rst | 1 + 2 files changed, 97 insertions(+), 70 deletions(-) rename doc/{uImage.FIT/command_syntax_extensions.txt => usage/fit/command_syntax_extensions.rst} (57%) diff --git a/doc/uImage.FIT/command_syntax_extensions.txt b/doc/usage/fit/command_syntax_extensions.rst similarity index 57% rename from doc/uImage.FIT/command_syntax_extensions.txt rename to doc/usage/fit/command_syntax_extensions.rst index 6a99089ab557..65b7891c8a69 100644 --- a/doc/uImage.FIT/command_syntax_extensions.txt +++ b/doc/usage/fit/command_syntax_extensions.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: GPL-2.0+ + Command syntax extensions for the new uImage format =================================================== @@ -20,100 +22,117 @@ of supported bootm usages. Note: U-Boot supports two methods of booting a PowerPC Linux kernel: old way, i.e., without passing the Flattened Device Tree (FDT), and new way, where the kernel is passed a pointer to the FDT. The boot method is indicated for each -scenario. +scenario:: + 1. bootm boot image at the current address, equivalent to 2,3,8 -1. bootm boot image at the current address, equivalent to 2,3,8 +Old uImage:: -Old uImage: -2. bootm /* single image at */ -3. bootm /* multi-image at */ -4. bootm - /* multi-image at */ -5. bootm /* single image at */ -6. bootm /* single image at */ -7. bootm - /* single image at */ + 2. bootm /* single image at */ + 3. bootm /* multi-image at */ + 4. bootm - /* multi-image at */ + 5. bootm /* single image at */ + 6. bootm /* single image at */ + 7. bootm - /* single image at */ -New uImage: -8. bootm -9. bootm []: -10. bootm []#[#]: []: -12. bootm []: []: []: -13. bootm []: []: -14. bootm []: - []: -15. bootm []: - +New uImage:: + 8. bootm + 9. bootm []: + 10. bootm []#[#]: []: + 12. bootm []: []: []: + 13. bootm []: []: + 14. bootm []: - []: + 15. bootm []: - Ad. 1. This is equivalent to cases 2,3,8, depending on the type of image at the current image address. + - boot method: see cases 2,3,8 Ad. 2. Boot kernel image located at . + - boot method: non-FDT Ad. 3. First and second components of the image at are assumed to be a kernel and a ramdisk, respectively. The kernel is booted with initrd loaded with the ramdisk from the image. + - boot method: depends on the number of components at , and on whether - U-Boot is compiled with OF support: + U-Boot is compiled with OF support:: - | 2 components | 3 components | - | (kernel, initrd) | (kernel, initrd, fdt) | ---------------------------------------------------------------------- -#ifdef CONFIG_OF_* | non-FDT | FDT | -#ifndef CONFIG_OF_* | non-FDT | non-FDT | + ====================================================================== + | 2 components | 3 components| + | (kernel, initrd) | (kernel, initrd, fdt) | + ====================================================================== + #ifdef CONFIG_OF_* | non-FDT | FDT | + #ifndef CONFIG_OF_* | non-FDT | non-FDT | + ====================================================================== Ad. 4. Similar to case 3, but the kernel is booted without initrd. Second component of the multi-image is irrelevant (it can be a dummy, 1-byte file). + - boot method: see case 3 Ad. 5. Boot kernel image located at with initrd loaded with ramdisk from the image at . + - boot method: non-FDT Ad. 6. is the address of a kernel image, is the address of a ramdisk image, and is the address of a FDT binary blob. Kernel is booted with initrd loaded with ramdisk from the image at . + - boot method: FDT Ad. 7. is the address of a kernel image and is the address of a FDT binary blob. Kernel is booted without initrd. + - boot method: FDT Ad. 8. Image at is assumed to contain a default configuration, which is booted. + - boot method: FDT or non-FDT, depending on whether the default configuration defines FDT Ad. 9. Similar to case 2: boot kernel stored in from the image at address . + - boot method: non-FDT Ad. 10. Boot configuration from the image at . + - boot method: FDT or non-FDT, depending on whether the configuration given defines FDT Ad. 11. Equivalent to case 5: boot kernel stored in from the image at with initrd loaded with ramdisk from the image at . + - boot method: non-FDT Ad. 12. Equivalent to case 6: boot kernel stored in from the image at with initrd loaded with ramdisk from the image at , and pass FDT blob from the image at . + - boot method: FDT Ad. 13. Similar to case 12, the difference being that is the address of FDT binary blob that is to be passed to the kernel. + - boot method: FDT Ad. 14. Equivalent to case 7: boot kernel stored in from the image at , without initrd, and pass FDT blob from the image at . + - boot method: FDT Ad. 15. Similar to case 14, the difference being that is the address of the FDT binary blob that is to be passed to the kernel. + - boot method: FDT @@ -123,14 +142,14 @@ New uImage argument syntax New uImage support introduces two new forms for bootm arguments, with the following syntax: -- new uImage sub-image specification -: +new uImage sub-image specification + : -- new uImage configuration specification -# +new uImage configuration specification + # -- new uImage configuration specification with extra configuration components -#[#[#..]] +new uImage configuration specification with extra configuration components + #[#[#..]] The extra configuration currently is supported only for additional device tree overlays to apply on the base device tree supplied by the first configuration @@ -138,31 +157,38 @@ unit. Examples: -- boot kernel "kernel-1" stored in a new uImage located at 200000: -bootm 200000:kernel-1 +boot kernel "kernel-1" stored in a new uImage located at 200000:: + + bootm 200000:kernel-1 + +boot configuration "cfg-1" from a new uImage located at 200000:: + + bootm 200000#cfg-1 + +boot configuration "cfg-1" with extra "cfg-2" from a new uImage located +at 200000:: + + bootm 200000#cfg-1#cfg-2 + +boot "kernel-1" from a new uImage at 200000 with initrd "ramdisk-2" found in +some other new uImage stored at address 800000:: + + bootm 200000:kernel-1 800000:ramdisk-2 -- boot configuration "cfg-1" from a new uImage located at 200000: -bootm 200000#cfg-1 +boot "kernel-2" from a new uImage at 200000, with initrd "ramdisk-1" and FDT +"fdt-1", both stored in some other new uImage located at 800000:: -- boot configuration "cfg-1" with extra "cfg-2" from a new uImage located - at 200000: -bootm 200000#cfg-1#cfg-2 + bootm 200000:kernel-1 800000:ramdisk-1 800000:fdt-1 -- boot "kernel-1" from a new uImage at 200000 with initrd "ramdisk-2" found in - some other new uImage stored at address 800000: -bootm 200000:kernel-1 800000:ramdisk-2 +boot kernel "kernel-2" with initrd "ramdisk-2", both stored in a new uImage +at address 200000, with a raw FDT blob stored at address 600000:: -- boot "kernel-2" from a new uImage at 200000, with initrd "ramdisk-1" and FDT - "fdt-1", both stored in some other new uImage located at 800000: -bootm 200000:kernel-1 800000:ramdisk-1 800000:fdt-1 + bootm 200000:kernel-2 200000:ramdisk-2 600000 -- boot kernel "kernel-2" with initrd "ramdisk-2", both stored in a new uImage - at address 200000, with a raw FDT blob stored at address 600000: -bootm 200000:kernel-2 200000:ramdisk-2 600000 +boot kernel "kernel-2" from new uImage at 200000 with FDT "fdt-1" from the +same new uImage:: -- boot kernel "kernel-2" from new uImage at 200000 with FDT "fdt-1" from the - same new uImage: -bootm 200000:kernel-2 - 200000:fdt-1 + bootm 200000:kernel-2 - 200000:fdt-1 Note on current image address @@ -171,31 +197,31 @@ Note on current image address When bootm is called without arguments, the image at current image address is booted. The current image address is the address set most recently by a load command, etc, and is by default equal to CONFIG_SYS_LOAD_ADDR. For example, consider -the following commands: +the following commands:: -tftp 200000 /tftpboot/kernel -bootm -Last command is equivalent to: -bootm 200000 + tftp 200000 /tftpboot/kernel + bootm + Last command is equivalent to: + bootm 200000 In case of the new uImage argument syntax, the address portion of any argument can be omitted. If is omitted, then it is assumed that image at should be used. Similarly, when is omitted, it is assumed that image at should be used. If is omitted, it is assumed that the current image address is to be used. For example, consider the following -commands: - -tftp 200000 /tftpboot/uImage -bootm :kernel-1 -Last command is equivalent to: -bootm 200000:kernel-1 - -tftp 200000 /tftpboot/uImage -bootm 400000:kernel-1 :ramdisk-1 -Last command is equivalent to: -bootm 400000:kernel-1 400000:ramdisk-1 - -tftp 200000 /tftpboot/uImage -bootm :kernel-1 400000:ramdisk-1 :fdt-1 -Last command is equivalent to: -bootm 200000:kernel-1 400000:ramdisk-1 400000:fdt-1 +commands:: + + tftp 200000 /tftpboot/uImage + bootm :kernel-1 + Last command is equivalent to: + bootm 200000:kernel-1 + + tftp 200000 /tftpboot/uImage + bootm 400000:kernel-1 :ramdisk-1 + Last command is equivalent to: + bootm 400000:kernel-1 400000:ramdisk-1 + + tftp 200000 /tftpboot/uImage + bootm :kernel-1 400000:ramdisk-1 :fdt-1 + Last command is equivalent to: + bootm 200000:kernel-1 400000:ramdisk-1 400000:fdt-1 diff --git a/doc/usage/fit/index.rst b/doc/usage/fit/index.rst index bd25bd30b284..92998e724c28 100644 --- a/doc/usage/fit/index.rst +++ b/doc/usage/fit/index.rst @@ -17,3 +17,4 @@ doc/uImage.FIT verified-boot beaglebone_vboot overlay-fdt-boot + command_syntax_extensions -- 2.41.0.162.gfafddb0af9-goog