Closed dvescovi1 closed 5 years ago
The issue is the directory case sensitivity. I was under the impression if you did a GitHub clone in wsl that the Linux/Windows CRLF/Case sensitivity was all taken care of. I now believe this is true only for CRLF but not for case sensitivity. When you checkout and build u-boot in your wsl (Linux) home directory the "SPL" directory is created if you do the same from say /mnt/c/msiot/u-boot u-boot makes an "spl" directory and make dies. This is because /mnt/c mount point is case insensitive and seems to be inherited for subsequent created directories. I prefer to build firmware from a directory under the c drives mount point (i.e. /mnt/c/msiot for example) this makes the final firmware files easer to access from native Windows … as launching Visual Studio 2017 for the image build is usually my next step after building the firmware. I founding by using the "per directory case sensitivity" (see this) feature now available in wsl I can improve the firmware build script.
I also reworked most of the other build instruction to be more "path relative" removing the dependency on home directory(~) .
I'll submit a PR for the tweaks.
I believe I have mentioned this issue before but don't recall if it was ever resolved. It is becoming quite annoying now. I am building firmware under WSL. If I create a ms-iot directory under my Linux home directory (all from within WSL) and clone everything there I can build u-boot just fine. If I create a ms-iot directory under the C drive's mount point "/mnt/c" again totally from within WSL … like david@MY-PC:mkdir /mnt/c/ms-iot then clone u-boot there and try to build it always fails at the MKIMAGE SPL like:
LDS spl/u-boot-spl.lds LD spl/u-boot-spl OBJCOPY spl/u-boot-spl-nodtb.bin COPY spl/u-boot-spl.bin CFGS arch/arm/mach-imx/spl_sd.cfg.cfgtmp MKIMAGE SPL ./tools/mkimage: Can't open SPL: Invalid argument arch/arm/mach-imx/Makefile:162: recipe for target 'SPL' failed make[1]: [SPL] Error 1 Makefile:1115: recipe for target 'SPL' failed make: [SPL] Error 2 david@HOME5-PC:/mnt/c/ms-iot/u-boot$
At first I thought it might be a Windows/Linux CRLF or case sensitivity issue but my understanding is as long as you create directories and clone everything from within WSL CRLF/case should not be an issue. What is the problem with the u-boot MKIMAGE script that causes this? Can it be tweaked to avoid this problem?