[ltp] Ubuntu Linux

Sudhakar Chandra linux-thinkpad@linux-thinkpad.org
Sun, 17 Oct 2004 17:55:22 -0700


[Note: I'm new to this list and have not seen the entire exchange.  But 
I think I can help.]

ash@kgbspy.org wrote:
> On Fri, 8 Oct 2004, Joachim Breitner wrote:
>>> You don't generally need a package for it.  Just grab the tar.{bz2,gz}
>>> from kernel.org.  Might want to snag /proc/config.gz while you're at it.
>> Well, since it is debian based, you are probably better off building the
>> kernel the debian way, which means using kernel-package. You can still
>> use the original sources, but better results might come using your
>> distro's, they probably patched it.
> Unfortunately it's not the kernel that I want to build, but a third 
> party app that needs the source to compile against. I have the plain 
> source from kernel.org, but presumably it needs source that has actually 
> been used to compile a kernel... at least that's how it seems.

Here is how to compile your application:

1. Check the version of kernel you have installed (uname -a).
2. Get the kernel source for it. You can do it in one of two ways:
	(a) Download and install kernel-source-XX.yy.zz package corresponding 
to your running kernel version
	(b) Download the sorce code from kernel.org corresponding to your 
running kernel version
3. cd /usr/src and extract the src of the kernel like so:
	(a) tar zxvf linux-xx.yy.zz.tar.gz
	(b) bzcat kernel-source-xx.yy.zz.tar.bz | tar xvf -
4. Create a symbolic link /usr/src/linux pointing to the source tree:
	(a) ln /usr/src/linux-xx.yy.zz /usr/src/linux
	(b) ln /usr/src/kernel-source-xx.yy.zz /usr/src/linux
5. Copy over the config file corresponding to the running kernel into 
the source tree: cp /boot/config-xx.yy.zz /usr/src/linux/.config
6. cd /usr/src/linux
7. make dep

Your application will compile now.

Thaths
-- 
Grandpa: "I'm an old man, no one listens to me."
Lisa:    "I'm a young girl, no one listens to me."
Homer:   "I'm a white male aged 18 to 49, everyone listens to me, no
          matter how dumb my suggestions are."
Slacker Without Borders                        http://openscroll.org/
Key fingerprint = 8A 84 2E 67 10 9A 64 03  24 38 B6 AB 1B 6E 8C E4