From patchwork Sat Jul 20 18:23:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1134439 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eCTd6T6E"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45rc7l01Mhz9s4Y for ; Sun, 21 Jul 2019 04:38:10 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 91AE0C21DA6; Sat, 20 Jul 2019 18:33:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 81E62C21BE5; Sat, 20 Jul 2019 18:26:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4000FC21E39; Sat, 20 Jul 2019 18:25:23 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 1F24EC21C6A for ; Sat, 20 Jul 2019 18:25:18 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id k20so65214326ios.10 for ; Sat, 20 Jul 2019 11:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lZA4NhGI2aZbf31Dd4ZHvwtwdrULmgtGauI/VHTFmIc=; b=eCTd6T6EEj0E/8+48oNEdY3piDd5MNBnjIAf/TbKkNe6N9n9d3ZkGAJj+eyLP0dpI3 qDlzRcn9ohDRwi/HzqVcNdnG8SgSZSuUff5T6oMMx581fTVMnGG3++B3k+bVF+SKndS7 GISArpkCFYH61Nrg9B8KSFv4eXJtZss4FKM08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lZA4NhGI2aZbf31Dd4ZHvwtwdrULmgtGauI/VHTFmIc=; b=h9+FnFq9TDX3eNB94bbYRLlgPwwk2yRGECTac4SEvzfK30qNgI6vXeBZnCZw0NEs+x ydb8TVwX3PfkXtC5rd3G3AD1Toc+SLpE2tx3PmysfgVUsV9PV4gX7VH2OWtfCL/Tww9I qcIjQSJQDfeZaIo5ZeYwio6BSDpE+d7e6A6fdev9yshx7Cj2uqKpj5W+SXMEnBMWaGAb UaNiKEdwZZqMZveQV/Jb9ABZD6wTtXsAH++YFZitmE4gX+OPdc9q8CETZNU/XVjkp0Aj iBrbLRwfgUEcQZFXgrTBDd5rIh26N6t6uf7NwE2RZ/IfJJCXbsexuCIcJXU2u7zmzHJx h3TA== X-Gm-Message-State: APjAAAUK9QkPC4eH+IQHDwULQW4T7SMnBE7B4+CPRsRkldj9aUifTJnH 66sVjL6OD7CK1/Szfp2cFTVdlb8BCzA= X-Google-Smtp-Source: APXvYqxEkBT3tiTzutl/y0WwtkewtiKcBGAYaddGzSD4K41Mv9Ics4ZblMNW2EOiD/nJXt+a8y+FLQ== X-Received: by 2002:a02:b609:: with SMTP id h9mr60065692jam.36.1563647116963; Sat, 20 Jul 2019 11:25:16 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id z17sm49778933iol.73.2019.07.20.11.25.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:25:16 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 20 Jul 2019 12:23:52 -0600 Message-Id: <20190720182416.183626-31-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog In-Reply-To: <20190720182416.183626-1-sjg@chromium.org> References: <20190720182416.183626-1-sjg@chromium.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 30/53] binman: Update documentation for image creation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" There are a few more steps in the process now. Update the documentation to reflect this. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/binman/README | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/binman/README b/tools/binman/README index 6a1cd110a4c..1f9e13784fc 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -679,22 +679,35 @@ large enough to hold all the entries. 7. CheckEntries() - checks that the entries do not overlap, nor extend outside the image. -8. SetCalculatedProperties() - update any calculated properties in the device +8. SetImagePos() - sets the image position of every entry. This is the absolute +position 'image-pos', as opposed to 'offset' which is relative to the containing +section. This must be done after all offsets are known, which is why it is quite +late in the ordering. + +9. SetCalculatedProperties() - update any calculated properties in the device tree. This sets the correct 'offset' and 'size' vaues, for example. -9. ProcessEntryContents() - this calls Entry.ProcessContents() on each entry. +10. ProcessEntryContents() - this calls Entry.ProcessContents() on each entry. The default implementatoin does nothing. This can be overriden to adjust the contents of an entry in some way. For example, it would be possible to create an entry containing a hash of the contents of some other entries. At this stage the offset and size of entries should not be adjusted unless absolutely necessary, since it requires a repack (going back to PackEntries()). -10. WriteSymbols() - write the value of symbols into the U-Boot SPL binary. +11. ResetForPack() - if the ProcessEntryContents() step failed, in that an entry +has changed its size, then there is no alternative but to go back to step 5 and +try again, repacking the entries with the updated size. ResetForPack() removes +the fixed offset/size values added by binman, so that the packing can start from +scratch. + +12. WriteSymbols() - write the value of symbols into the U-Boot SPL binary. See 'Access to binman entry offsets at run time' below for a description of what happens in this stage. -11. BuildImage() - builds the image and writes it to a file. This is the final -step. +13. BuildImage() - builds the image and writes it to a file + +14. WriteMap() - writes a text file containing a map of the image. This is the +final step. Automatic .dtsi inclusion