LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2003, 11:48 AM   #1
Coldmiser
Member
 
Registered: Sep 2003
Location: Chicago
Distribution: Ubuntu
Posts: 36

Rep: Reputation: 15
Talking Hurray, I compiled my first kernel....


I found the "world's best" (or at least probably close) instructions for compiling my own kernel (at www-106.ibm.com/developerworks/edu/l-dw-linuxkernel-i.html)

Anyway, compiling was easy (after reading) but when I was trying to configure the kernel, I rand into some problems.
I tried xconfig and I got the following....

************
labbox2:/usr/src/linux # make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux/scripts'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkparse.o tkparse.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkcond.o tkcond.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkgen.o tkgen.c
gcc -o tkparse tkparse.o tkcond.o tkgen.o
cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk
echo "set defaults \"arch/i386/defconfig\"" >> kconfig.tk
echo "set ARCH \"i386\"" >> kconfig.tk
cat tail.tk >> kconfig.tk
chmod 755 kconfig.tk
make[1]: Leaving directory `/usr/src/linux/scripts'
wish -f scripts/kconfig.tk
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Application initialization failed: this isn't a Tk applicationcouldn't connect to display ":0.0"
Error in startup script: invalid command name "button"
while executing
"button .ref"
(file "scripts/kconfig.tk" line 51)
make: *** [xconfig] Error 1
labbox2:/usr/src/linux #
************

So I tried menuconfig and got this.....

************
labbox2:/usr/src/linux # make menuconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/linux/scripts/lxdialog'
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status

>> Unable to find the Ncurses libraries.
>>
>> You must have Ncurses installed in order
>> to use 'make menuconfig'

make[1]: *** [ncurses] Error 1
make[1]: Leaving directory `/usr/src/linux/scripts/lxdialog'
make: *** [menuconfig] Error 2
labbox2:/usr/src/linux #
************

OK, now I can see I need "Ncurses" (gonna have to install that) for menuconfig to work, but what happened to xconfig?

Anyone have an idea?
 
Old 10-17-2003, 01:34 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
You're probably trying to run make xconfig as root and root can't write to the user's current X display. You should consider making the kernel as a non-root user and then installing it as root.
 
Old 10-17-2003, 01:52 PM   #3
NeoY2k
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian Sid
Posts: 23

Rep: Reputation: 15
I had the same probleme... it's really really simple and I spent much time on it...
Just try
apt-get install libncurses-dev
And it will work!
 
Old 10-17-2003, 03:23 PM   #4
Coldmiser
Member
 
Registered: Sep 2003
Location: Chicago
Distribution: Ubuntu
Posts: 36

Original Poster
Rep: Reputation: 15
You were right mcleodnine when I tried to run xconfig as a regular user it worked perfectly (thanks for noticing the # in my prompt) I was under the impression that configuring/compiling the kernel should be done as root (I guess that comes from my windows background where everything was done as "root")

One last question then I think I'll be done here. After I create my new kernel and put it in place, is there any way to run it without rebooting the box? I've notice there are a lot of people that are proud their boxes have stayed up for 100+ days and I was wondering if you can replace the kernel without rebooting (hence uptime continues).

Wow, lots of options for the kernel, I guess I have more reading to do....
 
Old 10-17-2003, 03:34 PM   #5
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
nope. you'll still need to reboot to enable the new kernel.
 
Old 10-17-2003, 04:33 PM   #6
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
I used to leave my computer on 24/7 and the electricity bill was too much.
Now that I shut off my computer when I go to work and sleep, I save $10 on electricity bill! woohoo!
 
  


Reply


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
new kernel compiled successfully, but the kernel-source package is the same old? luqman Red Hat 2 03-03-2005 09:41 AM
Hurray almost done but page not loading in crclient ! gopikrish Linux - Networking 0 01-02-2005 11:53 AM
YES! Hurray! SoliTear Linux - Newbie 3 01-30-2004 10:51 PM
kernel panic on reboot of newly compiled kernel lyceum Linux - Newbie 4 09-09-2003 10:40 AM
Finally got my Mouse Wheel to Work! Hurray!! Paul Parr LinuxQuestions.org Member Success Stories 5 04-10-2003 02:27 PM


All times are GMT -5. The time now is 11:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration