LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-24-2022, 09:49 PM   #1
debu_chocobo
LQ Newbie
 
Registered: May 2021
Distribution: Fedora, Debian, Arch
Posts: 3

Rep: Reputation: Disabled
headers and kernel-devel


Hi there.

I patched and compiled 5.15.6 to fix a problem with my laptop's soundcard. The fix was successful, but now I have no headers and no kernel-devel.

kernel-headers was successfully generated and I installed it, but the NVIDIA installer (from NVIDIA's website) fails at DKMS:

Code:
ERROR: Failed to run '/usr/sbin/dkms build -m nvidia -v 470.94 -k 5.15.16': Error! Your kernel headers for kernel 5.15.16 cannnot be found at /lib/modules/5.15.16/build or /lib/modules/5.15.16/source.

Please install the linux-headers-5.15.16 package or use the --kernelsourcedir option to tell DMKS where it's located.
I copied the source from the unpacked tar to /lib/modules/5.15.16/source, but the error remains.

I'd like to get NVIDIA installed, but more than that, I'd like to get working kernel, headers and devel packages made, so I can share this fix with others.

I'm not very experienced with kernel compiling, so any help would be much appreciated.

Below is my hardware, and process for compiling the kernel.

Fedora 35, HP Spectre x360 15-eb0016TX.

Code:
curl https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.16.tar.xz|tar -xJ

cd  linux-5.15.16
vim ~/linux-5.15.16/sound/pci/hda/patch_realtek.c
Added the following line

Code:
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx",
Code:
Make menuconfig
make -j7
make binrpm-pkg
 
Old 01-25-2022, 11:43 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 34
Posts: 3,829

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
/lib/modules/5.15.16/build and source should be symbolic links. They are created by "sudo make install". What directions were you following to build and install the kernel?


EDIT: ooks like you are building an RPM. If so, the links are always broken when you install a RedHat kernel. Just overwrite them:
Code:
sudo ln -s mybuilddir /lib/modules/5.15.16/build
sudo ln -s build /lib/modules/5.15.16/source

Last edited by smallpond; 01-25-2022 at 03:53 PM.
 
Old 01-27-2022, 07:08 PM   #3
debu_chocobo
LQ Newbie
 
Registered: May 2021
Distribution: Fedora, Debian, Arch
Posts: 3

Original Poster
Rep: Reputation: Disabled
Many thanks for the help!

I got the links working with your help, and now working packages with
Code:
make rpm-pkg
Now I'm having a problem with NVIDIA. When using the .run from NVIDIA's website, it seems to install okay, but I just get a blank screen when GDM starts. No error messages in journalctl.

Installing with
Code:
akmods --force
gives the error

Code:
akmodsbuild: error: Package has no %description: kmod-nvidia-5.15.16-Fedora.Spectre.5.15.15
This is the first fifteen lines of the spec.

Code:
Name: kernel
Summary: The Linux Kernel
Version: 5.15.16_Fedora.Spectre.5.15.16
Release: 1
License: GPL
Group: System Environment/Kernel
Vendor: The Linux Community
URL: https://www.kernel.org
Source: kernel-5.15.16_Fedora.Spectre.5.15.16.tar.gz
Provides:  kernel-5.15.16-Fedora.Spectre.5.15.16
%define __spec_install_post /usr/lib/rpm/brp-compress || :
%define debug_package %{nil}

%description
The Linux Kernel, the operating system core itself
Thanks for any help.

Last edited by debu_chocobo; 01-27-2022 at 07:12 PM.
 
Old 01-28-2022, 03:29 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,578

Rep: Reputation: Disabled
You show the spec for package kernel, while the error message is about kmod-nvidia.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can i find kernel-devel for slackware? Is there a problem installing kernel-devel? cesarsj Linux - Software 4 08-16-2019 05:14 AM
Trying to install ethernet adapter driver, not finding kernel-devel or kernel-headers oneFishtwoFish Red Hat 5 08-31-2010 06:24 PM
Kernel-devel, kernel-headers mickeyboa Mandriva 4 03-01-2007 11:44 PM
mplayer and gtk-devel and libpng-devel ... purpleburple Linux - Software 1 03-16-2003 03:57 AM
Possible bug in glibc-devel-2.2.93-5 and glibc-devel-2.2.5 mark_umr Linux - Software 1 10-22-2002 01:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration