[U-Boot] [PATCH 0/5] tools: Support building U-Boot host tools for Windows via MSYS2

Bin Meng bmeng.cn at gmail.com
Wed Oct 16 16:27:20 UTC 2019

Per current U-Boot README, building Windows versions of the utilities
in the tools directory is done via the MinGW toolchain. But testing
shows that it is broken and actually it must have been broken for
quite a long time.

Fixing MinGW build seems quite amount of work as developers of
U-Boot normally work on Linux boxes hence codes written are mainly
for Linux or POSIX OSes. We must investigate another way of building
host tools for Windows, and now we have MSYS2, a software distro and
building platform for Windows, to build POSIX compliant software on
Windows using an emulation layer.

This small series fixes several issues in current U-Boot tools codes,
that only assume a Linux host is used. Cases are using standard C
typedefs whenever possbile, or using compiler builtin functions to
improve portability, etc.

A reST document for how to build U-Boot host tools for both platforms
is added.

Bin Meng (5):
  tools: image.h: Use portable uint32_t instead of linux-specific __be32
  tools: mtk_image.h: Use portable uintXX_t instead of linux-specific
  tools: zynqmpbif: Use compiler builtin instead of linux-specific
  linux/types.h: Surround 'struct ustat' with __linux__
  doc: Add documentation for how to build U-Boot host tools

 doc/build/index.rst   |  9 ++++++
 doc/build/tools.rst   | 47 ++++++++++++++++++++++++++++
 doc/index.rst         | 11 +++++++
 include/image.h       | 14 ++++-----
 include/linux/types.h |  2 ++
 tools/mtk_image.h     | 86 +++++++++++++++++++++++++--------------------------
 tools/zynqmpbif.c     |  2 +-
 7 files changed, 120 insertions(+), 51 deletions(-)
 create mode 100644 doc/build/index.rst
 create mode 100644 doc/build/tools.rst


More information about the U-Boot mailing list