Problem getting correct version of kernel headers


1 1

Recommended Posts

Hi all, 


First place, sorry if it´s a very basic question, I was searching info and reading topics, but I did not found a solution for my problem.

I`m working with Linux version 5.4.29-sunxi


I´m trying to compile my own char device driver. I noticed that I forgot adding kernel-headers in my build, so I tried to add them via


apt install linux-headers-next-sunxi

After that, I can see a new directory 



but if I´m not wrong, modules compiled with this headers won´t work in my kernel, cause headers version does not match with my kernel version.


So, could please someone give me a hint about getting correct header version, or if I´m completelly wrong?


Many thanks in advances





Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

Werner, kernel header update worked like a charm. I tried both ways


  • armbian-config -> Software -> Headers_install
  • apt install linux-headers-current-sunxi

So, I´m wondering if there is a way to just install headers that match current target´s kernel version if kernel version is not the last stable.


In my case, after installing headers I had to upgrade kernel to 5.4.35, no problem at all, but I guess sometimes we might want to keep kernel version unchanged.


One more time, thank you very much!


Link to post
Share on other sites

14 minutes ago, mhc said:

if kernel version is not the last stable.

No, we don't have all older matched kernels and headers. 


We started to pay attention recently, after headers and DKMS process were improved ... and we are working on to improve CI processes. In case you have know-how and some time, you are welcome to help. We are drowning in work.

Link to post
Share on other sites

Hi Igor, thank you very much for your answer.


I understand that you contribute by using time you could spend on other things, and I am completely grateful for that. 


I will help if I found something that " know how" from your link



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


1 1