Message ID | 20190720182416.183626-33-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 7400107e467da52c7e6772b677f69f4464f6d2ce |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) 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="MtY1StLd"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45rcPc5Ksjz9s4Y for <incoming@patchwork.ozlabs.org>; Sun, 21 Jul 2019 04:50:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 77543C21C93; Sat, 20 Jul 2019 18:32:00 +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=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 0A7C8C21E89; Sat, 20 Jul 2019 18:26:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 59FB0C21E50; Sat, 20 Jul 2019 18:25:25 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 3C8CBC21DD7 for <u-boot@lists.denx.de>; Sat, 20 Jul 2019 18:25:19 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id j5so61076740ioj.8 for <u-boot@lists.denx.de>; Sat, 20 Jul 2019 11:25:19 -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=Dcf/voA6qGiZ+YwpC1nZpNpVWJokk2CFOmN5ywoCBOM=; b=MtY1StLdnvI5XJSXIk127ggRLrqjHhmFbkzHuxPGcIEMPJPo0QNbnO4qUmPfD60OoR BIhwPQvqz/OX4FbSzvnSt4/4YnECsEOppVdyP23uK7aYDaDPNgd7USRQwKw4ww6nlta7 wobiaKslGgiXZlcn+XTXysA40OE/zpHViZLAI= 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=Dcf/voA6qGiZ+YwpC1nZpNpVWJokk2CFOmN5ywoCBOM=; b=sHys8QneAJOgYpCG3nrfgQox6RW2eCmwVLknC0nCWblX2elnnNVGwP6taJty3UM0Ut QJTUY8sa6Yl+ln+oHsseFGhgdy5LdD9sHDF69HMAHm5UDzQvsSdCPIRvYFQAccVMYa38 udyPepn0/U2TgNDE7Ga7jv3yyguDCiFi3xaKB1n8PiQXODlrOSwGerqMXre0EOuvxUHM fNziZMHwQ7Q8QMunBzGkS0VRgbVJyMCXF2xZ6BEVf1Yj1XVzc4CYrEGMh6q63aEj+d4t uCwnqW9LJtqE8BuOuiH8I6fSACWw+vr2LLoIZcwbtxjS8BvViiVlSfZJYOBRnR0CBG3b d3qQ== X-Gm-Message-State: APjAAAVvaJfOc0I9kG3Fm4viSNsFUq3uNyi0svZ/Vj9COGorI/tp/qd/ JqAP+QJqCzej8SeRA3Ot0eAaWckNkrs= X-Google-Smtp-Source: APXvYqxQ01rlKsryBVWQp8yHyaC2i4VNejELLLBkrMw6J8TBu6GN6SN2qSn8WxACdJC6o9zn9f7RCA== X-Received: by 2002:a6b:f114:: with SMTP id e20mr53978089iog.169.1563647118108; Sat, 20 Jul 2019 11:25:18 -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.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:25:17 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Date: Sat, 20 Jul 2019 12:23:54 -0600 Message-Id: <20190720182416.183626-33-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 32/53] binman: Move Image.BuildImage() into a single function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
binman: Support replacing entries in an existing image
|
expand
|
Now that an Image is an Entry_section, there is no need for the separate
BuildSection() function. Drop it and add a bit of logging.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/binman/image.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Applied to u-boot-dm, thanks!
diff --git a/tools/binman/image.py b/tools/binman/image.py index 893e8cb4cd5..fd4f5044929 100644 --- a/tools/binman/image.py +++ b/tools/binman/image.py @@ -142,16 +142,14 @@ class Image(section.Entry_section): """Write symbol values into binary files for access at run time""" section.Entry_section.WriteSymbols(self, self) - def BuildSection(self, fd, base_offset): - """Write the section to a file""" - fd.seek(base_offset) - fd.write(self.GetData()) - def BuildImage(self): """Write the image to a file""" fname = tools.GetOutputFilename(self._filename) + tout.Info("Writing image to '%s'" % fname) with open(fname, 'wb') as fd: - self.BuildSection(fd, 0) + data = self.GetData() + fd.write(data) + tout.Info("Wrote %#x bytes" % len(data)) def WriteMap(self): """Write a map of the image to a .map file
Now that an Image is an Entry_section, there is no need for the separate BuildSection() function. Drop it and add a bit of logging. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/binman/image.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)