[LEDE-DEV] Identifying kernel version (major) during build (.mk file)
ardeleanalex at gmail.com
Sat Feb 18 04:57:52 PST 2017
Your case seems a bit specific.
But I guess you can try a few things and inspire yourself from
Not sure if the KERNEL_BASE variable is what you need.
i.e. I can't tell what the output will be in that case.
But from the looks of it, you can also probably use the split_version
[ + maybe also the firstword ] function[s] to extract the major
On Sat, Feb 18, 2017 at 1:49 PM, Mauro Mozzarelli <openwrt at ezplanet.net> wrote:
> I was wondering someone could help me the following problem:
> I want to add some device drivers to the kernel build, but the kernel
> configuration in kernel version 3 is different from the configuration in
> kernel version 4.
> I was looking for a parameter that I could use inside an .mk file to find
> which kernel version I am building for.
> So far with trial and error (unfortunately I could not find specific
> documentation) I found that I can test reliably a variable that includes
> both kernel version and patchlevel as follows:
> ... and so on.
> However all I would need is something like LINUX_4 or LINUX_3
> otherwise I would have to list every possible patchlevel (present and future
> to allow the build when patchlevel changes).
> Thank you in advance,
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
More information about the Lede-dev