[LEDE-DEV] Identifying kernel version (major) during build (.mk file)

Mauro Mozzarelli openwrt at ezplanet.net
Mon Feb 20 11:03:18 PST 2017


Jonas,


There is in some cases where kernel drivers have changed. As you might 
see in the ip_vs patch I posted, kernel drivers differ in Kernel 3 and 4 
and thus it is necessary to know which kernel I am building for to 
select the appropriate kernel configuration.

If the granularity requires to specify the patchlevel, and if LEDE had 
more than one Kernel 3 patchlevel instead of just 3_18, then I would 
have to specify all of them in my makefile. Not only that, but also I 
would have to modify my makefile to include new Kernel 3 versions should 
they be added in future to the LEDE build.


Mauro


On 20/02/17 09:40, Jonas Gorski wrote:
> On 19 February 2017 at 12:50, Mauro Mozzarelli <openwrt at ezplanet.net> wrote:
>> Thanks to those who provided directions.
>>
>> I will settle with checking on LINUX_3_18.
>>
>> I am not sure who manages build variables, but in future it would be useful
>> to be able to identify which kernel major version we are building for.
> Major version has no real meaning, what was expected to become 3.20
> Linus decided to name 4.0, but the amount of changes between 3.19 and
> 4.0 were not significantly larger or more radical than the changes
> between 3.18 and 3.19, or 4.0 and 4.1. IIRC the main reason for
> increasing the major version was to keep the minor version from
> growing too large.
>
> So I don't think there is really anything to be gained by being able
> to explicitly tell 3.x and 4.x (or 4.x and 5.x etc) apart.
>
> Regards
> Jonas




More information about the Lede-dev mailing list