lxusr
lxusr

Reputation: 1007

Buildroot toolchain - need to build only once

I have multiple platforms sharing the same buildroot. They differ in the buildroot packages. Is there a way in buildroot where I can configure to build the toolchain only once and then on it builds only the packages and target.

Example depiction without doing a make clean (so toolchain is intact):

1) Platform A updates some conf files in target's rootfs /etc (I am using platform A buildroot configuration files) once buildroot is built. 2) Platform B doesn't require the conf files but since make clean is not done (eventhough Platform B buildroot configuration files are used) ; unnecessary /etc/ are present in the target. If make clean is done then toolchain also needs to be rebuilt.

Thanks for any answers.

Upvotes: 4

Views: 5344

Answers (1)

Thomas Petazzoni
Thomas Petazzoni

Reputation: 5966

Yes. See http://free-electrons.com/~thomas/pub/using-buildroot-real-project.pdf for some unfinished slides about this.

What you can do is to build once for all a cross-compiling toolchain (with Buildroot or crosstool-NG), and then tell Buildroot to use this pre-built cross-compiling toolchain as an "External Toolchain". This way, Buildroot will use that existing compiler, and at every complete rebuilt of Buildroot, you will save the complete toolchain build time.

Note that this only works with reasonably recent versions of Buildroot, i.e, probably less than one year old.

Upvotes: 4

Related Questions