Re: Compiling ftape modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>On Tue, 2005-03-01 at 03:56 +0000, Stephen Childress wrote:
>> 
>> 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@xxxxxxxxxxxx>
>Url :
https://www.redhat.com/archives/fedora-list/attachments/20050301/029ad19e/Ma
kefile.bin
>

Thanks very much for your help and for the makefile, Paul.  The good news is
that I was able to compile the .ko modules.  I created four directories,
three for the *.h files (named lowlevel, zftape, and compressor) and one for
all the .c files.  Then I added the Makefile from the above link to the
directory with the .c files, typed "make", and everything compiled.  (I
skipped the strip step mentioned above).  Then I created the ftape directory
tree under the /lib/modules/<version>/kernel/drivers/char directory and
copied the .ko modules to their directories.  Then I typed "depmod -a".

I should also mention that the tape drive is not connected directly to the
floppy controller, but rather through an accelerator card.  Therefore, I
have copied the the following lines from the old /etc/modules.conf to the
new /etc/modprobe.conf :

alias char-major-27 zft-compressor
options ftape ft_fdc-base=0x370 ft_fdc_irq=6 ft_fdc_dma=2

Now the bad news.  First of all:

# mt -f /dev/ftape status"  
/dev/ftape: No such file or directory

so the modules are not being installed automatically.  But it gets worse:

# modprobe zft-compressor
[<c4af049b>] time_inb + 0x1d/0167 [ftape]
[<c4af0646>] ftape_calibrate + 0x60/0x28a [ftape]
[<c011bb87>] printk + 0xe/0x11
[<c4aee73b>] ftape_udelay_calibrate + 0x19/0x1b [ftape]
[<c480d119>] ftape_init + 0x119/0x140 [ftape]
[<c01371dd>] sys_init_module + 0x1d8/02a8
[<c0103477>] syscall_call + 0x7/0xb
Kernel panic - not syncing: /home/steve/temp/ftape-calibr.c:167:
spin_is_locked on unitialized spinlock c4aff87c.

...at which point the system dies.

This is very similar to what was happening when I was trying to compile "in
tree" via "make modules", having configured the kernel for only the ftape
modules.  One time previously I somehow (I'm not sure how) got the modules
to load, but the spin_is_locked message kept printing out and "mt" did not
display the status of the drive.  

So my new question is, is there some incompatibility between the ftape
modules and the kernel as installed in the FC3 release?  My next project is
going to be to recompile the entire kernel along with the modules I need.
Is one of the "experimental" kernel options that is activated possibly
causing this problem?  If I still can't get it to work, I'm planning to
revert to FC1 or another distribution.  Fortunately I do have other backup
options, but I would like to get this tape drive working, if possible.
Otherwise I'm going to revert to FC1 or some other distribution.  

Am I the only person who still has a floppy tape drive?  Does anyone have a
functioning drive so they can tell me what they did?  Thanks in advance.

Stephen Childress


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux