LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-18-2004, 04:12 AM   #1
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Compiling 2.6.7 Kernel


Anyone has a good guide on compiling 2.6.7 kernel?

Thanks
 
Old 06-18-2004, 04:38 AM   #2
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
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

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

Last edited by Kovacs; 06-18-2004 at 04:40 AM.
 
Old 06-18-2004, 05:20 AM   #3
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
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 ?
 
Old 06-18-2004, 05:25 AM   #4
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
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.
 
Old 06-18-2004, 05:29 AM   #5
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
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?
 
Old 06-18-2004, 05:48 AM   #6
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
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.
 
Old 06-18-2004, 06:03 AM   #7
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
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?
 
Old 06-18-2004, 06:13 AM   #8
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
http://www.linuxquestions.org/questi...5&pagenumber=2 ;-)
 
Old 06-18-2004, 06:29 AM   #9
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
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?
 
Old 06-18-2004, 06:40 AM   #10
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
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.
 
Old 06-18-2004, 06:44 AM   #11
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
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?
 
Old 06-18-2004, 07:02 AM   #12
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
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.
 
Old 06-18-2004, 07:51 AM   #13
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
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?
 
Old 06-18-2004, 12:54 PM   #14
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
You probably just need to enable usb support in your kernel config.
 
Old 06-18-2004, 01:35 PM   #15
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Kovacs
You probably just need to enable usb support in your kernel config.
Sorry but how do I do that?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling kernel = kernel panic Tons of Fun Debian 5 07-02-2005 01:59 PM
Compiling kernel module for linux kernel 2.4 in 2.6 guam Linux - Software 0 01-13-2005 02:02 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Compiling new kernel joseph Linux - Software 2 10-14-2003 07:26 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration