[OpenWrt-Devel] project: build speed-up with binary injection

Pieter Smith pieter at boesman.nl
Wed Sep 12 15:19:23 EDT 2018


Hi all,

I would like to extend the OpenWRT build system to allow a substantial
speed-up with optional pre-built binary injection. The goal is to
perform the full distro build including toolchain in less than 10 min
for the product that we develop.

My proposal is to augment the build so that build results can optionally
be published of fetched. Locally compiled build results can be published
for potential fetch and injection on future builds by other developers
or build slaves.

Above all the implementation should guarantee repeatability and
consistency. A fetch and inject speed up will only be allowed if it does
not violate this requirement.

So far I have come up with the idea to guarantee this by publishing
build results under a strong hash (sha1 or better). The hash is
based on the source state of what needs to be built, and the hashes of
all dependencies and configuration leading up to that (Something similar
to what git does to calculate a commit id).

If the calculated hash for what has to be built can be fetched and
injected, consistency is guaranteed and the speedup is safe. If the
calculated hash has not been built before, the build step is performed
and the result is published under the calculated hash.

Can anyone comment on the above?

Regards,
Pieter Smith

P.S. If I missed something existing that can already achieve some of the
build speed-up, please let me know.


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list