[SOLVED] How can get a kernel source for Centos 6.3?
Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
make all
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
make[1]: *** No rule to make target `missing-syscalls'. Stop.
make: *** [prepare0] Error 2
I'm in the /usr/src/kernels/2.6.32-279.22.1.el6.x86_64 directory. Any ideas?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 7 : "rpmlib**" should be OK when 'rpm-build' is installed.
"perl(ExtUtils::Embed)" : # yum install perl-ExtUtils-Embed
( May be included in # yum install "Development Tools"
( yum groupinfo "Development Tools" )
You can check what got installed with $ rpm -qa --last | less
.. or save the "install list" : $ rpm -qa --last > last-packages.txt ).
# 9 : Recently uploaded to 'Updates' :
kernel-2.6.32-279.22.1.el6.i686.rpm : 06-Feb-2013.
.. ? May be they forgot to upload the source ? Please check again in a few days.
# 8 : ? Why not run $ 'rpmbuild -bb kernel.spec' ?
The build version (279.xx) can be edited to your version in 'kernel.spec'.
And the things you want different : The files ///SOURCE/config-***
can be edited to your preferences.
I managed to fetch the file using my browser (+80MB) instead of the suggested 'rpm -i' command.
So I ran 'rpm -i' locally on the fetched file without complaints. However, and I assumed the source would be in /usr/src/kernels/2.6.32-279.22.1.el6.x86_64, but there isn't anything other than Kconfigs and Makefiles.
I do have a bunch of h files, but I assume those came with the 'yum install kernel-headers kernel-devel' command.
I ran the 'rpmbuild -bb kernel.spec' -- but I'm not sure where I got the 'kernel.spec' file. I simply located it using 'find'. It was in the rpmbuild/SPEC directory. So I switched to that directory and issued 'rpmbuild -bb kernel.spec' as you instructed.
That at least *seems* to be doing what I want, although it is taking a while...
I appreciate your help! Why do you suppose the CentOS page has the 'rpm -i' suggested versus the rpmbuild you suggested?
I have a card that wants to build its driver against the kernel, so I suppose now I need to create a 'link' to this rpmbuild/BUILD directory... and all will be fine.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 12
Quote:
I have a card that wants to build its driver
That's usually done by installing matching packages kernel/kernel-devel :
# yum install kernel kernel-devel
.. and then build the new <module.ko> from the <source-for-the-card>.
That's why no "configured source package" is available as a binary rpm :
'kernel-devel' will do for 99.x % module build :
$ make : And you will have the module within a few seconds, usually.
*** Which card ? ? And which "driver package" ? Name, and a link, please.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.