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

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Apr 25 04:20:20 CEST 2023



Am 25. April 2023 01:08:34 MESZ schrieb Simon Glass <sjg at chromium.org>:
>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

Please, describe why you suggest to enable developer mode.

According to https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links creation of symbolic links depends on policies and user authorization.

Please, mention the security implications.

Best regards

Heinrich

>+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


More information about the U-Boot mailing list