LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-17-2008, 05:20 PM   #1
j.todd
Member
 
Registered: Feb 2008
Location: Michigan
Distribution: Debian GNU/Linux Unstable
Posts: 144

Rep: Reputation: 16
Toruble with kernel compile - lenny


I'm compiling a new kernel with apm support, but I'm having some problems. When I get to make-kpkg I get this (the bold is the error):

exec make -f /usr/share/kernel-package/ruleset/minimal.mk clean
====== making target minimal_clean [new prereqs: ]======
Cleaning.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
make ARCH=xen distclean
make[1]: Entering directory `/usr/src/linux-2.6.25'
Makefile:514: /usr/src/linux-2.6.25/arch/xen/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-2.6.25/arch/xen/Makefile'. Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.25'
make: *** [minimal_clean] Error 2


What is the reason for this error? I know it says ther's no Makefile, but it should be there; right? I downloaded the kernel from http://www.kernel.org/pub/linux/kern...2.6.25.tar.bz2

I figure I might as well post this error, even though I'm probably only getting it because of the first one. The next step in compiling is
Code:
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
so I do that and get this:

Code:
debian:/usr/src/linux-2.6.25# fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
exec make -f /usr/share/kernel-package/ruleset/minimal.mk debian APPEND_TO_VERSION=-custom  INITRD=YES 
====== making target minimal_debian [new prereqs: ]======
This is kernel package version .
test -d debian || mkdir debian
test ! -e stamp-building || rm -f stamp-building
test -f debian/control || sed         -e 's/=V/2.6.25-custom/g'        \
                -e 's/=D/2.6.25-custom-10.00.Custom/g'         -e 's/=A/i386/g'  \
	        -e 's/=SA//g'   -e 's/=L/ /g' \
                -e 's/=I//g'                                    \
                -e 's/=CV/2.6/g'                       \
                -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g'                        \
                -e 's/=ST/linux/g'      -e 's/=B/xen/g'    \
		         /usr/share/kernel-package/Control > debian/control
test -f debian/changelog ||  sed -e 's/=V/2.6.25-custom/g'             \
	    -e 's/=D/2.6.25-custom-10.00.Custom/g'        -e 's/=A/i386/g'       \
            -e 's/=ST/linux/g'     -e 's/=B/xen/g'         \
	    -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g' 	                    \
             /usr/share/kernel-package/changelog > debian/changelog
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
            cp -f  /usr/share/kernel-package/$file ./debian/;                               \
        done
for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
          cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
        done
test -d ./debian/stamps || mkdir debian/stamps 
exec debian/rules  APPEND_TO_VERSION=-custom  INITRD=YES  kernel_image kernel_headers 
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -lt: unary operator expected
/bin/sh: line 0: [: -eq: unary operator expected
/bin/sh: line 0: [: -eq: unary operator expected
/bin/sh: line 0: [: -eq: unary operator expected
/bin/sh: line 0: [: -lt: unary operator expected
/bin/sh: line 0: [: -eq: unary operator expected
/bin/sh: line 0: [: -eq: unary operator expected
/bin/sh: line 0: [: -gt: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -gt: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected

====== making target CONFIG-common [new prereqs: testdir]======

====== making target debian/stamp-conf [new prereqs: ]======
The changelog says we are creating 2.6.25-custom.
However, I thought the version is ..-custom
exit 3
make: *** [debian/stamp-conf] Error 3
That (^) error is probably being caused by the first (I think).

Anyone know why this is happening and how I could fix it?

Thanks for any help.
 
Old 08-17-2008, 10:43 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hi.

What steps have you taken to get this far?

If the process can't find the makefile, you might be starting in the wrong directory.

There is usually a symlink of your kernel dir. called /linux

/usr/src/linux-2.6.25 linked to /usr/src/linux

cd to /usr/src/linux

Then start the process.

backup the old /boot/.config file

run the selection program,

make xconfig

or if you like the way it is, just do

make oldconfig

then you can begin the compile,

make all (this encapsulates make clean, make bzImage, make modules)

make modules_install

and as root run,

make install

then reboot to see your new kernel,

That's how I do it anyway, except I change the top part of the makefile, to give it my own version name instead of "custom".

See how you go, Glenn
 
Old 08-17-2008, 10:58 PM   #3
j.todd
Member
 
Registered: Feb 2008
Location: Michigan
Distribution: Debian GNU/Linux Unstable
Posts: 144

Original Poster
Rep: Reputation: 16
Hmm..my way is a little bit different. I've always done this, and it's worked every time, except this time.

My way, In chronological order:

Code:
su
cd /usr/src
wget wget http://www.kernel.org/pub/linux/kern...2.6.25.tar.bz2
tar xjf linux-2.6.25.tat.bz2
-- This next part I only did during my first attempt at a kernel compile, because someone in irc mentioned this : 'From the kernel source README: "Do NOT use the /usr/src/linux area! This area has a (usually incomplete) set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be." That's why I don't symlink the kernel source to /usr/src/linux anymore --
Code:
ln -s linux-2.6.23.8 linux && cd /usr/src/linux
Code:
make clean
make mrproper
cp /boot/config-`uname -r` ./.config
make menuconfig
-- Now I load the config file for my current kernel, and then make changes to the config --
Code:
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
-- After --append-to-version= I write a name for the kernel, it begins with a minus (-) and has no have whitespace.
Then the kernel compiles (usually) and I install it like --
Code:
dpkg -i fake_kernel_name.deb
dpkg -i fake_kernel_headers_name.deb
shutdown -r now
That's how I usually do it. The guide I learned to do all this from is here.
 
Old 08-18-2008, 12:28 AM   #4
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Oh, I don't recognise anything after make "menuconfig"

I see debian package manager,

I guess that's a good example of difference between distributions.
 
Old 08-18-2008, 02:17 AM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by GlennsPref View Post
Oh, I don't recognise anything after make "menuconfig"

I see debian package manager,

I guess that's a good example of difference between distributions.
If you use the "Debian" way of compiling a kernel, it's cleaner because you get a kernel packaged correctly for Debian and tracked properly by the base system. With a generic installation, the kernel will still work, but won't be tracked by the package manager.

While I used to believe that compiling a custom kernel is the best way to go, it's usually a bad idea unless you absolutely cannot do without a feature not enabled in the stock kernel.

Last edited by vharishankar; 08-18-2008 at 02:22 AM.
 
Old 08-18-2008, 05:51 AM   #6
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Yes, I agree.

That is one thing that is not supported very well in mandriva.

That is keeping track of installs from source.

Thanks for the heads up!

regards Glenn

There is an rpm that is meant to keep tabs/track of mandriva-kernel releases. I could be missing something. GW

Last edited by GlennsPref; 08-18-2008 at 07:45 AM. Reason: I could be missing something
 
Old 08-18-2008, 04:05 PM   #7
j.todd
Member
 
Registered: Feb 2008
Location: Michigan
Distribution: Debian GNU/Linux Unstable
Posts: 144

Original Poster
Rep: Reputation: 16
I was able to get the kernel to compile, I had to disable xen support.
 
Old 01-22-2009, 10:44 PM   #8
corondan
LQ Newbie
 
Registered: Jan 2009
Location: michigan
Distribution: ubuntu/debian
Posts: 1

Rep: Reputation: 0
fix

just got bitten by this too.
add --arch=x86 or whatever your arch is.. e.g.

make-kpkg --arch=x86 kernel_image

works with xen too.

Last edited by corondan; 01-22-2009 at 10:55 PM.
 
  


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
Kernel panic-on Debian lenny Vassos Linux - Kernel 1 08-10-2008 11:21 PM
lenny installer cannot load kernel modules cbchisanga Debian 1 06-04-2008 08:06 AM
Upgrade lenny but keep back kernel .. Yukon Linux - Kernel 2 03-30-2008 10:53 PM
Toruble with firewall. zozoman Linux - General 3 10-29-2005 12:35 PM
Toruble with Sound [Memory?] Gerardoj Slackware 0 12-13-2004 10:52 PM

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

All times are GMT -5. The time now is 04:10 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
Open Source Consulting | Domain Registration