From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>,
Devicetree Compiler <devicetree-compiler@vger.kernel.org>
Subject: [PATCH 08/29] libfdt: Fix the Python pack() function
Date: Tue, 5 Jun 2018 18:46:44 -0600 [thread overview]
Message-ID: <20180606004705.79641-9-sjg@chromium.org> (raw)
In-Reply-To: <20180606004705.79641-1-sjg@chromium.org>
This currently fails to reduce the device-tree bytearray size. Fix this.
This stands in for a pending upstream change.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
index 6774b93b2cb..5b38e63b267 100644
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -442,7 +442,11 @@ class Fdt:
Raises:
FdtException if any error occurs
"""
- return check_err(fdt_pack(self._fdt), quiet)
+ err = check_err(fdt_pack(self._fdt), quiet)
+ if err:
+ return err
+ del self._fdt[self.totalsize():]
+ return err
def getprop(self, nodeoffset, prop_name, quiet=()):
"""Get a property from a node
--
2.17.1.1185.g55be947832-goog
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
next prev parent reply other threads:[~2018-06-06 0:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 0:46 [PATCH 00/29] binman: Add more tests and support for updating the device tree Simon Glass
2018-06-06 0:46 ` [PATCH 07/29] libfdt: Bring in proposed pylibfdt changes Simon Glass
2018-06-06 0:46 ` Simon Glass [this message]
2018-06-06 0:46 ` [PATCH 09/29] libfdt: Add get_property() and del_node() Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180606004705.79641-9-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=devicetree-compiler@vger.kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).