Error Compiling kernel-source 2.6.2
Hi, I read susefaq and in this lists that I should do make cloneconfig dep clean bzlilo modules modules_install, but when I try to make cloneconfig, I got this errors. I got this kernel from ftp://ftp.suse.com/pub/people/kraxel/i386/i586/ arz:/usr/src/linux # make cloneconfig HOSTCC scripts/fixdep scripts/fixdep.c: In function `parse_config_file': scripts/fixdep.c:220: warning: comparison between signed and unsigned scripts/fixdep.c:221: warning: comparison between signed and unsigned scripts/fixdep.c:222: warning: comparison between signed and unsigned scripts/fixdep.c:223: warning: comparison between signed and unsigned scripts/fixdep.c: In function `traps': scripts/fixdep.c:359: warning: comparison between signed and unsigned make[1]: *** No rule to make target `cloneconfig'. Stop. make: *** [cloneconfig] Error 2 Can someone tell me why it happen ? -- Arie Reynaldi Zanahar reyman@reynaldi.com
The Thursday 2004-02-19 at 15:32 +0700, Arie Reynaldi Zanahar wrote:
I read susefaq and in this lists that I should do make cloneconfig dep clean bzlilo modules modules_install, but when I try to make cloneconfig, I got this errors. I got this kernel from ftp://ftp.suse.com/pub/people/kraxel/i386/i586/
I don't have that version of SuSE, so I can not try myself. But, in general, cloneconfig is intended to be used when you have that kernel already running; ie, to duplicate the configuration of the kernel in use, running, into the sources config. -- Cheers, Carlos Robinson
On Thursday 19 February 2004 08:03 pm, Carlos E. R. wrote:
The Thursday 2004-02-19 at 15:32 +0700, Arie Reynaldi Zanahar wrote:
I read susefaq and in this lists that I should do make cloneconfig dep clean bzlilo modules modules_install, but when I try to make cloneconfig, I got this errors. I got this kernel from ftp://ftp.suse.com/pub/people/kraxel/i386/i586/
I don't have that version of SuSE, so I can not try myself. But, in general, cloneconfig is intended to be used when you have that kernel already running; ie, to duplicate the configuration of the kernel in use, running, into the sources config.
-- Cheers, Carlos Robinson
Couldn't you, instead of running make cloneconfig, just copy /boot/config* to /usr/src/linux/.config? Mike Sacco
On Thu, 2004-02-19 at 15:32 +0700, Arie Reynaldi Zanahar wrote:
Hi,
I read susefaq and in this lists that I should do make cloneconfig dep clean bzlilo modules modules_install, but when I try to make cloneconfig, I got this errors. I got this kernel from ftp://ftp.suse.com/pub/people/kraxel/i386/i586/
arz:/usr/src/linux # make cloneconfig
There is no cloneconfig in the 2.6 kernels. Just do zcat /proc/config.gz > /usr/src/linux/.config that's all you need, no make dep or anything
On Thu, 2004-02-19 at 20:39, Anders Johansson wrote:
On Thu, 2004-02-19 at 15:32 +0700, Arie Reynaldi Zanahar wrote:
Hi,
I read susefaq and in this lists that I should do make cloneconfig dep clean bzlilo modules modules_install, but when I try to make cloneconfig, I got this errors. I got this kernel from ftp://ftp.suse.com/pub/people/kraxel/i386/i586/
arz:/usr/src/linux # make cloneconfig
There is no cloneconfig in the 2.6 kernels. Just do
zcat /proc/config.gz > /usr/src/linux/.config
that's all you need, no make dep or anything
I too want to try the 2.6 kernel on my SUSE 9.0 installation. Having never compiled a kernel before, would it be possible for someone to post a 'walk through' as to the steps as to how to best do this in SUSE? For example, let's say I download a kernel from kernel.org (my machine is a P4 2.8MHz). Which kernel (preferably 2.6.3 variety) should I grab and what commands should I use to compile it for my box? I understand that the 'how' has changed somewhat since the 2.4 kernels. I'd like to have the stock 2.4.21 kernel available in case something goes wrong. I know it's asking a lot, but I'd really like to learn how to do this without messing up my only machine. Thanks a lot! -- Cheers, Trey --- Do not seek death; death will find you. But seek the road which makes death a fulfillment. --Dag Hammarskjold 8:49pm up 1 day 2:12, 1 user, load average: 0.53, 0.75, 0.63 Linux linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 i686 i686 i386 GNU/Linux
On Fri, 2004-02-20 at 20:55 -0500, Trey Sizemore wrote:
I too want to try the 2.6 kernel on my SUSE 9.0 installation. Having never compiled a kernel before, would it be possible for someone to post a 'walk through' as to the steps as to how to best do this in SUSE?
By far the simplest would be to get one of the precompiled kernels from the suse ftp site (or, preferably, one of the mirrors), from the people/ kraxel/ directory. Note that the current 2.6.3-0 has a few bugs. Make sure you check out the various readmes in his directory, and make use of his gpg key that he's put there (thank you)
For example, let's say I download a kernel from kernel.org (my machine is a P4 2.8MHz). Which kernel (preferably 2.6.3 variety) should I grab and what commands should I use to compile it for my box?
Step 1: Unpack it in some directory (*not* /usr/src/linux). Let's say / home/trey/linux-2.6.3/ Let's just refer to that directory as /src/ in future Step 2: cd /src/ make xconfig This will get you a nice qt interface for the kernel config. If you prefer gtk, do make gconfig instead. Step 3: select all the options you need in a kernel. This is really the tricky step, and varies depending on what hardware you use. It's difficult to give any general guidelines on this, just go through the options and see what you need. It's worth taking the time to do this properly the first time. When a new kernel is published and you want to compile that, you won't have to do it again. Or, I should say, you won't have to do the options you've already done, only the ones that are new for the new kernel. So take your time Step 4: save and exit At this point you may want to edit Makefile, and set EXTRAVERSION=-trey1 or something. This will make your new 2.6.3 kernel be called 2.6.3- trey1. The next you compile you can call -trey2, and so forth. That way, the kernels won't overwrite each other. It can be good to be able to get back to a previous kernel, if you experiment with the kernel options and produce a kernel that won't boot. Then you can move on to Step 5: run make bzImage assuming the compile finishes cleanly, go to Step 6: If you selected anything to be compiled as modules, run make modules make modules install Note that all the steps above can be run as your regular user, you don't have to be root until you get to Step 7: copy (or move) /src/arch/i386/boot/bzImage to /boot/vmlinuz- 2.6.3-trey1 In case you compiled reiserfs or other important features that you need to mount your root partition as modules, you will need to do Step 7a: run mk_initrd -k vmlinuz-2.6.3-trey1 -i initrd-2.6.3-trey1 That's pretty much it, except that you need to tell grub that there's a new kernel, so Step 8: edit /boot/grub/menu.lst You can copy the default "Linux" entry, change the title and the name of the kernel (the default is vmlinuz, change that to vmlinuz-2.6.3-trey1). If you used an initrd, change that name too, otherwise you can simply delete that line Now, a few things have changed in the system since 2.4. The first step is to run generate-modprobe.conf This will produce something that looks like a config file (/etc/ modprobe.conf and /etc/modprobe.conf.local), but it's not complete. Look in /etc/modules.conf and see which module you use for a network card, it'll be a line like alias eth0 foo copy that line to /etc/modprobe.conf If you use a graphics driver like nvidia, you'll probably want to copy that alias too, and the one for snd-card-0 couldn't hurt if you want to listen to music Also, the new kernel requires alsa >= 1.0, so if you haven't already upgraded from http://packman.links2linux.org, now would be a good time to do it This should be all you need to get you up and running, and on the net. You may see other problems based on modules that aren't properly configured in modprobe.conf, but if you're online you can google or ask about it. and you'll always have the 2.4 kernel as a working fallback in case it doesn't work, if you follow the above DISCLAIMER: the above worked well for me. YMMV and all that, but it should work. If I made a mistake there I'm sure they'll be corrected viciously :)
On Sat, 2004-02-21 at 03:17 +0100, Anders Johansson wrote:
Step 6: If you selected anything to be compiled as modules, run make modules make modules install
Note that all the steps above can be run as your regular user, you don't have to be root until you get to
Agh, double fault. The command is "make modules_install", and you have to be root to run that one
On Fri, 2004-02-20 at 21:17, Anders Johansson wrote: <snip> Thanks Anders.
Step 3: select all the options you need in a kernel. This is really the tricky step, and varies depending on what hardware you use. It's difficult to give any general guidelines on this, just go through the options and see what you need.
Is there a rule of thumb for what to compile as modules and what to have as part of the kernel?
It's worth taking the time to do this properly the first time. When a new kernel is published and you want to compile that, you won't have to do it again. Or, I should say, you won't have to do the options you've already done, only the ones that are new for the new kernel. So take your time
Step 4: save and exit
At this point you may want to edit Makefile, and set EXTRAVERSION=-trey1 or something. This will make your new 2.6.3 kernel be called 2.6.3- trey1. The next you compile you can call -trey2, and so forth. That way, the kernels won't overwrite each other. It can be good to be able to get back to a previous kernel, if you experiment with the kernel options and produce a kernel that won't boot. Then you can move on to
Step 5: run make bzImage
assuming the compile finishes cleanly, go to
Step 6: If you selected anything to be compiled as modules, run make modules make modules install
Note that all the steps above can be run as your regular user, you don't have to be root until you get to
Step 7: copy (or move) /src/arch/i386/boot/bzImage to /boot/vmlinuz- 2.6.3-trey1
So this would be 'mv /home/trey/kernel2.6/archi386/boot/bzImage /boot/vmlinuz-2.6.3-trey1'?
In case you compiled reiserfs or other important features that you need to mount your root partition as modules, you will need to do
Step 7a: run mk_initrd -k vmlinuz-2.6.3-trey1 -i initrd-2.6.3-trey1
That's pretty much it, except that you need to tell grub that there's a new kernel, so
I am using reiserfs...should this be compiled as a module or directly in the kernel?
Step 8: edit /boot/grub/menu.lst You can copy the default "Linux" entry, change the title and the name of the kernel (the default is vmlinuz, change that to vmlinuz-2.6.3-trey1).
So both entries will be in /boot/grub/menu/lst?
If you used an initrd, change that name too, otherwise you can simply delete that line Sorry, not sure if I'm using initrd or not.
Now, a few things have changed in the system since 2.4. The first step is to run
generate-modprobe.conf
This will produce something that looks like a config file (/etc/ modprobe.conf and /etc/modprobe.conf.local), but it's not complete.
Look in /etc/modules.conf and see which module you use for a network card, it'll be a line like
alias eth0 foo
copy that line to /etc/modprobe.conf
If you use a graphics driver like nvidia, you'll probably want to copy that alias too, and the one for snd-card-0 couldn't hurt if you want to listen to music I'm using the 'nv' driver right now. So should just the eth0 and snd-card-0 aliases be copied over? None of the other aliases in this file?
Also, the new kernel requires alsa >= 1.0, so if you haven't already upgraded from http://packman.links2linux.org, now would be a good time to do it
This should be all you need to get you up and running, and on the net. You may see other problems based on modules that aren't properly configured in modprobe.conf, but if you're online you can google or ask about it.
and you'll always have the 2.4 kernel as a working fallback in case it doesn't work, if you follow the above
DISCLAIMER: the above worked well for me. YMMV and all that, but it should work. If I made a mistake there I'm sure they'll be corrected viciously :)
Thanks again. -- Cheers, Trey --- At a given moment I open my eyes and exist. And before that, during all eternity, what was there? Nothing. - Ugo Betti 9:33pm up 1 day 2:56, 1 user, load average: 0.27, 0.31, 0.40 Linux linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 i686 i686 i386 GNU/Linux
On Fri, 2004-02-20 at 21:45 -0500, Trey Sizemore wrote:
Is there a rule of thumb for what to compile as modules and what to have as part of the kernel?
Not really. Distros love modules, because it makes it easy for them to compile a one-size-fits-all kernel, where people just pick the modules they need. Like filesystems. If you use reiserfs, there's really no need for you to do that as a module. You might want to get the ones you don't use right now as modules though, just in case you want to try them out in future. Hotplugging things is probably also a good idea to compile as modules. You never know what USB device the wife'll bring home tomorrow :) I normally compile the things I use into the kernel, and the things I don't use but I might like to try in future I compile as modules, and the rest I just leave out
So this would be 'mv /home/trey/kernel2.6/archi386/boot/bzImage /boot/vmlinuz-2.6.3-trey1'?
arch/i386, not archi386. Apart from that, yes exactly.
I am using reiserfs...should this be compiled as a module or directly in the kernel?
I would compile it directly into the kernel.
Step 8: edit /boot/grub/menu.lst You can copy the default "Linux" entry, change the title and the name of the kernel (the default is vmlinuz, change that to vmlinuz-2.6.3-trey1).
So both entries will be in /boot/grub/menu/lst?
Right. That way you can boot back into your existing 2.4 setup by just selecting it in grub
If you used an initrd, change that name too, otherwise you can simply delete that line Sorry, not sure if I'm using initrd or not.
Look in /etc/sysconfig/kernel, on the INITRD_MODULES line. It lists the modules you're currently using in your initrd. If you compile them into the kernel, and not as modules, then you won't need an initrd
I'm using the 'nv' driver right now. So should just the eth0 and snd-card-0 aliases be copied over? None of the other aliases in this file?
with the "nv" driver you won't need the nvidia alias, that's correct. As for the other aliases, well, the ones you're using. It's difficult to give a general answer. A few modules have changed names in 2.6, so for those you'll need to create an alias with the new name. But the important thing is to get you up and running and on the net, then you can pick off the rest as you discover what isn't working.
On Fri, 2004-02-20 at 21:50, Anders Johansson wrote:
Not really. Distros love modules, because it makes it easy for them to compile a one-size-fits-all kernel, where people just pick the modules they need. Like filesystems. If you use reiserfs, there's really no need for you to do that as a module. You might want to get the ones you don't use right now as modules though, just in case you want to try them out in future.
Hotplugging things is probably also a good idea to compile as modules. You never know what USB device the wife'll bring home tomorrow :)
I normally compile the things I use into the kernel, and the things I don't use but I might like to try in future I compile as modules, and the rest I just leave out
So this would be 'mv /home/trey/kernel2.6/archi386/boot/bzImage /boot/vmlinuz-2.6.3-trey1'?
arch/i386, not archi386. Apart from that, yes exactly.
I am using reiserfs...should this be compiled as a module or directly in the kernel?
I would compile it directly into the kernel.
Step 8: edit /boot/grub/menu.lst You can copy the default "Linux" entry, change the title and the name of the kernel (the default is vmlinuz, change that to vmlinuz-2.6.3-trey1).
So both entries will be in /boot/grub/menu/lst?
Right. That way you can boot back into your existing 2.4 setup by just selecting it in grub
If you used an initrd, change that name too, otherwise you can simply delete that line Sorry, not sure if I'm using initrd or not.
Look in /etc/sysconfig/kernel, on the INITRD_MODULES line. It lists the modules you're currently using in your initrd. If you compile them into the kernel, and not as modules, then you won't need an initrd
I'm using the 'nv' driver right now. So should just the eth0 and snd-card-0 aliases be copied over? None of the other aliases in this file?
with the "nv" driver you won't need the nvidia alias, that's correct. As for the other aliases, well, the ones you're using.
It's difficult to give a general answer. A few modules have changed names in 2.6, so for those you'll need to create an alias with the new name. But the important thing is to get you up and running and on the net, then you can pick off the rest as you discover what isn't working.
Alright, I'll give it a try. By the way, I noticed you're running Evolution 1.5.4. Did you get it from Red Carpet, and how do you like it compared to previous versions? -- Cheers, Trey --- The universe is change; our life is what our thoughts make it. --Antoninus, Marcus Aurelius 10:03pm up 1 day 3:25, 1 user, load average: 0.14, 0.39, 0.33 Linux linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 i686 i686 i386 GNU/Linux
On Fri, 2004-02-20 at 22:05 -0500, Trey Sizemore wrote:
By the way, I noticed you're running Evolution 1.5.4. Did you get it from Red Carpet,
yes, from the evolution-devel-snapshot channel
and how do you like it compared to previous versions?
It's pretty nice, it feels lighter and swifter. I haven't done any really heavy benchmarks on it though. There are still a few problems, I've seen a few mime mail be displayed oddly. But it has built-in antispam which works very very nicely. I was using thunderbird before just because of the antispam, and now evolution has something that works just as well. Very nice indeed
On 02/21/2004 10:17 AM, Anders Johansson wrote:
Step 5: run make bzImage
assuming the compile finishes cleanly, go to
Step 6: If you selected anything to be compiled as modules, run make modules make modules install
Or, 5 & 6 can be combined by just using make, except you still need "make modules_install". Check "make help" to see all just make will do. BTW, i got this from the post-halloween-2.5.txt on the internet.
Note that all the steps above can be run as your regular user, you don't have to be root until you get to
I have never tried it as a user, but I would think make modules_install would have to be root as the user couldn't write to /lib/modules/.
Step 7: copy (or move) /src/arch/i386/boot/bzImage to /boot/vmlinuz- 2.6.3-trey1
I would add copy System.map /boot/System.map-2.6.3-trey1, and I would suggest this stage after make before make modules_install, but it is not mandatory. I would also add a cd /lib/modules/2.6.3-trey1/, then depmod -ae.
In case you compiled reiserfs or other important features that you need to mount your root partition as modules, you will need to do
Step 7a: run mk_initrd -k vmlinuz-2.6.3-trey1 -i initrd-2.6.3-trey1
If you need more control over the modules (some have changed names from the /etc/sysconfig/kernel file), they can be specified by adding -m "" tp the above line and putting the module names in between the quotes.
This should be all you need to get you up and running, and on the net.
It would also be a good idea to add the following to your fstab. It doesn't hurt 2.4, but is recommended for 2.6. sysfs /sys sysfs defaults 0 0 and add cd /, mkdir /sys
DISCLAIMER: the above worked well for me. YMMV and all that, but it should work. If I made a mistake there I'm sure they'll be corrected viciously :)
I thought you did a good job Anders. I know you have taught me a lot over the last 4 years. ;-) -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: http://www.mydestiny.net/~joe_morris Registered Linux user 231871 God said, I AM that I AM. I say, by the grace of God, I am what I am.
On Sat, 2004-02-21 at 11:20 +0800, Joe Morris (NTM) wrote:
It would also be a good idea to add the following to your fstab. It doesn't hurt 2.4, but is recommended for 2.6. sysfs /sys sysfs defaults 0 0 and add cd /, mkdir /sys
Ouch, good catch, I forgot about that. Actually, the line in fstab isn't needed, as /etc/init.d/boot has this on a 9.0 system test -d /sys && { while read a b c ; do case "$b" in sysfs) echo -n "Mounting sysfs on /sys" mount -n -t sysfs sysfs /sys rc_status -v -r break ;; esac done < /proc/filesystems } So all you need is the "mkdir /sys". If you have the line in fstab you'll get an error about "already mounted" on bootup
I thought you did a good job Anders. I know you have taught me a lot over the last 4 years. ;-)
Thanks :)
On Fri, 2004-02-20 at 22:21, Anders Johansson wrote:
On Sat, 2004-02-21 at 11:20 +0800, Joe Morris (NTM) wrote:
It would also be a good idea to add the following to your fstab. It doesn't hurt 2.4, but is recommended for 2.6. sysfs /sys sysfs defaults 0 0 and add cd /, mkdir /sys
Ouch, good catch, I forgot about that. Actually, the line in fstab isn't needed, as /etc/init.d/boot has this on a 9.0 system
test -d /sys && { while read a b c ; do case "$b" in sysfs) echo -n "Mounting sysfs on /sys" mount -n -t sysfs sysfs /sys rc_status -v -r break ;; esac done < /proc/filesystems }
So all you need is the "mkdir /sys". If you have the line in fstab you'll get an error about "already mounted" on bootup
I thought you did a good job Anders. I know you have taught me a lot over the last 4 years. ;-)
Thanks :)
Thanks to both of you. Good to know! -- Cheers, Trey --- Do not seek death; death will find you. But seek the road which makes death a fulfillment. --Dag Hammarskjold 10:31pm up 1 day 3:53, 1 user, load average: 0.01, 0.13, 0.27 Linux linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 i686 i686 i386 GNU/Linux
On Fri, 2004-02-20 at 22:21, Anders Johansson wrote:
On Sat, 2004-02-21 at 11:20 +0800, Joe Morris (NTM) wrote:
It would also be a good idea to add the following to your fstab. It doesn't hurt 2.4, but is recommended for 2.6. sysfs /sys sysfs defaults 0 0 and add cd /, mkdir /sys
Ouch, good catch, I forgot about that. Actually, the line in fstab isn't needed, as /etc/init.d/boot has this on a 9.0 system
test -d /sys && { while read a b c ; do case "$b" in sysfs) echo -n "Mounting sysfs on /sys" mount -n -t sysfs sysfs /sys rc_status -v -r break ;; esac done < /proc/filesystems }
So all you need is the "mkdir /sys". If you have the line in fstab you'll get an error about "already mounted" on bootup
I thought you did a good job Anders. I know you have taught me a lot over the last 4 years. ;-)
Thanks :)
One last question...what about kernel-sources...will that be included when I install the kernel and install? I assume it will. Also, what is the ftp address to get the kernel? Thanks. -- Cheers, Trey --- Adversity is the trial of principle. Without it, a man hardly knows whether he is honest or not. --Henry Fielding 10:49pm up 1 day 4:12, 1 user, load average: 0.00, 0.01, 0.08 Linux linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 i686 i686 i386 GNU/Linux
participants (6)
-
Anders Johansson
-
Arie Reynaldi Zanahar
-
Carlos E. R.
-
Joe Morris (NTM)
-
Michael Sacco
-
Trey Sizemore