LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Rebuild devel-kernel from src (https://www.linuxquestions.org/questions/linux-newbie-8/rebuild-devel-kernel-from-src-656341/)

dizowned 07-17-2008 06:06 AM

Rebuild devel-kernel from src
 
I know this is possible since the devel-kernel always has the main src listed as its source. However I've been unable to find any resources describing how to do this. I've extracted everything from the main source rpm, so I have the main kernel plus all the patches laid out in a directory. I'm just wondering if theres a simple command to:
1) Apply all the patches
2) Build just a devel-kernel to target the different platforms.

The only reason I want to do this is that I want to build a custom kernel to boot from - which I can do no problem, but only install a devel (just the headers), so then I can move the main source tree off and not leave it in the /usr/src. This way modules don't complain and I don't have to constantly edit utsrelease all the time.

Thanks for any replies.

dizowned 07-17-2008 11:18 AM

Messed around with this somemore and of course the moment after I post it, I figure why not check the spec file. Well it turns out there is a devel build path in there but I can't seem to get it to execute, something to do with %kernel_reqprovconf has an empty body. As that I havent done any work with spec files aside from issue rpm commands on them -- does anyone know what that error means?

FranDango 07-18-2008 07:13 AM

The kernel sources have all include files (headers) separated from the source files, so it shouldn't be that difficult to remove all unneeded files after a successful build by hand.
Unless that you want create RPM packages for your own kernels.

As a matter of fact, some distros (Fedora for example) have different packages for 'kernel', 'kernel-devel' and 'kernel-headers'. 'Kernel' has the binaries, 'kernel-devel' has all the sources (including the headers) I assume, and 'kernel-headers' has only the headers from the source package.

Linux Archive


All times are GMT -5. The time now is 03:19 AM.