sudomesh / sudowrt-firmware

Scripts to build the sudo mesh OpenWRT firmware.
Other
73 stars 19 forks source link

WIP: Try and speed up build system #115

Closed jkilpatr closed 6 years ago

jkilpatr commented 6 years ago

So there are two very basic features of make that this build system seems to intentionally short circuit. 1) parallelism and 2) build caching. Some basic tests of my own show that paralleism is a 6x build speed increase on my desktop and caching results in a 3min rebuild after building everything once. The issue is of course dealing with transforming an existing build directory with cached build data into one with changes. Paralleism also makes debugging difficult, so you have to either have a debugging mode or tell the user 'go to this dir and run make V=s'.

I think this patch still has some bugs, it's difficult to test on my Fedora machine (distro specific build systems and docker based build systems generally solve problems today but create problems of unknown deps and requirements in the future).

jkilpatr commented 6 years ago

you may also be interested in my own attempt at a OpenWRT build system in Ansible.

https://github.com/althea-mesh/althea-firmware

It doesn't have feature parity with the sudowrt system yet. But it leans on Ansible's modules heavily to allow easy imdepotence and apply deltas to the existing build dir efficiently. It also maintains a list of per distro package requirements where the correct disto is selected and it's deps installed automatically.

jhpoelen commented 6 years ago

@jkilpatr - thanks for sharing - I'll fix the buildcores vs systemcores issue.