Page 1 of 1

Building Gargoyle on Windows 10 using WSL

Posted: Sun Dec 10, 2017 9:58 pm
by d3fz
After researching a little about WSL (Windows Subsystem for Linux), I've managed to install Ubuntu via Windows Store (pretty cool, right?), so I could give it a shot at trying to build Gargoyle from source, for the first time. After following the tutorial on how to build Gargoyle from source, I finally managed to generate my first build without any major problem. :)

But now I've ended up with some questions:

1) The first build didn't go smooth, though. I had to repeat it several times because every now and then a package couldn't be downloaded due to timeout, so the build stopped, and I was forced to rebuild everything again up to that point. Is this normal? Shouldn't be a problem from now on, since I downloaded all the necessary packages.

2) For my very first build, I've issued the following command "make ar71xx.ath10k-large" (profile for the Archer C7). Now I know that it should have been "make FULL_BUILD=true ar71xx.ath10k-large", and only after the first full build I should've issued "make ar71xx.ath10k-large", correct? Does it mean that my first build was somewhat "incomplete"? Because that thing took forever to finish (about 4h +/-), as it was previously announced on the tutorial.

3) I've done multiple tests builds after that, but this time issuing "time make ar71xx-large" to see how much time it was taking, which is around 70 minutes (for comparison, how is your time?). Is it possible to build only one or two images per build? So it takes way less time to compile, which would make testing builds a lot faster/easier.

4) Let's say Eric merged a big pull request, what's the best way to build from source now? Is it a "make FULL_BUILD=true" strictly necessary, or can I just update the changed files, and build from there? Which "make parameters" should I/do you use?

I would really appreciate some advice on these questions, thank you.

Quick info about the downloaded/generated files numbers on the build process, which kinda explains why it takes so long on the first time:

Generated/compiled "ar71xx-src" folder takes 10GB, with 330.941 files in 23.087 folders. :shock:
Downloaded packages take 600MB, with 7.822 files in 2.476 folders.

Re: Building Gargoyle on Windows 10 using WSL

Posted: Sun Dec 10, 2017 10:17 pm
by Lantis
Very cool. Last I tried with WSL it didn’t work due to it being a case sensitive system (I think).

That is unusual. Downloads are usually pretty stable.
Once the package exists in the Downloaded folder, it won’t be downloaded again (unless a newer version is stipulated).

Yes it should have been FULL_BUILD=true, but I believe if you leave that out on the first build it detects a lack of Openwrt toolchain and builds it.

70 minutes for subsequent builds sounds about right. I think my environment does about 40 minutes on an SSD.
No you can’t build only a few images. The build process builds the:
1. Openwrt toolchain and Kernel
2. Packages
3. Compiles these into images
So once you hit the end of step 2 you actually already have everything you need to generate all images for that target. The last 5 minutes is the build system piecing them all together into images. i.e. you’d only save 5 minutes.
At this stage you’ll see lots of text about LZMA and the author of the tool.

If the change was only packages, you can just do a make target.
If the kernel changed, I’d do a full build and clean my environment first (either make clean or make distclean if you want to really kill it)


Ispyisail probsbly has some different opinions here and has been doing itlonger than me

Re: Building Gargoyle on Windows 10 using WSL

Posted: Mon Dec 11, 2017 3:37 am
by ispyisail
Ubuntu server via Hyper-V

Always build "FULL_BUILD=true". In theory you only need to use "Build" but in the early days I had bad experiences.

I only build all packages

12 - 15 hours each build

Re: Building Gargoyle on Windows 10 using WSL

Posted: Mon Dec 11, 2017 1:53 pm
by d3fz
Thanks a lot for the feedback guys.
Lantis wrote:Very cool. Last I tried with WSL it didn’t work due to it being a case sensitive system (I think).

It seems like WSL was significantly improved after Windows 10 Fall Creators Update (Windows 10 Build 1709). Only after this big update that it was possible to install Ubuntu (16.04 LTS) directly through Windows Store.
70 minutes for subsequent builds sounds about right. I think my environment does about 40 minutes on an SSD.
40min to build all that is pretty fast, what's your system specs? I'm running on a Intel i7-6500U @ 2.5GHz / 8GB RAM laptop.
No you can’t build only a few images.
I see. What about packages? Is it possible to build a specific package instead of all of them? Or is it the same case as images?
If the change was only packages, you can just do a make target.
OK. So in this case (only packages update), should I issue "git clone http://github.com/ericpaulbishop/gargoyle.git" first, and then "make ar71xx.ath10k-large"?

After reading about the OpenWRT building process, I've seen some cases where "-j" parameter was passed, in order to speed up the building process by using all available cores. Does this (or any other useful parameters) also applies in this case?

Re: Building Gargoyle on Windows 10 using WSL

Posted: Mon Dec 11, 2017 4:08 pm
by Lantis
i7 4770k @ 4.4ghz, 24GB RAM

Yes you can build a single package after compiling once.
CD /ar71xx-src
make package/pkg_name/compile V=s

You can then grab that binary and install it on the images that you built from the original build process.

No need to git clone again. You’ve already got the repo setup.
Now you can
got fetch —all
git pull
that will get all changes and apply them to your local.
If you’ve made local changes you may need to revert them first

Re: Building Gargoyle on Windows 10 using WSL

Posted: Mon Dec 11, 2017 5:36 pm
by d3fz
Awesome. Thanks.

I'll do some more test builds before I start tinkering with "make custom". Any advice here? Or just modify/create a .config file and go for it?

One last thing, could you please move this thread to the "Show / Tell / Contribute" forum subsection? I believe there's a better thread visibility on that section, and this could help solve someone else's problem, just like I solved mine with your help. :)

Re: Building Gargoyle on Windows 10 using WSL

Posted: Tue Dec 12, 2017 4:44 am
by Lantis
I would do it as per discussion here
viewtopic.php?f=5&t=11299&p=47819#p47819