[Buildroot] auto-detecting toolchain metadata?
hollis_blanchard at mentor.com
Tue Nov 1 18:39:35 UTC 2016
I'm running into a problem where I'm distributing a Buildroot-based tree
(config + scripts) to some users. They really only use Linux,
bootloader, and busybox, and since they've been building those pieces
for a while, they already have toolchains laying around.
I'd like to let them use whatever toolchain they've been using, and
ideally that would be as simple as "change BR2_TOOLCHAIN_EXTERNAL_PATH
in defconfig". Of course, it's not that simple; Buildroot wants more
information: gcc version, kernel headers, target tuple, etc. I suspect
the reason Buildroot needs that extra metadata is to build userland
packages that are more complex than busybox.
Providing another toolchain to them, with known settings for the
defconfig, is one option. However, it's hard to justify throwing away
the toolchain they've been using without problem, especially since they
don't really care about userland. (Some of them may want to get really
fancy and add an SSH server, but I've only seen that once.)
Another option I'm considering is a script to try to detect the
necessary metadata from a given toolchain path. As far as I can see,
every piece of it can be detected from external observation. It could be
invoked outside Buildroot (modifying defconfig), but of course it could
be invoked from within Buildroot's toolchain recipes too. Is there a
reason this is a bad idea or hasn't already been done?
Hollis Blanchard <hollis_blanchard at mentor.com>
Mentor Graphics Emulation Division
More information about the buildroot