[Buildroot] Cross-compiling out-of-tree kernel modules and user-space apps

Mason slash.tmp at free.fr
Wed May 3 09:48:28 UTC 2017


On 03/05/2017 11:35, Thomas Petazzoni wrote:

> On Wed, 3 May 2017 11:15:15 +0200, Mason wrote:
> 
>> I use buildroot to generate kernel + rootfs image for an ARM
>> platform, typically cross-compiled with the Linaro toolchain.
>>
>> I also have a large body of software in a separate repo
>> (outside of the BR tree) with its own build system.
> 
> What do you call "its own build system" ?

A scary jungle of intertwined / recursive Makefiles. Basically,
one types 'make all' to build modules, libs, apps, and firmwares.
Sorting this mess out would be a multi-man-months effort.

>> This repo includes kernel modules, user-space libraries
>> and apps, which need to be cross-compiled and built on
>> top of the rootfs generated by BR.
>>
>> Therefore, I would need to pass some information from BR
>> to the separate build system, such as
>>
>> - ARCH
>> - CROSS_COMPILE
>> - location of the cross-toolchain, to add to the PATH
>> - location of the sysroot
>>
>> What is the best way to do this?
> 
> Create Buildroot packages for the different software components you
> need to build.

OK, what's the second best way to do this, then?

The way it was done in the past is to get BR to produce a script
that exports the above information, and source said script before
invoking the proprietary build system.

Regards.


More information about the buildroot mailing list