Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trying to compile a different kernel version
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sardiskan
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2004
Posts: 115
Location: Montgomery

PostPosted: Fri Jan 14, 2005 8:28 pm    Post subject: Trying to compile a different kernel version Reply with quote

I need to compile the linux-wlan-ng package to put on another system, but the other system uses kernel 2.4.27 and gentoo uses 2.4.26-gentoo-r13. I'd like to boot to a 2.4.27 kernel so I can compile this module so I can move it to the other machine. The reason I am doing this in this way is because the machine I'm wanting to move the files too does not have a make command and it is not suggested to put a make command on this distro. I downloaded the kernel source for 2.4.27 and did the following commands on it:

make clean
make mrproper
make menuconfig (configed kernel)
make bzImage
make modules
make module_install

From there I attempted to put the vmlinux image under the /boot directory and point and entry in grub to THAT image. Well on reboot, pointing that that image...it doesn't boot...I get some error about the vmlinux not being executable. I'm not sure what to do. I've even tried creating a bootable floppy with the bzImage file but that doesn't work either. I'm probably just missing something that I don't know how to do and that the documentation for compiling kernels assumes I should know.

How can I make this kernel boot my gentoo distro? Or whats the best way to compile this package under the 2.4.27 kernel?

Thanks.
_________________
Unless a grain of wheat falls to the ground and dies, it remains only a single seed.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54845
Location: 56N 3W

PostPosted: Fri Jan 14, 2005 8:44 pm    Post subject: Reply with quote

sardiskan,

2.4 kernels need make dep too but if you missed that I don't think you would have got a bzImage.

You normally do not need to run the kernel you want to compile against. Often it is suffcient to point the new package a t a properly (from the packages point of view) configured kernel so it can find the things it needs.

There will be an option you pass the package ./configure step. That means you either do the build outside of portage or you work out how to add things to the ebuild ./configure step.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Fri Jan 14, 2005 8:46 pm    Post subject: Reply with quote

no need to be running 2.4.27

just make sure /usr/src/linux points to (compiled) linux-2.4.27 sources
then emerge the package and take the module file. but be warned that it might not work, there are issues with doing things like this..
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
sardiskan
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2004
Posts: 115
Location: Montgomery

PostPosted: Sat Jan 15, 2005 5:04 am    Post subject: Reply with quote

Yes, I did run a "make dep" I forgot to include that

So from what I understand. All I need to do is download the kernel source, configure and compile it. Rename the current /usr/src/linx tree to something else and move the newly configed/compiled kernel source into the /usr/src/linux directory, then just compile the software pointing to the /usr/src/linux directory as the kernel tree. Am I right? If that is the case...that is SOOO much simpler than trying to dual boot two different kernels under the same distro.
_________________
Unless a grain of wheat falls to the ground and dies, it remains only a single seed.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Sat Jan 15, 2005 5:26 am    Post subject: Reply with quote

First emerge the new kernel sources, they will be installed in /usr/src. Then change the directory /usr/src/linux points to like so
Quote:
cd /usr/src
rm linux
ln -s "src directory" linux

Where "src directory" is the location where portage installed your kernel source. Then go to /usr/src/linux and make and install your kernel normally. If you want to compile a kernel without changing your /usr/src/linux link, then just go to /usr/src/"src directory" and make the kernel. The bzImage will then be placed in /usr/src/"src directory"/arch/i386/boot, assuming that your are compiling this kernel on an x86 system.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54845
Location: 56N 3W

PostPosted: Sat Jan 15, 2005 11:33 am    Post subject: Reply with quote

sardiskan,

Its not a case of move an rename anything.
Its delete the symbolic link /usr/src/linux and create a new one pointing to the new kernel tree.

Do
Code:
ls -l /usr/src
and notice that /usr/src/linux is just a pointer to the real kernel tree.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum