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 35792C4332F for ; Sat, 17 Dec 2022 16:12:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0891785397; Sat, 17 Dec 2022 17:11:57 +0100 (CET) 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="exALezMc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3008385385; Sat, 17 Dec 2022 17:11:52 +0100 (CET) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (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 90F668537D for ; Sat, 17 Dec 2022 17:11:48 +0100 (CET) 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-il1-x135.google.com with SMTP id d14so2743118ilq.11 for ; Sat, 17 Dec 2022 08:11:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=pQ8zF1NAzzwImLpfecS27q9iNJDQQfRQUznmB/EbrC0=; b=exALezMc7wsFeoSJypw0JL25b03sHNmRNwpaB8xA6nE5SxpIZSLSW5H1DoPTyfJ+zV +oiUqTA36Q5Fa3iU/LbVjgkWDYyv06PUn1aZVL3zRMS2+ncCikQU76gmEhRFd89mowkI UHTQUc+57N/oqDjPz1C49p5NBomuf/bFDMNfQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=pQ8zF1NAzzwImLpfecS27q9iNJDQQfRQUznmB/EbrC0=; b=CZna0znIlvLoym+1YwLHCg9W3qo+X66k+1dbn1DDK+4WkJ0PvEOrLT1iJVFrYCAh88 zSEl2LYJ4eMIVV6GBWfBlCSLck2wTqAcvsfN1YdDxoMgILJcPFwDs5P8H2yOsfFxSgvI MLheWe6ChaXQtAyz5uBPhPxySfwrm1snkkNaubgSM3DdVAhV8jwz5x7Wps5BqVIC+/2M jVJpqdqKZRDI/oC5d6Y5PvMniogoONJU7mOTpPiCmcCidlhfJVKYtR63OTTIjWULqROI OeyFkyi1rtZnY3fMa8lvwyETRD7TEGc3xf5TpxaTeBWdpNQ6MxD0nRyiJq3UcoOtvJmn X7pA== X-Gm-Message-State: AFqh2kryAE/vL279BSiJXPLdHtq2FK9cXVsj+u4z9djI3+tsZT8v7k8d c4zElEv2Kxef57kDP1v9Z3Eeb4BgdT3M2Fwf X-Google-Smtp-Source: AMrXdXv1RiC6QqgBTxgyrDKuF9xoMOTm5tGAiY1RvU/yjbPo6VO1ubNKiH2kuV+7uXppBIRAdGi+dg== X-Received: by 2002:a05:6e02:2193:b0:305:e1f9:89b with SMTP id j19-20020a056e02219300b00305e1f9089bmr10719631ila.24.1671293507895; Sat, 17 Dec 2022 08:11:47 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id o5-20020a056e02092500b00302f958e71dsm1652817ilt.49.2022.12.17.08.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 08:11:47 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Peter Geis , Jerome Forissier , Tom Rini , Philippe Reynes , Alper Nebi Yasak , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Quentin Schulz , Ivan Mikhaylov , Roger Quadros Subject: [PATCH v6 03/12] binman: Update entry docs Date: Sat, 17 Dec 2022 09:11:08 -0700 Message-Id: <20221217161117.61699-4-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20221217161117.61699-1-sjg@chromium.org> References: <20221217161117.61699-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.6 at phobos.denx.de X-Virus-Status: Clean These have got out of data recently. Regenerate them. Signed-off-by: Simon Glass --- Changes in v6: - Add new patch to update entry docs tools/binman/entries.rst | 187 ++++++++++++++++++++++++++++++++++----- 1 file changed, 163 insertions(+), 24 deletions(-) diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst index 3dc32db8a54..ec7465d0127 100644 --- a/tools/binman/entries.rst +++ b/tools/binman/entries.rst @@ -216,9 +216,9 @@ This is a blob containing a device tree. The contents of the blob are obtained from the list of available device-tree files, managed by the 'state' module. -Additional Properties / Entry arguments: - - prepend: Header type to use: - length: 32-bit length header +Additional attributes: + prepend: Header used (e.g. 'length') + .. _etype_blob_ext: @@ -1178,11 +1178,13 @@ Properties / Entry arguments: - multiple-data-files: boolean to tell binman to pass all files as datafiles to mkimage instead of creating a temporary file the result of datafiles concatenation + - filename: filename of output binary generated by mkimage The data passed to mkimage via the -d flag is collected from subnodes of the mkimage node, e.g.:: mkimage { + filename = "imximage.bin"; args = "-n test -T imximage"; u-boot-spl { @@ -1190,13 +1192,14 @@ mkimage node, e.g.:: }; This calls mkimage to create an imximage with `u-boot-spl.bin` as the data -file, which mkimage being called like this:: +file, with mkimage being called like this:: mkimage -d -n test -T imximage The output from mkimage then becomes part of the image produced by -binman. If you need to put mulitple things in the data file, you can use -a section, or just multiple subnodes like this:: +binman but also is written into `imximage.bin` file. If you need to put +multiple things in the data file, you can use a section, or just multiple +subnodes like this:: mkimage { args = "-n test -T imximage"; @@ -1208,24 +1211,27 @@ a section, or just multiple subnodes like this:: }; }; -To pass all datafiles untouched to mkimage:: +Note that binman places the contents (here SPL and TPL) into a single file +and passes that to mkimage using the -d option. - mkimage { - args = "-n rk3399 -T rkspi"; - multiple-data-files; +pass all datafiles untouched to mkimage:: - u-boot-tpl { - }; +image { +rgs = "-n rk3399 -T rkspi"; +ultiple-data-files; - u-boot-spl { - }; - }; +-boot-tpl { +; -This calls mkimage to create a Rockchip RK3399-specific first stage -bootloader, made of TPL+SPL. Since this first stage bootloader requires to -align the TPL and SPL but also some weird hacks that is handled by mkimage -directly, binman is told to not perform the concatenation of datafiles prior -to passing the data to mkimage. +-boot-spl { +; + + +s calls mkimage to create a Rockchip RK3399-specific first stage +tloader, made of TPL+SPL. Since this first stage bootloader requires to +gn the TPL and SPL but also some weird hacks that is handled by mkimage +ectly, binman is told to not perform the concatenation of datafiles prior +passing the data to mkimage. To use CONFIG options in the arguments, use a string list instead, as in this example which also produces four arguments:: @@ -1242,17 +1248,17 @@ the 'data-to-imagename' property:: mkimage { args = "-T imximage"; - data-to-imagename'; + data-to-imagename; u-boot-spl { }; }; That will pass the data to mkimage both as the data file (with -d) and as -the image name (with -n). - +the image name (with -n). In both cases, a filename is passed as the +argument, with the actual data being in that file. -If need to pass different data in with -n, then use an imagename subnode:: +If need to pass different data in with -n, then use an `imagename` subnode:: mkimage { args = "-T imximage"; @@ -1271,6 +1277,7 @@ This will pass in u-boot-spl as the input data and the .cfgout file as the -n data. + .. _etype_opensbi: Entry: opensbi: RISC-V OpenSBI fw_dynamic blob @@ -1478,6 +1485,10 @@ skip-at-start be written at offset 4 in the image file, since the first 16 bytes are skipped when writing. +filename + filename to write the unpadded section contents to within the output + directory (None to skip this). + Since a section is also an entry, it inherits all the properies of entries too. @@ -2034,6 +2045,134 @@ Entry types that have a part to play in handling microcode: +.. _etype_u_boot_vpl: + +Entry: u-boot-vpl: U-Boot VPL binary +------------------------------------ + +Properties / Entry arguments: + - filename: Filename of u-boot-vpl.bin (default 'vpl/u-boot-vpl.bin') + +This is the U-Boot VPL (Verifying Program Loader) binary. This is a small +binary which loads before SPL, typically into on-chip SRAM. It is +responsible for locating, loading and jumping to SPL, the next-stage +loader. Note that VPL is not relocatable so must be loaded to the correct +address in SRAM, or written to run from the correct address if direct +flash execution is possible (e.g. on x86 devices). + +SPL can access binman symbols at runtime. See: + + 'Access to binman entry offsets at run time (symbols)' + +in the binman README for more information. + +The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since +binman uses that to look up symbols to write into the VPL binary. + + + +.. _etype_u_boot_vpl_bss_pad: + +Entry: u-boot-vpl-bss-pad: U-Boot VPL binary padded with a BSS region +--------------------------------------------------------------------- + +Properties / Entry arguments: + None + +This holds the padding added after the VPL binary to cover the BSS (Block +Started by Symbol) region. This region holds the various variables used by +VPL. It is set to 0 by VPL when it starts up. If you want to append data to +the VPL image (such as a device tree file), you must pad out the BSS region +to avoid the data overlapping with U-Boot variables. This entry is useful in +that case. It automatically pads out the entry size to cover both the code, +data and BSS. + +The contents of this entry will a certain number of zero bytes, determined +by __bss_size + +The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since +binman uses that to look up the BSS address. + + + +.. _etype_u_boot_vpl_dtb: + +Entry: u-boot-vpl-dtb: U-Boot VPL device tree +--------------------------------------------- + +Properties / Entry arguments: + - filename: Filename of u-boot.dtb (default 'vpl/u-boot-vpl.dtb') + +This is the VPL device tree, containing configuration information for +VPL. VPL needs this to know what devices are present and which drivers +to activate. + + + +.. _etype_u_boot_vpl_elf: + +Entry: u-boot-vpl-elf: U-Boot VPL ELF image +------------------------------------------- + +Properties / Entry arguments: + - filename: Filename of VPL u-boot (default 'vpl/u-boot-vpl') + +This is the U-Boot VPL ELF image. It does not include a device tree but can +be relocated to any address for execution. + + + +.. _etype_u_boot_vpl_expanded: + +Entry: u-boot-vpl-expanded: U-Boot VPL flat binary broken out into its component parts +-------------------------------------------------------------------------------------- + +Properties / Entry arguments: + - vpl-dtb: Controls whether this entry is selected (set to 'y' or '1' to + select) + +This is a section containing the U-Boot binary, BSS padding if needed and a +devicetree. Using this entry type automatically creates this section, with +the following entries in it: + + u-boot-vpl-nodtb + u-boot-vpl-bss-pad + u-boot-dtb + +Having the devicetree separate allows binman to update it in the final +image, so that the entries positions are provided to the running U-Boot. + +This entry is selected based on the value of the 'vpl-dtb' entryarg. If +this is non-empty (and not 'n' or '0') then this expanded entry is selected. + + + +.. _etype_u_boot_vpl_nodtb: + +Entry: u-boot-vpl-nodtb: VPL binary without device tree appended +---------------------------------------------------------------- + +Properties / Entry arguments: + - filename: Filename to include (default 'vpl/u-boot-vpl-nodtb.bin') + +This is the U-Boot VPL binary, It does not include a device tree blob at +the end of it so may not be able to work without it, assuming VPL needs +a device tree to operate on your platform. You can add a u_boot_vpl_dtb +entry after this one, or use a u_boot_vpl entry instead, which normally +expands to a section containing u-boot-vpl-dtb, u-boot-vpl-bss-pad and +u-boot-vpl-dtb + +VPL can access binman symbols at runtime. See: + + 'Access to binman entry offsets at run time (symbols)' + +in the binman README for more information. + +The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since +binman uses that to look up symbols to write into the VPL binary. + + + .. _etype_u_boot_with_ucode_ptr: Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer -- 2.39.0.314.g84b9a713c41-goog