[PATCH v2 04/24] patman: Move library functions into a library directory

Simon Glass sjg at chromium.org
Wed Mar 8 23:17:37 CET 2023


The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 scripts/event_dump.py                         |  2 +-
 test/run                                      |  1 +
 tools/binman/bintool.py                       |  8 +++----
 tools/binman/bintool_test.py                  |  8 +++----
 tools/binman/btool/lz4.py                     |  2 +-
 tools/binman/btool/lzma_alone.py              |  2 +-
 tools/binman/cbfs_util.py                     |  4 ++--
 tools/binman/cbfs_util_test.py                |  4 ++--
 tools/binman/control.py                       |  6 ++---
 tools/binman/elf.py                           |  6 ++---
 tools/binman/elf_test.py                      |  8 +++----
 tools/binman/entry.py                         |  6 ++---
 tools/binman/entry_test.py                    |  2 +-
 tools/binman/etype/_testing.py                |  2 +-
 tools/binman/etype/atf_fip.py                 |  2 +-
 tools/binman/etype/blob.py                    |  4 ++--
 tools/binman/etype/blob_ext.py                |  4 ++--
 tools/binman/etype/blob_ext_list.py           |  4 ++--
 tools/binman/etype/fdtmap.py                  |  4 ++--
 tools/binman/etype/files.py                   |  2 +-
 tools/binman/etype/fill.py                    |  2 +-
 tools/binman/etype/fit.py                     |  2 +-
 tools/binman/etype/fmap.py                    |  6 ++---
 tools/binman/etype/gbb.py                     |  4 ++--
 tools/binman/etype/intel_ifwi.py              |  2 +-
 tools/binman/etype/mkimage.py                 |  2 +-
 tools/binman/etype/null.py                    |  2 +-
 tools/binman/etype/pre_load.py                |  2 +-
 tools/binman/etype/section.py                 |  6 ++---
 tools/binman/etype/text.py                    |  2 +-
 tools/binman/etype/u_boot_dtb_with_ucode.py   |  2 +-
 tools/binman/etype/u_boot_elf.py              |  2 +-
 tools/binman/etype/u_boot_env.py              |  2 +-
 tools/binman/etype/u_boot_spl_bss_pad.py      |  2 +-
 tools/binman/etype/u_boot_spl_expanded.py     |  2 +-
 tools/binman/etype/u_boot_tpl_bss_pad.py      |  2 +-
 tools/binman/etype/u_boot_tpl_expanded.py     |  2 +-
 .../binman/etype/u_boot_tpl_with_ucode_ptr.py |  4 ++--
 tools/binman/etype/u_boot_ucode.py            |  2 +-
 tools/binman/etype/u_boot_vpl_bss_pad.py      |  2 +-
 tools/binman/etype/u_boot_vpl_expanded.py     |  2 +-
 tools/binman/etype/u_boot_with_ucode_ptr.py   |  4 ++--
 tools/binman/etype/vblock.py                  |  2 +-
 tools/binman/fdt_test.py                      |  2 +-
 tools/binman/fip_util.py                      |  4 ++--
 tools/binman/fip_util_test.py                 |  4 ++--
 tools/binman/fmap_util.py                     |  2 +-
 tools/binman/ftest.py                         |  8 +++----
 tools/binman/image.py                         |  4 ++--
 tools/binman/image_test.py                    |  2 +-
 tools/binman/main.py                          |  7 +++---
 tools/binman/state.py                         |  4 ++--
 tools/buildman/builder.py                     |  6 ++---
 tools/buildman/builderthread.py               |  2 +-
 tools/buildman/cfgutil.py                     |  2 +-
 tools/buildman/control.py                     |  8 +++----
 tools/buildman/func_test.py                   |  8 +++----
 tools/buildman/main.py                        |  4 ++--
 tools/buildman/test.py                        |  8 +++----
 tools/buildman/toolchain.py                   |  6 ++---
 tools/dtoc/fdt.py                             |  2 +-
 tools/dtoc/fdt_util.py                        |  4 ++--
 tools/dtoc/main.py                            |  5 ++--
 tools/dtoc/test_dtoc.py                       |  4 ++--
 tools/dtoc/test_fdt.py                        |  7 +++---
 tools/dtoc/test_src_scan.py                   |  4 ++--
 tools/patman/__init__.py                      |  7 +++---
 tools/patman/__main__.py                      |  8 +++----
 tools/patman/checkpatch.py                    |  4 ++--
 tools/patman/control.py                       |  2 +-
 tools/patman/func_test.py                     |  6 ++---
 tools/patman/get_maintainer.py                |  2 +-
 tools/patman/gitutil.py                       |  4 ++--
 tools/patman/patchstream.py                   |  2 +-
 tools/patman/series.py                        |  4 ++--
 tools/patman/status.py                        |  4 ++--
 tools/patman/test_settings.py                 |  2 +-
 tools/rmboard.py                              |  2 +-
 tools/u_boot_pylib/__init__.py                |  4 ++++
 tools/u_boot_pylib/__main__.py                | 23 +++++++++++++++++++
 tools/{patman => u_boot_pylib}/command.py     |  2 +-
 .../cros_subprocess.py                        |  0
 tools/{patman => u_boot_pylib}/terminal.py    |  0
 tools/{patman => u_boot_pylib}/test_util.py   |  2 +-
 tools/{patman => u_boot_pylib}/tools.py       |  4 ++--
 tools/{patman => u_boot_pylib}/tout.py        |  2 +-
 tools/u_boot_pylib/u_boot_pylib               |  1 +
 87 files changed, 182 insertions(+), 151 deletions(-)
 create mode 100644 tools/u_boot_pylib/__init__.py
 create mode 100755 tools/u_boot_pylib/__main__.py
 rename tools/{patman => u_boot_pylib}/command.py (99%)
 rename tools/{patman => u_boot_pylib}/cros_subprocess.py (100%)
 rename tools/{patman => u_boot_pylib}/terminal.py (100%)
 rename tools/{patman => u_boot_pylib}/test_util.py (99%)
 rename tools/{patman => u_boot_pylib}/tools.py (99%)
 rename tools/{patman => u_boot_pylib}/tout.py (99%)
 create mode 120000 tools/u_boot_pylib/u_boot_pylib

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list