LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Compiling 2.6.7 Kernel (https://www.linuxquestions.org/questions/slackware-14/compiling-2-6-7-kernel-194900/)

subaruwrx 06-18-2004 04:12 AM

Compiling 2.6.7 Kernel
 
Anyone has a good guide on compiling 2.6.7 kernel?

Thanks

Kovacs 06-18-2004 04:38 AM

edit /etc/lilo.conf and add these lines:
image = /boot/vmlinuz.old
root = /dev/hda1
label = Slackware.old
read-only

cp linux-2.6.7.tar.bz2 /usr/src

cd /usr/src

tar -xjf linux-2.6.7.tar.bz2

rm linux

ln -s /usr/src/linux-2.6.7 /usr/src/linux

cd linux

vim Makefile - uncomment line 474 (export INSTALL_PATH=/boot)

make mrproper

optionally: copy your old .config file (from the source tree of your previous kernel) to /usr/src/linux

make menuconfig

make

make modules_install

make install

reboot and pray :D

the stickies at the top of this forum have a lot more good info about recompiling your kernel.

subaruwrx 06-18-2004 05:20 AM

Quote:

Originally posted by Kovacs
edit /etc/lilo.conf and add these lines:
image = /boot/vmlinuz.old
root = /dev/hda1
label = Slackware.old
read-only


Do I need to edit the image after I've finished? /boot/vmlinuz-2.6.7 ?

Kovacs 06-18-2004 05:25 AM

make install moves your old kernel to vmlinux.old (and you edit lilo like this so you can boot into your old kernel in case the new one fails), and the new one will just be called vmlinuz.

I would highly recommend reading the guides at the top of the board, they have some common gotchas in them.

subaruwrx 06-18-2004 05:29 AM

Quote:

Originally posted by Kovacs
make install moves your old kernel to vmlinux.old (and you edit lilo like this so you can boot into your old kernel in case the new one fails), and the new one will just be called vmlinuz.

I would highly recommend reading the guides at the top of the board, they have some common gotchas in them.

Just figured it out too. Yea, I'm reading at the slicky now.

btw, I seems to have missed make dep, make clean, make bzImage. Now I'm at make install (Didn't know it takes so much time). Are the above 3 commands important? Can I "rollback" now?

Kovacs 06-18-2004 05:48 AM

afaik you don't have to do any of those if you're using the make install method, I've always compiled successfully with make && make modules_install && make install.

subaruwrx 06-18-2004 06:03 AM

Quote:

Originally posted by Kovacs
afaik you don't have to do any of those if you're using the make install method, I've always compiled successfully with make && make modules_install && make install.
sheesh, 1st kernel compile failed :(

After selecting the new kernel at lilo, got a blank screen after that. Any idea why?

Kovacs 06-18-2004 06:13 AM

http://www.linuxquestions.org/questi...5&pagenumber=2 ;-)

subaruwrx 06-18-2004 06:29 AM

Quote:

Originally posted by Kovacs
http://www.linuxquestions.org/questi...5&pagenumber=2 ;-)
# Graphics support
#
CONFIG_FB=y
CONFIG_FB_VESA=y
CONFIG_VIDEO_SELECT=y
#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

#
# Logo configuration
#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

Put the above in lilo right?

Kovacs 06-18-2004 06:40 AM

Those bits go in your .config file for your kernel. You can either make clean or remove your 2.6.7 source directory and repeat all the steps up until you get to make. Edit your /usr/src/linux/.config and find those options and change the values accordingly. There are also corresponding entries in make menuconfig (somewhere) if you'd rather do it that way. Then make && make modules_install && make install as normal.

subaruwrx 06-18-2004 06:44 AM

Quote:

Originally posted by Kovacs
Those bits go in your .config file for your kernel. You can either make clean or remove your 2.6.7 source directory and repeat all the steps up until you get to make. Edit your /usr/src/linux/.config and find those options and change the values accordingly. There are also corresponding entries in make menuconfig (somewhere) if you'd rather do it that way. Then make && make modules_install && make install as normal.
oh so I can just re-do the kernel compiling all over again without removing or deleting any current files?

Kovacs 06-18-2004 07:02 AM

If you don't want to delete the source then you at least have to do a "make clean", although I would personally:

back up your /usr/src/linux-2.6.7/.config to another location (eg. /usr/src).
rm -rf /usr/src/linux-2.6.7
then extract the kernel source, make the symlink to linux, edit the Makefile, make mrproper
cp your .config to /usr/src/linux, edit as above to fix the blank screen stuff
make etc. etc as normal.

subaruwrx 06-18-2004 07:51 AM

Quote:

Originally posted by Kovacs
If you don't want to delete the source then you at least have to do a "make clean", although I would personally:

back up your /usr/src/linux-2.6.7/.config to another location (eg. /usr/src).
rm -rf /usr/src/linux-2.6.7
then extract the kernel source, make the symlink to linux, edit the Makefile, make mrproper
cp your .config to /usr/src/linux, edit as above to fix the blank screen stuff
make etc. etc as normal.

thanx, got it to work.

But another problem. It seems that my usb devices are not working (mouse especially, no lights up on my usb optical mouse). Did a lsmod, not exactly sure what does the results mean but I think that all the mod are not working?

Kovacs 06-18-2004 12:54 PM

You probably just need to enable usb support in your kernel config.

subaruwrx 06-18-2004 01:35 PM

Quote:

Originally posted by Kovacs
You probably just need to enable usb support in your kernel config.
Sorry but how do I do that?


All times are GMT -5. The time now is 04:09 PM.