[Buildroot] linux: why is vmlinux only available for mips?

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Fri Jul 15 11:55:38 UTC 2011


On Fri, Jul 15, 2011 at 11:46 AM, Daniele Salvatore Albano
<info at daccii.it> wrote:
> Il 15/07/2011 11:34, Thomas De Schampheleire ha scritto:
>>
>> This works fine in the context of buildroot. However, I need to access
>> these files from a non-buildroot context (external makefiles/scripts)
>> and so the variable BR2_LINUX_KERNEL_VERSION is not known.
>>
>> Thomas
>
> If you're using *sh scripts, you can just do something like
> . /PATH/TO/BUILDROOT/.config
>
> to access buildroot config variables so you can use that variable
>
> If you're using make file i don't know, but there is a way to do it too,
> sure :)
>
> In the end, if you're using anithing else you can try to parse using regular
> expressions (needs delimiters and/or backslashes around quotes)
> BR2_LINUX_KERNEL_VERSION="?([a-zA-Z0-9\.\-]+)"?
>
> or cat, grep and cut
> cat .config | grep BR2_LINUX_KERNEL_VERSION | cut -d"\"" -f2

This is indeed a good suggestion that I didn't think of before.
For Makefiles, you can also include the .config file as-is; in fact,
this is how the buildroot Makefile does it.
I will try and see if this solves all my use-cases.

Thanks!
Thomas



More information about the buildroot mailing list