OpenWrt 18.06 build system port to cygwin

If you ever wanted to build your beloved OpenWrt on a Windows box under cygwin - now you can.
I've done some work porting and fixing stuff and proven this to be working for me.

Here is a link to the github page with forked repo containing my changes:

Tag v18.06.2-cygwin-rc1 is essentially the same as v18.06.2 with cygwin compatibility applied. Tag v18.06.2-cygwin-bpir2-rc1 is v18.06.2 + cygwin compatibility + improved support for Bannana Pi R2 board. Tracking branches openwrt-18.06-cygwin and openwrt-18.06-bpir2 are where I do my devwork for "stable". openwrt-18.06-cygwin-bpir2 branch is an integration branch having my changes both for cygwin and BPi R2. I hadn't worked on trying to forward port this work to master as my main focus was and is on providing myself with a stable OS firmware to use with my BPi R2 boards.

I'm planning to take a look onto this forward porting thing though if I get a chance and some free time for it.


Is this faster than WSL?

Don't know yet - host system on my laptop is Windows 7 so there's no WSL there. I'm planning to do a comparison on a Windows 10 box sometime next month.

Comparing the speed I get on linux running in the VirtualBox VM on the same notebook I bet that WSL would be significantly faster. Building stuff is heavily reliant on shell scripts which means forks, lots of forks. Having forks handled by WSL at kernel level suggests that it would be way faster compared to cygwin's fork emulation in userland. So this port is not about the speed, it is more like an accessibility thing for people using Windows 7/8.1 or for those who don't want to tinker with enabling devmode and installing WSL. Ah, and it was a just-for-fun thing for me to complete this puzzle. :slight_smile:

Makes sense. WSL is probably faster then.

I applied these patches to latest master. They seem to be perfectly fine.

An extra bug fix is required if you're building squashfs-based image. Here are details:

Hadn't pushed this change to my github page yet.