
Am 25. April 2023 01:08:34 MESZ schrieb Simon Glass sjg@chromium.org:
Add instructions for building u-boot.exe to run on Windows.
Signed-off-by: Simon Glass sjg@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 +--------------------
Do you mean 'on 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`.
This chapter sems not to be about building on Windows generally. Are you possibly using MinGW or MinGW-w64? How about cygwin?
Please, describe the build environment accurately.
Wouldn't it be a much saner approach to use WSL? Then we don't need any of the quirks.
Best regards
Heinrich
+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-...