0

If I installed a new kernel via rpm, I can see the kernel source ( /usr/src/kernel/4.xxx-xxxx-xxxx ) for me to build the driver. It seems covered by kernel-devel rpm.

ex:

kernel-ml-4.14.15-1.el7.elrepo.x86_64.rpm
kernel-ml-devel-4.14.15-1.el7.elrepo.x86_64.rpm

Now, I want to install/build the new kernel from the upstream source, what should I do to also have the kernel source be installed as kernel-ml-devel-4.14.15-1.el7.elrepo.x86_64.rpm did?

Doing these will install the kernel source? or just install a new kernel?

 make; make modules; make install; make modules_install
  • What do you mean by "upstream source" ? The source from the RPM packager, or the one from Kernel.org ? – binarym May 11 at 9:13
  • upstream source -> kernel.org – GreenTea May 12 at 2:00
0

Now, I want to install/build the new kernel from the upstream source, what should I do to also have the kernel source be installed as kernel-ml-devel-4.14.15-1.el7.elrepo.x86_64.rpm did?

As you want to rebuild your kernel from scratch, your entry point will be the sources :-)

So, just download a kernel from kernel.org, untar it to /usr/src and follow the guide. kernel-devel RPM must be able to find out the path to your sources.

If not, and depending on the driver you want to compile, there's several way to recompile it by your own. First thing to look is the documentation of your driver...

Here is a good paper about this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.