 This directory contains a Makefile to make a loadable floppy
module. It assumes that your linux sources are in /usr/src/linux.
 The ALPHA and QDF drivers can be found at:
ftp.imag.fr:pub/Linux/ZLIBC/floppy/ALPHA and
ftp.imag.fr:pub/Linux/ZLIBC/floppy/QDF
 The manipulation described here-in work with all QDF drivers, and with the
ALPHA drivers more recent than the 15 october 1994.


 HOW TO COMPILE THE FLOPPY DRIVERS AS MODULES
 ============================================

[In the following instructions, I assume that you have your linux
sources in /usr/src/linux. If you have them somewhere else, replace
/usr/src/linux by the appropriate directory. In the makefiles, I
assume that on your system /usr/include/linux is a symlink to the
current linux include files (i.e. $LINUXDIR/include/linux). If that
isn't the case, make that link, it will ease the compilation of other
programs too.]

 Compilation of the alpha driver as a module:
 --------------------------------------------
 1. Copy the original floppy.c to a safe location:
cp /usr/src/linux/drivers/block/floppy.c /usr/src/linux/drivers/block/floppy.c.orig
 2. Apply the Alpha patch (which must be more recent than 15
october). This updates the floppy.c file itself, but also some support
files such as fd.h and ksyms.c. The changes to these other files are
backwards compatible.
 3. Copy the new alpha driver to the alpha directory:
cp /usr/src/linux/drivers/block/floppy.c alpha/
 4. Restore the original driver:
mv /usr/src/linux/drivers/block/floppy.c.orig /usr/src/linux/drivers/block/floppy.c
 5. Compile the kernel. Make config will propose you the configuration
options for the ALPHA driver. All options, except 'Normal floppy disk
support', will be ignored.
 6. Run lilo and reboot.

 You have now a kernel exporting the necessary kernel symbols for the
floppy module, but still containing the old driver as a default.

 7. make floppy_alpha.o


 Compilation of the other drivers as modules:
 --------------------------------------------
 You need at least 1.1.72 to compile the floppy driver as a module.

 To compile the stock driver as a module:
 1. make floppy_stock.o
 You may ignore the warnings about defined but not used symbols.

 To compile the QDF driver as a module:
 1. Copy floppy.c to a safe location
 2. Apply the QDF patch on your current tree. (i.e. after application
of the floppy_module.patch, or the ALPHA patch followed by restoring
the stock floppy.c file)
 3. Copy floppy.c to the qdf directory
 4. Restore the original driver
 5. make floppy_qdf.o
 You may ignore the warnings about defined but not used symbols.


 Compilation of "vintage" floppy drivers more recent than 1.1.41
 ---------------------------------------------------------------

 fd.h and fdreg.h are not backwards compatible with drivers of kernel
releases older than 1.1.51. In order to compile these drivers:
 1. create a directory called the name of the release (example 45)
 2. in the Makefile, copy the sample entry for 45, and change only the
number (if it is not 35)
 3. Coppy the relevant floppy.c to 45/
 4. create a directory 45/linux
 5. Copy fd.h and fdreg.h of the version to be compiled into this directory.
 6. Make floppy_45.o
 7. You may get many undefined symbols when inserting the module. To
fix this, put these into ksyms.c, recompile the kernel and reboot.

 Compilation of "vintage" floppy drivers older than 1.1.41 and more recent than
 1.1.23------------------------------------------------------------------------
 ------

 fd.h and fdreg.h are not backwards compatible with drivers of kernel
releases older than 1.1.41. In order to compile these drivers:
 1. create a directory called the name of the release (example 35)
 2. in the Makefile, copy the sample entry for 35, and change only the
number (if it is not 35)
 3. create a directory 35/linux
 4. Copy the relevant floppy.c to 35/
 5. Lower the MAX_BUFFER_SECTORS define to be 18.
 6. Copy fd.h and fdreg.h of the version to be compiled into this directory.
 7. Make floppy_35.o
 8. You may get many undefined symbols when inserting the module. To
fix this, put these into ksyms.c, recompile the kernel and reboot.



 INSERTING FLOPPY MODULE INTO THE KERNEL
 =======================================

 To insert a floppy module into a kernel compiled with "Normal floppy
disk support" for the first time, do the following:
 1. Make sure all floppy file descriptor are closed. If that is not the
case, the driver refuses to install.
 2. Make sure all drive motors are off. (Wait four seconds after
closing the last floppy file descriptor.) If you have only one drive,
it is enough to make sure its led is off. Beware: If you have several
drives, the motor of some of these may still be spinning, while their
led is off.
 3. insmod floppy_xxx.o REPLACE=1

 To insert a floppy module into a kernel compiled without normal
"floppy disk support", type 'insmod floppy_xxx.o'

 If insmod gives you errors about undefined symbols, apply
floppy_module.patch, and recompile the kernel.

 You may set the environmental variable 'floppy' to a value you wish
to pass to the floppy driver.
i.e. export floppy=thinkpad insmod floppy.o
will load the floppy module on a thinkpad. You may also pass several
space-separated parameters:
export floppy="two_fdc 4,5,cmos" insmod floppy.o

 To remove a floppy module, type 'rmmod floppy'.


 CONFIGURING THE ALPHA FLOPPY MODULE
 ===================================

 Syntax:

insmod floppy_alpha.o FDC1=xxx FDC2=xxx FLOPPY_MAJOR=xxx FLOPPY_IRQ=xxx FLOPPY_DMA=xxx

 Several parameters can be tuned with the ALPHA floppy module:

 FDC1: the io base address of the first floppy controller.
 FDC2: the io base address of the first floppy controller.
 FLOPPY_IRQ: the interrupt used (shared by both controllers)
 FLOPPY_DMA: the dma channed used (shared by both controllers)
 FLOPPY_MAJOR: the major device number used.

 If you have two floppy controllers, which share neither IRQ nor DMA, you
may insert several floppy drivers:
 insmod -o floppy0 floppy_alpha.o FDC1=0x3f0 FLOPPY_IRQ=6 FLOPPY_DMA=2 FLOPPY_MAJOR=2
 insmod -o floppy1 floppy_alpha.o FDC1=0x370 FLOPPY_IRQ=7 FLOPPY_DMA=3 FLOPPY_MAJOR=31

