kernel version string

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

kernel version string

962 次查看
mayanksirotiya
Contributor I

Hello All,

I have downloaded and flashed linux kernel from the following location :-

Alpha / Beta BSPs for Microprocessors | NXP 

(Linux 4.14.62_1.0.0_Beta )

uname -a on device gives me following result :-

Linux imx8qxpmek 4.14.62-imx_4.14.62_1.0.0_beta+g1907fe4 #1 SMP PREEMPT Tue Oct 16 07:04:53 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

Now for building my modules on host machine, I have cloned linux-kernel from linux-imx - i.MX Linux kernel , and switched to branch imx_4.14.62_1.0.0_beta.

On building this kernel version, my include/config/kernel.release contains following :-

4.14.62-05223-g1907fe4

which seems correct as per git describe. I am wondering how to get kernel version like the one showing in pre-built image i.e. 4.14.62-imx_4.14.62_1.0.0_beta+g1907fe4.

I couldn't find any way to include branch name in kernel version string.

Thanks

0 项奖励
1 回复

805 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mayank Sirotiya,

The string is made up by the first lines of the top-level Makefile, which state VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION and NAME.

If could be that the NAME variable is empty. You could also add a string to CONFIG_LOCALVERSION which would be appended to these strings when you call uname.

I hope this helps!

Regards,

0 项奖励