[PATCH 29/31] doc: Show how to build sandbox for MSYS2

Simon Glass sjg at chromium.org
Tue Apr 25 01:08:34 CEST 2023


Add instructions for building u-boot.exe to run on Windows.

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

 doc/build/gcc.rst | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst
index a0650a51db4b..40d0bde52413 100644
--- a/doc/build/gcc.rst
+++ b/doc/build/gcc.rst
@@ -184,8 +184,43 @@ Important ones are
 * clean - remove most generated files but keep the configuration
 * mrproper - remove all generated files + config + various backup files
 
+Building for Windows
+--------------------
+
+Limited support is available for Windows, including building sandbox.
+
+It is best to use an out-of-tree build, so you can build multiple boards,
+with the output in a temporary directory like `/tmp/b`.
+
+First enable Windows developer mode with `Developer Mode`_. Then run the MSYS2
+shell and enable symbolic links::
+
+   cd
+   echo "export MSYS=winsymlinks:nativestrict" >>.bashrc
+
+Close all MSYS2 shells so that the setting takes effect.
+
+To build sandbox, first install some required packages::
+
+    pacman install bc bison diffutils flex gcc libgnutls-devel \
+      libutil-linux-devel make openssl-devel python python-setuptools swig
+
+then::
+
+    make O=/tmp/b/sandbox -j$(nproc) sandbox_defconfig all
+
+Note that it currently only gets as far as running binman, since this doesn't
+fully work on Windows.
+
+You can also build sandbox_spl::
+
+    make O=/tmp/b/sandbox_spl -j$(nproc) sandbox_spl_defconfig all
+
+
 Installation
 ------------
 
 The process for installing U-Boot on the target device is device specific.
 Please, refer to the board specific documentation :doc:`../board/index`.
+
+.. _`Developer Mode`: https://msdn.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development
-- 
2.40.0.634.g4ca3ef3211-goog



More information about the U-Boot mailing list