LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Closed Thread
  Search this Thread
Old 09-22-2009, 10:13 PM   #1
bskumar7080
Member
 
Registered: Aug 2009
Distribution: Mandriva
Posts: 57

Rep: Reputation: 15
Thumbs up what are the Steps to compile and configure kernel


Hi,

I tried to update my kernel, my current version of kernel is
root@sivakumar-desktop:/usr/src# uname -a
Linux sivakumar-desktop 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17
01:57:59 UTC 2009 i686 GNU/Linux

I followed the following steps

i downloaded latest kernel source from kernel.org
"linux-2.6.31.tar.bz2" i followed the following steps to configure my
kernel

1. i extracted the kernel source file in usr/src
2. I updated my gcc complier

root@sivakumar-desktop:/usr/src# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 228 not upgraded.

3. Then i tried to run make menuconfig, i got the following error

root@sivakumar-desktop:/usr/src# make menuconfig
make: *** No rule to make target `menuconfig'. Stop.

4. then i tried

root@sivakumar-desktop:/usr/src/linux-2.6.31# make menuconfig
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2

5.then i tried make "oldconfig",
it asked some questions i ans Y/N/m

6.then next i run "make all"
some process run nearly 1 hour

then next i run "make modules_install"

i got some output like this
INSTALL /lib/firmware/bnx2/bnx2-mips-09-4.6.17.fw
INSTALL /lib/firmware/bnx2/bnx2-rv2p-09-4.6.15.fw
INSTALL /lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw
INSTALL /lib/firmware/bnx2/bnx2-rv2p-06-4.6.16.fw
MKDIR /lib/firmware/cxgb3
INSTALL /lib/firmware/cxgb3/t3b_psram-1.1.0.bin
INSTALL /lib/firmware/cxgb3/t3c_psram-1.1.0.bin
INSTALL /lib/firmware/cxgb3/t3fw-7.4.0.bin
MKDIR /lib/firmware/sb16
INSTALL /lib/firmware/sb16/mulaw_main.csp
INSTALL /lib/firmware/sb16/alaw_main.csp
INSTALL /lib/firmware/sb16/ima_adpcm_init.csp
INSTALL /lib/firmware/sb16/ima_adpcm_playback.csp
INSTALL /lib/firmware/sb16/ima_adpcm_capture.csp
DEPMOD 2.6.31

7.then when i run "make install"
i got the following output

root@sivakumar-desktop:/usr/src/linux-2.6.31# make install
sh /usr/src/linux-2.6.31/arch/x86/boot/install.sh 2.6.31 arch/x86/boot/bzImage \
System.map "/boot"

then when i run mkinitrd cmd i got the following message

root@sivakumar-desktop:/usr/src/linux-2.6.31# cd /boot
root@sivakumar-desktop:/boot# mkinitrd -o initrd.img-2.6.31 2.6.31
bash: mkinitrd: command not found

then i checked in the boot directory with ls

root@sivakumar-desktop:/boot# ls
abi-2.6.28-11-generic grub
System.map-2.6.28-11-generic vmlinuz-2.6.28-11-generic
config-2.6.28-11-generic initrd.img-2.6.28-11-generic
System.map-2.6.31 vmlinuz-2.6.31
config-2.6.31 lost+found
System.map-2.6.31.old vmlinuz-2.6.31.old
config-2.6.31.old memtest86+.bin
vmcoreinfo-2.6.28-11-generic


what steps i have to do after this
 
Old 09-22-2009, 10:28 PM   #2
anshexp
LQ Newbie
 
Registered: Jul 2009
Posts: 14

Rep: Reputation: 0
Quote:
Originally Posted by bskumar7080 View Post
Hi,

I tried to update my kernel, my current version of kernel is
root@sivakumar-desktop:/usr/src# uname -a
Linux sivakumar-desktop 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17
01:57:59 UTC 2009 i686 GNU/Linux

I followed the following steps

i downloaded latest kernel source from kernel.org
"linux-2.6.31.tar.bz2" i followed the following steps to configure my
kernel

1. i extracted the kernel source file in usr/src
2. I updated my gcc complier

root@sivakumar-desktop:/usr/src# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 228 not upgraded.

3. Then i tried to run make menuconfig, i got the following error

root@sivakumar-desktop:/usr/src# make menuconfig
make: *** No rule to make target `menuconfig'. Stop.

4. then i tried

root@sivakumar-desktop:/usr/src/linux-2.6.31# make menuconfig
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2

5.then i tried make "oldconfig",
it asked some questions i ans Y/N/m

6.then next i run "make all"
some process run nearly 1 hour

then next i run "make modules_install"

i got some output like this
INSTALL /lib/firmware/bnx2/bnx2-mips-09-4.6.17.fw
INSTALL /lib/firmware/bnx2/bnx2-rv2p-09-4.6.15.fw
INSTALL /lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw
INSTALL /lib/firmware/bnx2/bnx2-rv2p-06-4.6.16.fw
MKDIR /lib/firmware/cxgb3
INSTALL /lib/firmware/cxgb3/t3b_psram-1.1.0.bin
INSTALL /lib/firmware/cxgb3/t3c_psram-1.1.0.bin
INSTALL /lib/firmware/cxgb3/t3fw-7.4.0.bin
MKDIR /lib/firmware/sb16
INSTALL /lib/firmware/sb16/mulaw_main.csp
INSTALL /lib/firmware/sb16/alaw_main.csp
INSTALL /lib/firmware/sb16/ima_adpcm_init.csp
INSTALL /lib/firmware/sb16/ima_adpcm_playback.csp
INSTALL /lib/firmware/sb16/ima_adpcm_capture.csp
DEPMOD 2.6.31

7.then when i run "make install"
i got the following output

root@sivakumar-desktop:/usr/src/linux-2.6.31# make install
sh /usr/src/linux-2.6.31/arch/x86/boot/install.sh 2.6.31 arch/x86/boot/bzImage \
System.map "/boot"

then when i run mkinitrd cmd i got the following message

root@sivakumar-desktop:/usr/src/linux-2.6.31# cd /boot
root@sivakumar-desktop:/boot# mkinitrd -o initrd.img-2.6.31 2.6.31
bash: mkinitrd: command not found

then i checked in the boot directory with ls

root@sivakumar-desktop:/boot# ls
abi-2.6.28-11-generic grub
System.map-2.6.28-11-generic vmlinuz-2.6.28-11-generic
config-2.6.28-11-generic initrd.img-2.6.28-11-generic
System.map-2.6.31 vmlinuz-2.6.31
config-2.6.31 lost+found
System.map-2.6.31.old vmlinuz-2.6.31.old
config-2.6.31.old memtest86+.bin
vmcoreinfo-2.6.28-11-generic


what steps i have to do after this
i think u completed all steps of kernel compilation . now its up to you u wanr to run this kernel with existing root filr system or new root file system. to run with other root file system you need to build ur root file system again you can use buildroot tool to build anew root file system.
 
Old 09-23-2009, 01:14 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,808

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Steps to compile and configure kernel bskumar7080 Linux - Software 10 09-23-2009 06:52 AM
Someone knows to configure & compile a 2.4.35.x kernel? zoby Slackware 15 11-29-2007 10:24 AM
How to configure & compile a 2.4.35.x kernel? zoby LinuxQuestions.org Member Intro 1 11-26-2007 02:20 AM
configure and compile own kernel Keruskerfuerst SUSE / openSUSE 8 11-16-2005 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:05 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