Reputation: 41
For a project(Arm i.mx6) I use buildroot for creating my setup. This works very well.
My problem is that I want to re-use the build to create an installer. Without using the make clean option.
What I am currently doing:
1]. compile buildroot with file system overlay (A)
2]. Make clean
3]. compile buildroot with file system overlay (B)
This takes a lot of time.
I have tried:
1]. compile buildroot with file system overlay (A)
2]. compile buildroot with file system overlay (B) But then the files from system overlay (A) are inserted in system overlay (B).
I need A and B because in B I have the installer scripts and the Tar.gz result of A. What I do not want in B is the scripts of A due to the fact that A has network settings which I do not need in B.
Upvotes: 2
Views: 2756
Reputation: 3464
There is at the moment not really a good way to achieve this in buildroot. It is possible to build your toolchain separately and use it for both build configurations. In other words, you would have three configurations:
toolchain_defconfig
overlay_a_defconfig
overlay_b_defconfig
toolchain_defconfig
should set BR2_HOST_DIR
to point to a permanent location, e.g. /opt/toolchain
. The other configs should use a custom external toolchain based at that location.
This option is only possible for the toolchain itself (so compiler and libc). It is not possible to extend the toolchain with additional libraries and use these in the build.
A second possibility is to enable BR2_CCACHE. ccache is able to avoid most of the actual compilation steps. This is particularly helpful for big packages (Qt, Webkit, Node, ...).
Finally, if the only difference between your two configurations is the overlay, you also have the option to build everything except the overlay with buildroot, and write a custom script to combine the tarball generated by buildroot with your overlay and create the final rootfs from that.
Upvotes: 1
Reputation: 4849
As far as I understand you just need two "independent" root file systems. You can create two folders and use them with two different configs:
cd buildroot
mkdir rootfsa
mkdir rootfsb
make O=rootfsa menuconfig
make O=rootfsa
make O=rootfsb menuconfig
make O=rootfsb
Now you have two different rootfs.tar
files: one in rootfsa/images
and another one in rootfsb/images
Upvotes: 0