4

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.

lxusr
  • 987
  • 3
  • 16
  • 28

1 Answers1

4

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.

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • I am trying to make the same configuration work on buildroot-2009.01 meaning external toolchain ; but end up having some errors during the build. Is there a way I can make this work on the older buildroot ? – lxusr Oct 20 '11 at 12:10
  • There was an issue with uclibc.mk ; the if for BR2_TOOLCHAIN_SOURCE did not have a endif. Seeing that this issue is fixed in buildroot-2009.02. For anyone who would like to use EXTERNAL TOOLCHAIN in buildroot-2009.01 put an endif @ the end in uclibc.mk under buildroot-2009.01/toolchain/uClibc folder. Thanks. – lxusr Oct 28 '11 at 10:05