Philippe Mathieu-Daudé <phi...@redhat.com> writes:

> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> ---
>  tests/docker/Makefile.include                 |  1 +
>  .../dockerfiles/fedora-win10sdk-cross.docker  | 21 +++++++++++++++++++
>  2 files changed, 22 insertions(+)
>  create mode 100644 tests/docker/dockerfiles/fedora-win10sdk-cross.docker
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 50a400b573..0df72a810b 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -125,6 +125,7 @@ docker-image-debian-ppc64-cross: docker-image-debian10
>  docker-image-debian-riscv64-cross: docker-image-debian10
>  docker-image-debian-sh4-cross: docker-image-debian10
>  docker-image-debian-sparc64-cross: docker-image-debian10
> +docker-image-fedora-win10sdk-cross: docker-image-fedora
>
>  docker-image-travis: NOUSER=1
>
> diff --git a/tests/docker/dockerfiles/fedora-win10sdk-cross.docker 
> b/tests/docker/dockerfiles/fedora-win10sdk-cross.docker
> new file mode 100644
> index 0000000000..1aafdad483
> --- /dev/null
> +++ b/tests/docker/dockerfiles/fedora-win10sdk-cross.docker
> @@ -0,0 +1,21 @@
> +#
> +# Docker MinGW64 cross-compiler target with WHPX header installed
> +#
> +# This docker target builds on the Fedora 30 base image.
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +FROM qemu:fedora
> +
> +# Install headers extracted by the Android folks from the win10sdk.iso:
> +# https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
> +ENV WIN10SDK_INCDIR /usr/local/include/win10sdk
> +RUN mkdir ${WIN10SDK_INCDIR} && \
> +    for hdr in WinHvEmulation.h WinHvPlatformDefs.h WinHvPlatform.h; do \
> +        curl -s 
> "https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/+/1bde9c3b14f3a3b081ada6e32da9f2870671b46f/x86_64-w64-mingw32/include/${hdr}?format=TEXT";
>  | base64 --decode > ${WIN10SDK_INCDIR}/${hdr}; \
> +    done

Hmm I guess this is a stable URL as Google never deletes anything?

> +
> +ENV QEMU_CONFIGURE_OPTS ${QEMU_CONFIGURE_OPTS} \
> +    --cross-prefix=x86_64-w64-mingw32- \
> +    --extra-cflags="-I ${WIN10SDK_INCDIR}" --disable-werror \
> +    --enable-hax --enable-whpx


--
Alex Bennée

Reply via email to