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 v2 00/29] binman: Add more tests and support for updating the device tree
Date: Fri, 6 Jul 2018 10:27:13 -0600 [thread overview]
Message-ID: <20180706162742.186950-1-sjg@chromium.org> (raw)
At present we have 100% code coverage for binman. This series adds the
same for dtoc (which converts device-tree data to C) and the Fdt class
(which provides convenient Python access to the device tree).
Binman already support writing a map file showing the location of each
entry in the images in produces. But, with the exception of automatic
linker symbols in SPL, this information is not available to U-Boot
itself. The series adds support for this, by writing the updated entry
position and size back to the device tree for inclusion in the image.
With this, U-Boot can easily read this information and locate image
entries at runtime.
Note: At present the access to device-tree values is more clumbsy than
it could be. Once pylibfdt support is finished, this needs another look.
Changes in v2:
- Correct logic for detecting python modules (changed with python-coverage)
- Show the full output when some modules are not tested
- Update text in test/run script also
- Allow specifying modules which must be tested
- Test that this works whether coverage shows a .py extension or not
- Expand tests to increase code coverage to 100%
- Update to cope with GetPhandle() being removed
- Update coverage to only include dtb_platdata.py
- Add new patch to enable cover-coverage tests for dtoc and fdt
- Update tests to main 100% code coverage
Simon Glass (28):
binman: Make the operation of Entry__testing explicit
binman: Tidy up variables in _RunMicrocodeTest()
binman: Correct operation of ObtainContents()
binman: Tidy up execution of tests
binman: Tidy up setting of entry contents
libfdt: Bring in proposed pylibfdt changes
libfdt: Fix the Python pack() function
libfdt: Add get_property() and del_node()
binman: Move coverage logic into a new test_util file
dtoc: Add some tests for the fdt module
dtoc: Update tests to write failures to /tmp
dtoc: Make use of the new pylibfdt methods
dtoc: Drop use of a local dtb buffer
dtoc: Update fdt tests to increase code coverage
dtoc: Keep track of property offsets
dtoc: Fix Fdt.GetNode() to handle a missing node
dtoc: Fix properties with a single zero-arg phandle
dtoc: Fix some minor errors
dtoc: Add a test for code coverage
binman: Move capture_sys_output() to test_util
dtoc: Increase code coverage to 100%
test: Enable cover-coverage tests for dtoc and fdt
dtoc: Avoid unwanted output during tests
dtoc: Add functions to add integer properties
binman: Complete documentation of stages
binman: Add a ProcessFdt() method
binman: Add a SetCalculatedProperties() method
binman: Support updating the device tree with calc'd info
Tom Rini (1):
binman: Switch to 'python-coverage'
scripts/dtc/libfdt/libfdt.h | 3 +
scripts/dtc/pylibfdt/libfdt.i_shipped | 725 ++++++++++++++++--
test/run | 7 +-
tools/binman/README | 45 +-
tools/binman/binman.py | 40 +-
tools/binman/bsection.py | 27 +
tools/binman/cmdline.py | 2 +
tools/binman/control.py | 58 +-
tools/binman/elf_test.py | 22 +-
tools/binman/entry.py | 42 +
tools/binman/etype/_testing.py | 37 +-
tools/binman/etype/blob.py | 3 +-
tools/binman/etype/section.py | 13 +-
tools/binman/etype/u_boot_dtb_with_ucode.py | 47 +-
tools/binman/etype/u_boot_spl_bss_pad.py | 4 +-
tools/binman/etype/u_boot_ucode.py | 9 +-
tools/binman/etype/u_boot_with_ucode_ptr.py | 11 +-
tools/binman/ftest.py | 159 +++-
tools/binman/image.py | 17 +
tools/binman/image_test.py | 2 +-
tools/binman/test/41_unknown_pos_size.dts | 1 +
tools/binman/test/57_unknown_contents.dts | 14 +
.../test/58_x86_ucode_spl_needs_retry.dts | 36 +
tools/binman/test/59_change_size.dts | 14 +
tools/binman/test/60_fdt_update.dts | 31 +
tools/binman/test/61_fdt_update_bad.dts | 32 +
tools/dtoc/dtb_platdata.py | 15 +-
tools/dtoc/dtoc.py | 35 +-
tools/dtoc/dtoc_test_add_prop.dts | 24 +
tools/dtoc/dtoc_test_addr32_64.dts | 2 +-
tools/dtoc/dtoc_test_addr64_32.dts | 2 +-
tools/dtoc/dtoc_test_bad_reg.dts | 17 +
tools/dtoc/dtoc_test_bad_reg2.dts | 17 +
tools/dtoc/dtoc_test_phandle.dts | 6 +
tools/dtoc/dtoc_test_phandle_bad.dts | 16 +
tools/dtoc/dtoc_test_phandle_bad2.dts | 22 +
tools/dtoc/dtoc_test_phandle_reorder.dts | 23 +
tools/dtoc/dtoc_test_phandle_single.dts | 23 +
tools/dtoc/dtoc_test_simple.dts | 1 +
tools/dtoc/fdt.py | 115 ++-
tools/dtoc/fdt_util.py | 29 +-
tools/dtoc/test_dtoc.py | 222 +++++-
tools/dtoc/test_fdt | 1 +
tools/dtoc/test_fdt.py | 450 +++++++++++
tools/patman/test_util.py | 85 ++
45 files changed, 2244 insertions(+), 262 deletions(-)
create mode 100644 tools/binman/test/57_unknown_contents.dts
create mode 100644 tools/binman/test/58_x86_ucode_spl_needs_retry.dts
create mode 100644 tools/binman/test/59_change_size.dts
create mode 100644 tools/binman/test/60_fdt_update.dts
create mode 100644 tools/binman/test/61_fdt_update_bad.dts
create mode 100644 tools/dtoc/dtoc_test_add_prop.dts
create mode 100644 tools/dtoc/dtoc_test_bad_reg.dts
create mode 100644 tools/dtoc/dtoc_test_bad_reg2.dts
create mode 100644 tools/dtoc/dtoc_test_phandle_bad.dts
create mode 100644 tools/dtoc/dtoc_test_phandle_bad2.dts
create mode 100644 tools/dtoc/dtoc_test_phandle_reorder.dts
create mode 100644 tools/dtoc/dtoc_test_phandle_single.dts
create mode 120000 tools/dtoc/test_fdt
create mode 100755 tools/dtoc/test_fdt.py
create mode 100644 tools/patman/test_util.py
--
2.18.0.203.gfac676dfb9-goog
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
next reply other threads:[~2018-07-06 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 16:27 Simon Glass [this message]
2018-07-06 16:27 ` [PATCH v2 07/29] libfdt: Bring in proposed pylibfdt changes Simon Glass
2018-07-09 19:52 ` Simon Glass
2018-07-06 16:27 ` [PATCH v2 08/29] libfdt: Fix the Python pack() function Simon Glass
2018-07-09 19:52 ` Simon Glass
2018-07-06 16:27 ` [PATCH v2 09/29] libfdt: Add get_property() and del_node() Simon Glass
2018-07-09 19:52 ` 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=20180706162742.186950-1-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).