Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Hi all,
i'm a new user of this fantastic forum, and even a new linux user
I've a little problem while installing kernel sources.. I try to explain (scuse me for my english, i'm italian):
- i've download linux kernel source from kernel official site
- i unpack the files to /usr/src/linux-2.6.9
- i run from console:
Code:
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
and now when I try to run "make menuconfig", i see these errors:
Code:
[root@localhost linux-2.6.9]# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc/i386-redhat-linux/3.4.5/include/limits.h:122,
from /usr/lib/gcc/i386-redhat-linux/3.4.5/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/3.4.5/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:115:
/usr/include/bits/socket.h:304:24: asm/socket.h: No such file or directory
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:201: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:201: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:201: error: for each function it appears in.)
scripts/basic/fixdep.c:201: warning: unused variable `s'
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:297: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:297: warning: unused variable `s'
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
The problem is that I already do that.... How can i fix now?
Part of the problem is that I don't know what directory you were in when you ran those commands. For the softlinks you put in, just use rm to remove them. However, for the rm -rf asm linux scsi command you ran, I don't know what it would have done. I would remove the entire linux-X.X.X directory and then re-extract the kernel source and try again.
Quote:
Originally Posted by Madley
Must I enter in /usr/src/linux-X.X.X to run "make menuconfig"?
Absolutely you must. If you weren't in /usr/src/linux-X.X.X before, go into that directory and try make menuconfig again.
Ok, I follow your advices and now, when I run make menuconfig from linux-2.6.9 directory i get this error:
Code:
[root@localhost linux-2.6.9]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
In file included from /usr/include/linux/errno.h:4,
from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from scripts/basic/split-include.c:26:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
make[1]: *** [scripts/basic/split-include] Error 1
make: *** [scripts_basic] Error 2
What is this?
...i think that command: rm -rf asm linux scsi was not a good command for me...
Do you remember what directory you were in when you ran that rm command? I'm starting to wonder if you didn't cause some significant damage. My main cause for concern is this:
Quote:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
The /usr/include/asm directory really shouldn't have been touched by the kernel source install. Does the /usr/include/asm directory even exist on your system?
I really, really hate to suggest this, but you may be looking at a system re-install here.
you can install as many kernels as you want, but you can only run one at a time. The EL version is just another tree off the main branch - there are dozens . Some of them are modified specifically for a certain machine or setup, but for the most part, the "official" main tree is fine. If you don't already know why you'd need a different tree, you probably don't.
For the kernel compile, like Hangdog said, you don't need to do the links yourself. The config does it automatically.
It's probably best to just completely replace the directory you unpacked, and start over fresh - it sounds like you may have accidentally erased some necessary stuff:
unpack the tarball (sounds like you already go this):
> tar -xzvf linux-2.6.9.tar.gz
enter the directory, and start up menuconfig :
> cd linux-2.6.9
> make menuconfig
This creates the symlinks automatically after you specify an architecture - probably i386, but it depends on the machine. Then go through, choose your configs, and exit the menuconfig.
> make dep
> make bzImage
There are quite a few tutorials out there about installing a new kernel - it would help to read 2 or 3 tutorials first, but it sounds like the mistake you made was that you were trying to do too much - once you get it installed, I think you'll find it's much easier than you thought it would be.
I noticed that i was following the steps for 2.4 kernels, so probabily i made something wrong.
Now i want to install another kernel on my laptop because the one i have isn't configured correctly for laptop pc. Another question, is there a particulare kernel prepared for laptop or every kernel is good (obviously if configured in a correct way ) ?
There isn't a particular kernel for laptops, it is more a case of configuring it to fit your specific hardware. In most cases, the stock kernel that comes with a distro is fine for a laptop, provided that they have compiled most features as modules. Then, only the modules in use are actually loaded. About the only reason you have to compile your own kernel is if you have some bit of hardware that isn't supported by a stock kernel. Of course compiling a kernel because you just want to is a good reason as well!
About the only reason you have to compile your own kernel is if you have some bit of hardware that isn't supported by a stock kernel. Of course compiling a kernel because you just want to is a good reason as well!
I have to recompile it because there isn't support for battery, and even the second reason is good... If I want to learn something about linux I think the best way is only trying trying....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.