LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problems recompiling kernel after success on other systems (https://www.linuxquestions.org/questions/linux-general-1/problems-recompiling-kernel-after-success-on-other-systems-216325/)

snl54 08-11-2004 02:28 PM

Problems recompiling kernel after success on other systems
 
I've recompiled the kernel using the exact same procedures everytime. It has worked on two machines, but when I get to this one, it will not work.

I am running Mandrake 9.2 on all of the machines.

1. Copy the linux-2.4.22-30mdk to /usr/src
2. Create link from /usr/src/linux -> /usr/src/linux-2.4.22-30mdk
(ln -s /usr/src/linux-2.4.22-30mdk /usr/src/linux )

3. From /usr/src/linux in Konsole run 'make mrproper'

At this step, it fails with:

rm: cannot remove `include/asm': Is a directory rm: cannot remove `net/ipsec/alg/perlasm': Is a directory make: *** [mrproper] Error 1


I've tried 'make -i mrproper' but when I try make on the rest (dep, bzImage, etc), I still have errors trying to run those.

Also, I am logged in as root and I've tried reinstalling Mandrake and recompiling. Any help given is much appreciated, thank you.

osvaldomarques 08-11-2004 09:08 PM

Hi snl54,
You don't need to execute "make mrproper". This make is to set the architecture of your source tree, when you download a vanilla kernel. As you are working with the customized kernel of your distribution, all you need is "make xconfig", "make dep", "make bzImage", etc.
Probably, the complaint you had is for some kind of mandrake customization. I suggest you to re-install the kernel again before proceed with the "makings".

masand 08-12-2004 01:47 AM

make mrproper should not report any error

it just checks whether the kernel source tree is in proper architecture

personally i feel compiling from a kernel source from kernel.org is always better than compiling a kernel source from the distribution

regards

snl54 08-12-2004 08:19 AM

Thank you osvaldomarques and masand for your inputs.

osvaldomarques: I attempted "make xconfig" and received the same error:

[root@localhost linux]# make xconfig
rm -f include/asm
rm: cannot remove `include/asm': Is a directory
make: *** [symlinks] Error 1

Then just trying "make dep" to see what would happen:

...
make -C 3rdparty fastdep
make[2]: Entering directory `/usr/src/linux-2.4.22-30mdk/3rdparty'
make[2]: *** No rule to make target `fastdep'. Stop.
make[2]: Leaving directory `/usr/src/linux-2.4.22-30mdk/3rdparty'
make[1]: *** [_sfdep_3rdparty] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.22-30mdk'
make: *** [dep-files] Error 2

(I'm still running commands from the /usr/src/linux dir)

I will now attempt to download the kernel source from kernel.org and see if that gets me anywhere.

snl54 08-12-2004 08:44 AM

Just an update:

I downloaded the source from kernel.org and I'm getting much further. I am using the instructions in their readme and getting up to "make zImage/bzImage" at this point it halts with:

*****************
In file included from /usr/include/errno.h:36,
from scripts/split-include.c:26:
/usr/include/bits/errno.h:25:26: linux/errno.h: No such file or directory
make: *** [scripts/split-include] Error 1
*****************

errno.h is available in
/usr/include
/usr/include/bits
/usr/include/sys
/usr/src/linux

and other directories.

I'm going to look into this right now, just wanted to update you all.

Thanks

masand 08-12-2004 09:31 AM

hi i think u can get good help if u look into the newbie guide to kernel compiling by DrOZZ this will help u lot by getting some good advice by linux gurus.

i too got a good help down there

regards
gaurav

snl54 08-12-2004 10:24 AM

thanks
 
Thank you gaurav,

I did as you said and got my kernel from kernel.org. I wasn't able to compile the 2.5 kernel but the 2.4.27 worked just fine. Thanks!

320mb 08-12-2004 10:55 AM

Re: thanks
 
Quote:

Originally posted by snl54
Thank you gaurav,

I did as you said and got my kernel from kernel.org. I wasn't able to compile the 2.5 kernel

Kernels with Odd numbered series are Beta's.............use the Even number kernels...........IE

2.4x OR 2.6x

snl54 08-12-2004 11:06 AM

Thanks for that info 320mb, I had no idea!


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