From patchwork Sun Oct 27 12:19:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1184990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qTBDUbbl"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 471H3x0G26z9sP4 for ; Sun, 27 Oct 2019 23:20:12 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id B19DCC21C8B; Sun, 27 Oct 2019 12:20:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5D4E0C21C2C; Sun, 27 Oct 2019 12:20:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DE96EC21C2C; Sun, 27 Oct 2019 12:20:06 +0000 (UTC) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by lists.denx.de (Postfix) with ESMTPS id 4C413C21C2C for ; Sun, 27 Oct 2019 12:20:06 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id q26so1117727pfn.11 for ; Sun, 27 Oct 2019 05:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xU8wIKbxsZFA6pGBWxwPkSakrCYBi9X9PHoE7DD2IQI=; b=qTBDUbblSjcbSU2cKKDlUIwZpk3OTwNq43HJZQG+vFAdQ9uv/zutmR/6CWNfGtUSFH RhNsImkbt2USvo9fqaqKmVPW9xeP43SM+1TdhgTlGJ+pTiZC4+cb5Nr8cuaK+H+Hzcvv Cq6zeQc006e7sRDoYgW0gO5+LJheL9Y78Uj6JyvRnPFmyyG6CnYGHCATxvhBc0h7zOSP HXwIwbBdwQGxSgBGq9c0wHpu3KCgD76fKswoTbC8VvwbVq007jGep/56QDiw6LaYwMY/ L7ttxAwR4gBa60k9I4wGNrNyRAgAZp/bKTPNgZHAOxnSEnIUfOnSZXKtDLiJmR9QHxMl IO/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xU8wIKbxsZFA6pGBWxwPkSakrCYBi9X9PHoE7DD2IQI=; b=DdomVzxles6W/x2bmYYU2nrDcMaXZWD7GVPOkpO73Qt0d5ZY9CQQ5X3STHlG680csT J85escKOt2nXpaOJHfZWsTcsxI8g3/acvvzgFdX3vGjrZGandsoAk2Ehy5WwiOOqG+SQ W/qQB35yCo1aLxw95Pd85FP/1wYsV//Imu5/p/t62WOKMl84lQmDi2eHuJZuv0MA+NSE J3soVOgx7PVBXwSFrOn2SAlE4+V7TnBxolhJpmCSikTwyi+oR4EyIU2sKw/qcmZlOtOq B1IBtoQSRLsjTGPgIslbqC5gUd3bulCPA5PO9bczy9M4IUE+soepg076cOSBdD5z8REi F2Mg== X-Gm-Message-State: APjAAAWUvKXe9msJ47Shb9YSMuPw3mRzwAF2X6BOtfELRGzQFmA5HSO4 tpBoYQKvoGetJqdcERyOdj0= X-Google-Smtp-Source: APXvYqyifNb64wy250fWMpu/tTi4ornsUXi0rQVP4iq/gu5u8x4q8zHhHebQWsjpohYDsDu+Hs3RyA== X-Received: by 2002:a63:6585:: with SMTP id z127mr15563494pgb.330.1572178804423; Sun, 27 Oct 2019 05:20:04 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id 66sm895891pgi.49.2019.10.27.05.20.03 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 27 Oct 2019 05:20:03 -0700 (PDT) From: Bin Meng To: Tom Rini , U-Boot Mailing List Date: Sun, 27 Oct 2019 05:19:39 -0700 Message-Id: <1572178788-26246-1-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Cc: Remy Bohmer , Peter Tyser , Mike Frysinger , Vladimir Yakovlev Subject: [U-Boot] [PATCH v3 0/9] tools: Support building U-Boot host tools for Windows via MSYS2 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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. A new CI pipeline configuration for Microsoft Azure Pipelines is added for U-Boot. We rely on it to ensure future host tools for Windows build does not break. I've also investigated putting what we have for now on GitLab-CI and Travis-CI to Azure Pipelines, and it turns out there are several issues that should be fixed. I will post a follow-up patch series for enabling full CI testing on Azure Pipelines. Changes in v3: - new patch: tools: ifwitool: Define __packed when it is not defined - rename to .azure-pipelines.yml - correct typo in the commit summary Changes in v2: - new patch: Add .gitattributes for line endings - new patch: tools: Avoid creating symbolic links for tools/version.h - new patch: Add Microsoft Azure pipelines configuration Bin Meng (9): tools: image.h: Use portable uint32_t instead of linux-specific __be32 tools: mtk_image.h: Use portable uintXX_t instead of linux-specific __leXX tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32 linux/types.h: Surround 'struct ustat' with __linux__ tools: ifwitool: Define __packed when it is not defined doc: Add documentation for how to build U-Boot host tools Add .gitattributes for line endings tools: Avoid creating symbolic links for tools/version.h Add Microsoft Azure Pipelines configuration .azure-pipelines.yml | 38 +++++++++++++++++++++++ .gitattributes | 2 ++ Makefile | 9 ++++-- doc/build/index.rst | 9 ++++++ doc/build/tools.rst | 47 ++++++++++++++++++++++++++++ doc/index.rst | 11 +++++++ include/image.h | 14 ++++----- include/linux/types.h | 2 ++ tools/.gitignore | 1 + tools/ifwitool.c | 2 ++ tools/mtk_image.h | 86 +++++++++++++++++++++++++-------------------------- tools/version.h | 1 - tools/zynqmpbif.c | 2 +- 13 files changed, 169 insertions(+), 55 deletions(-) create mode 100644 .azure-pipelines.yml create mode 100644 .gitattributes create mode 100644 doc/build/index.rst create mode 100644 doc/build/tools.rst delete mode 120000 tools/version.h