U-boot compile for DE10-NANO under Windows10 via Cygwin: unable to execute binary file?

Hello,
On several post I read that the job cannot is not possible, other claim it is.
There is a document by OGUS METEER (Bitlog.IT) describing the job for Linux,
I am trying to follow this document but without success until now.
This post is a bit long, but i tried to describe my steps in much detail.

  1. Quartus + Qsys part = no problem.
  2. Compile the preloader : be sure to execute “export PATH=/bin:$PATH” otherwise tar gets confused in different versions (help by @JanKonecny)
  3. Compile U-Boot

untar compiler:
tar -xvf gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz (ok)

define exported CROSS_COMPILE:
export CROSS_COMPILE=$PWD/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
check:
$ echo $CROSS_COMPILE
/cygdrive/c/FpgaQsysProjects/DE10_NANO_SoC_GHRD/software/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
double check:
$ cd /cygdrive/c/FpgaQsysProjects/DE10_NANO_SoC_GHRD/software/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/
$ dir
arm-linux-gnueabihf-addr2line arm-linux-gnueabihf-cpp arm-linux-gnueabihf-gcc-6.3.1 arm-linux-gnueabihf-gcov-dump arm-linux-gnueabihf-ld arm-linux-gnueabihf-objdump arm-linux-gnueabihf-strip
arm-linux-gnueabihf-ar arm-linux-gnueabihf-dwp arm-linux-gnueabihf-gcc-ar arm-linux-gnueabihf-gcov-tool arm-linux-gnueabihf-ld.bfd arm-linux-gnueabihf-ranlib gdbserver
arm-linux-gnueabihf-as arm-linux-gnueabihf-elfedit arm-linux-gnueabihf-gcc-nm arm-linux-gnueabihf-gdb arm-linux-gnueabihf-ld.gold arm-linux-gnueabihf-readelf runtest
arm-linux-gnueabihf-c++ arm-linux-gnueabihf-g++ arm-linux-gnueabihf-gcc-ranlib arm-linux-gnueabihf-gfortran arm-linux-gnueabihf-nm arm-linux-gnueabihf-size
arm-linux-gnueabihf-c++filt arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcov arm-linux-gnueabihf-gprof arm-linux-gnueabihf-objcopy arm-linux-gnueabihf-strings
=> so I am very sure that $CROSS_COMPILE points to the right directory containing gcc compiler.

get U-Boot:
$ git clone https://github.com/altera-opensource/u-boot-socfpga.git
=> this line fails “error certificate varify locations”
possible but bold solution: $ git config --system http.sslverify false
$ git clone https://github.com/altera-opensource/u-boot-socfpga.git (ok)
$ cd u-boot-socfpga (ok)
$ git tag -l rel_socfpga* (ok)
$ git checkout rel_socfpga_v2013.01.01_17.08.01_pr (ok)

$ make mrproper
/cygdrive/c/FpgaQsysProjects/DE10_NANO_SoC_GHRD/software/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: /cygdrive/c/FpgaQsysProjects/DE10_NANO_SoC_GHRD/software/
gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: unable to execute binary file ??
unable to remove SPL, SPL is a directory.

!=> My question: why is cygwin unable to execute the binary file & why is make unable to remove SPL? Is this issue Cygwin related or did i forget someting (my experience in Linux is very limited).

make socfpga_cyclone5_config (ok)
make

!=> same error, unable to execute binary file, how can this be solved?

Best Regards,
Johi.

You grabbed a Linaro meant for Linux. It won’t work under Windows. The one that is meant to work under Windows has mingw in the name. For the particular one you grabbed, it would correspond to this one:
https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.05-i686-mingw32_arm-linux-gnueabihf.tar.xz

I’m still not sure you’ll get all the way through the compile.

There are a couple of other different ways you can build under Windows:

  • You can use the sources generated by the bsp-editor command from SoCEDS. These will be older U-Boot sources, but it should build under the Embedded Command Shell (also in SoCEDS). Use the command make uboot
  • You can run a virtual machine