1 1
mhc

solved Problem getting correct version of kernel headers

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 

 

/usr/src/linux-headers-4.19.62-sunxi


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

 

Grettings

 

Mariano

Share this post


Link to post
Share on other sites

"next" does not exist anymore. It has been replaced with "current".

But regardless you can use armbian-config to install kernel headers

Share this post


Link to post
Share on other sites

Wow Werner, that was fast!

 

I´ll try it now, and let you know the result.

 

Many thanks!!!

Share this post


Link to post
Share on other sites

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!

 

Share this post


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. https://armbian.atlassian.net/projects/AR/issues/AR-214

Share this post


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

 

Greetings

Share this post


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.

Guest
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.

Loading...
1 1