30 Oct, 2019

3 commits


29 Oct, 2019

9 commits

  • Microsoft Azure Pipelines [1] provides unlimited CI/CD minutes and
    10 parallel jobs to every open source project for free.

    This adds a configuration file for Azure Pipelines to utilize the
    free Windows VM hosted by Microsoft to ensure no build broken in
    building U-Boot host tools for Windows.

    [1] https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/

    Signed-off-by: Bin Meng

    Bin Meng
     
  • When building U-Boot host tools for Windows from Microsoft Azure
    Pipelines, the following errors were seen:

    HOSTCC tools/mkenvimage.o
    In file included from tools/mkenvimage.c:25:
    ./tools/version.h:1:1: error: expected identifier or ‘(’ before ‘.’ token
    1 | ../include/version.h
    | ^
    tools/mkenvimage.c: In function ‘main’:
    tools/mkenvimage.c:117:4: warning: implicit declaration of function ‘usage’ [-Wimplicit-function-declaration]
    117 | usage(prg);
    | ^~~~~
    tools/mkenvimage.c:120:35: error: ‘PLAIN_VERSION’ undeclared (first use in this function)
    120 | printf("%s version %s\n", prg, PLAIN_VERSION);
    | ^~~~~~~~~~~~~
    tools/mkenvimage.c:120:35: note: each undeclared identifier is reported only once for each function it appears in
    make[2]: *** [scripts/Makefile.host:114: tools/mkenvimage.o] Error 1

    It turns out tools/version.h is a symbolic link and with Windows
    default settings it is unsupported hence the actual content of
    tools/version.h is not what file include/version.h has, but the
    the linked file path, which breaks the build.

    To fix this, remove the symbolic links for tools/version.h. Instead
    we perform a copy from include/version.h during the build.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • When building U-Boot host tools for Windows from Microsoft Azure
    Pipelines, we see tons of weird warnings and errors emitted from
    every Kconfig files:

    Kconfig:6:warning: ignoring unsupported character ''
    Kconfig:6:warning: ignoring unsupported character ''
    Kconfig:8:warning: ignoring unsupported character ''
    Kconfig:9:warning: ignoring unsupported character ''
    Kconfig:10:warning: ignoring unsupported character ''
    Kconfig:10:warning: ignoring unsupported character ''
    Kconfig:13:warning: ignoring unsupported character ''
    arch/Kconfig:1:warning: ignoring unsupported character ''
    arch/Kconfig:2:warning: ignoring unsupported character ''
    arch/Kconfig:2:warning: ignoring unsupported character ''
    arch/Kconfig:4:warning: ignoring unsupported character ''
    ...

    After several rounds of experiments, it turns out this is caused
    by line endings. Historically, Linux and macOS used linefeed (LF)
    characters while Windows used a carriage return plus a linefeed
    (CRLF). When Azure Pipelines checks out the U-Boot repo, Git tries
    to compensate for the difference by automatically making lines end
    in CRLF in the working directory on Windows, which confuses the
    Kconfig file parsing logic.

    Fortunately Git provides a way for repos to tell Git not to do such
    automatical line endings conversion via .gitattributes file below:

    * text eol=lf

    Signed-off-by: Bin Meng

    Bin Meng
     
  • This adds a reST document for how to build U-Boot host tools,
    including information for both Linux and Windows.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • Some compilers may provide __packed define for us.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • 'struct ustat' uses linux-specific typedefs to declare its memebers:
    __kernel_daddr_t and __kernel_ino_t. It is currently not used by any
    U-Boot codes, but when we build U-Boot tools for other platform like
    Windows, this becomes a problem.

    Let's surround it with __linux__.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • __swab32() is a Linux specific macro defined in linux/swab.h. Let's
    use the compiler equivalent builtin function __builtin_bswap32() for
    better portability.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • __leXX has Linux kernel specific __attribute__((bitwise)) which is
    not portable. Use corresponding uintXX_t instead.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • __be32 has Linux kernel specific __attribute__((bitwise)) which is
    not portable. Use uint32_t instead.

    Signed-off-by: Bin Meng

    Bin Meng
     

26 Oct, 2019

18 commits


25 Oct, 2019

10 commits