[wplug] Linux Programming Book

Dave Neuer mr_fred_smoothie at yahoo.com
Wed Apr 16 14:56:05 EDT 2003


--- "Weber, Larry A" <laweber at switch.com> wrote:
> What is unclear is why are there so many kernel
> header sets?  My Red Hat 8.0
> has kernel .h sets at  /usr/include/linux, 
> /usr/src/linux-2.4, and
> /usr/src/linux-2.4.18-14.  The example program will
> not compile with the
> first set of .h files but will compile with the
> other two.

Well, the first set of headers in this case
(/usr/include/*) is probably just the default set that
come w/ glibc when compiled for Linux. I.e., you only
have headers there which are required to build
Posix/Linux applications (NOT kernel modules).

The latter two (if one's not just a symlink to the
other) are the full set of kernel header files,
including the internal stuff that only in-kernel code
needs to see.

> Of course the
> resulting .o files will not work.  The modules
> install (insmod), with plenty
> of warnings, and uninstall (rmmod) but never
> execute.

What warnings? Unresolved symbols? Are you sure they
get inserted (or are you forcing them w/ insmod -f )?
I assume you're doing 'lsmod' to make sure they're
there, right?

How are you determining that they didn't execute? Make
sure you're looking in the correct logfile for the
loglevel you've chosen.

> 
> Just ordered a bunch of books on the kernel,  hope
> they help.

Jon Corbet's book (Linux Device Drivers?) is good,
plus I like "Understanding the Linux Kernel" though it
was written for 2.2. Using it w/ 2.4 is still helpful
(since the kernel source is available ;-))

Good luck,
Dave

> 
> 
> > -----Original Message-----
> > From:	Dave Neuer [SMTP:mr_fred_smoothie at yahoo.com]
> > Sent:	Wednesday, April 16, 2003 12:53 PM
> > To:	wplug at wplug.org
> > Subject:	RE: [wplug] Linux Programming Book
> > 
> > The problem is more likely that you don't have the
> > distro-specific "kernel-headers" package
> installed.
> > 
> > This is something that pisses me off about distros
> > (even though since disk space may be limited, it's
> > easy to see why -- and even reasonable that they
> do
> > it): they force you to install "*-dev" packages
> > separately from the main software packages, as if
> > everyone who installs software on a Linux box is
> some
> > "dumb user" who will never want to compile an app
> > themselves.
> > 
> > In fact, the opposite is probably still true w/
> Linux;
> > most people running it will probably have occasion
> to
> > compile some application by hand from source, and
> it's
> > not that helpful then to have "libthis" and
> "libthat"
> > installed w/ out "libthis-dev" and "libthat-dev".
> I
> > have to admit that of all distros, Debian actually
> > seems the worst as far as this goes.
> > 
> > Of course, kernel hackers and module authors are
> > probably more rare than "people who have to
> > occasionaly compile some userspace app to get the
> > latest-and-greatest feature", but still. What
> freakin'
> > Linux system shouldn't have kernel headers
> installed
> > by default in some *default* include search path?
> At
> > the very least, if you've installed gcc and
> binutils
> > or other "devlopment" tools, they should install
> the
> > kernel headers by default.
> > 
> > Dave
> > 
> > --- "Weber, Larry A" <laweber at switch.com> wrote:
> > > Probably not.  Linux kernels seem to change
> pretty
> > > fast.  Author claims the
> > > application works when compiled on RH71. and
> RH7.1. 
> > > I am using RH8.0.  I
> > > don't know which kernel came with the earlier
> revs
> > > of RH
> > > 
> > > > -----Original Message-----
> > > > From:	Brian Sammon [SMTP:brians+ at cs.cmu.edu]
> > > > Sent:	Wednesday, April 16, 2003 11:31 AM
> > > > To:	wplug at wplug.org
> > > > Subject:	Re: [wplug] Linux Programming Book
> > > > 
> > > > > I would like to hear from anyone in WPLUG
> who
> > > has read the book
> > > > "Practical
> > > > > Linux Programming: Device Drivers, Embedded
> > > Systems, and the Internet"
> > > > > Author Ashfaq A. Khan
> > > > > 
> > > > > I cannot get any of the example programs to
> > > compile and would like to
> > > > talk
> > > > > to anyone who has been successful.
> > > > 
> > > > One question that springs to mind-- 
> > > > Are you using the same kernel revision that
> the
> > > author based the book on?
> > > > 
> > > > 
> > > >
> _______________________________________________
> > > > wplug mailing list
> > > > wplug at wplug.org
> > > > http://www.wplug.org/mailman/listinfo/wplug
> > > _______________________________________________
> > > wplug mailing list
> > > wplug at wplug.org
> > > http://www.wplug.org/mailman/listinfo/wplug
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo
> > http://search.yahoo.com
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com



More information about the wplug mailing list