Compiling ftape modules

Paul Howarth paul at city-fan.org
Tue Mar 1 21:04:06 UTC 2005


On Tue, 2005-03-01 at 03:56 +0000, Stephen Childress wrote:
> Dear Fedora List,
>      I posted a couple of weeks ago regarding my attempts to get ftape
> working on Fedora Core 3, since it no longer comes as a pre-compiled kernel
> module.  The suggestion at that time was to follow the directions in the
> release notes for compiling modules.  I've finally gotten back to working on
> this project.  Actually I had stumbled on the release notes before I posted
> but wasn't sure how to apply them to the task at hand.  Here is the question
> I have.  Quoting from the release notes, 
> 
> quote(( "For example, to build the foo.ko module, create the following file
> (named Makefile) in the directory containing the foo.c file:
> 
> obj-m    := foo.o
> 
> KDIR    := /lib/modules/$(shell uname -r)/build
> PWD    := $(shell pwd)
> 
> default:
>     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>               
> Issue the make command to build the foo.ko module." )) #end quote
> 
> Now, there are three modules that I need, ftape.ko, zftape.ko, and
> zft-compressor.ko.  The source files for these are in three directories
> under the drivers tree: lowlevel, zftape, and compressor.  Each directory
> has several .c and .h files as well as a Makefile, but there is no file
> named ftape.c, zftape.c, or zft_compressor.c.  The object module is created
> by linking several files together.  So my question is, what do I substitute
> for "foo.o" in the above makefile?  My strategy is going to be 1) Copy all
> .c and .h files to a temp directory.  2)  Create Makefile as above.  3)
> make.  4) Copy *.ko modules to appropriate directory in /lib/modules.  

This is a strategy that should work. Attached is what I think is a
suitable Makefile for the temp directory. It's basically a combined
version of the Makefile in the release notes plus the Makefiles in the
three module directories.

You'll probably want to run "strip -g *.ko" after building the modules,
before installing them to somewhere under /lib/modules/`uname -
r`/kernel/drivers and running "depmod -a"

Good luck!

Paul.
-- 
Paul Howarth <paul at city-fan.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 2097 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050301/029ad19e/attachment-0001.bin>


More information about the fedora-list mailing list