File: MCONFIG

package info (click to toggle)
ftape 4.03pre1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,644 kB
  • ctags: 2,404
  • sloc: ansic: 19,136; makefile: 270; sh: 140
file content (513 lines) | stat: -rw-r--r-- 17,391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
###############################################################################
#
#       Copyright (C) 1997, 1998 Claus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /usr/src/oldsrc/cvs/ftape-stacked/MCONFIG,v $
# $Revision: 1.63 $
# $Date: 1998/09/13 21:48:21 $
#
#     Compile time configuration for the QIC-40/80/3010/3020 ftape
#     driver for Linux
#
###############################################################################

###############################################################################
#
# Pathnames. These should work just fine.
#
# change the following to point to the start of your kernel source tree:
#

# IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT

LINUX_LOCATION = /usr/src/linux

#
# Ok. It looks ugly. It is ugly.
#

KERNEL_VERSION = $$(grep UTS_RELEASE $(LINUX_LOCATION)/include/linux/version.h|cut -d '"' -f 2)


#
# Change the following to point to the directory where you want the 
# modules to be installed.
#

MODULESDIR = $(DEST)/lib/modules/$(KERNEL_VERSION)/misc

#
# This is a path prefix prepended to the installation paths for the
# helper utilities and scripts.
#
# NOTE: This used to be /usr rather than /usr/local in previous
#       versions

PREFIX = $(DEST)/usr
# PREFIX = /usr/local

#
# Change the following to point to the directory where you want the 
# swapout, ftformat and vtblc utilities to be installed.
#
# NOTE: ftformat and vtblc and swapout used to be installed in /sbin
#       in previous versions.
#

SBINDIR = $(DEST)/sbin
# SBINDIR = $(PREFIX)/sbin

#
# Change the following to point to the directory where you want
# the mt program and the listtape scripts to be installed.
#

BINDIR = $(DEST)/bin

#
# IMPORTANT NOTE: if you don't like to install the documentation at
# all then please comment out the INFODIR and/or DOCDIR variables,
# i.e. add a `#' sign right at the beginning of the respective line.
#

#
# Change the following to point to the directory where you want the info 
# documentation to be installed in
#

INFODIR = $(PREFIX)/info

#
# The html and dvi version of the manual will be installed under the
# following directory:
#

DOCDIR = $(PREFIX)/doc/ftape

#
# The  manual pages (if any) will be installed below this directory:
#

MANDIR = $(PREFIX)/man

#
###############################################################################

###############################################################################
# IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT #
###############################################################################
#
# Get the configuration of the kernel ftape is compiled for.
#
# This will only work with a configured kernel, but we need a fully
# configured kernel anyways?? If `$(LINUX_LOCATION)/.config' DOESN'T
# exist you'll need to set the variables of the "else" part of the
# "ifeq" clause according to the configuration of the kernel you want
# ftape to use with. If `$(LINUX_LOCATION)/.config' exists you can
# skip this part and go on with the hardware configuration options
# below.
#
#

ifeq ($(LINUX_LOCATION)/.config,$(wildcard $(LINUX_LOCATION)/.config))
include $(LINUX_LOCATION)/.config
else

#
# If the file `$(LINUX_LOCATION)/.config' doesn't exists, then try to
# tune the parameters in this "else" part of the "ifeq" clause above
# to fit your setup. 
#
# If you attempt to use CONFIG_MODVERSIONS then make sure that
# `$(LINUX_LOCATION)/include/linux/modversions.h' REALLY
# EXISTS. Otherwise, don't use CONFIG_MODVERSIONS.
#
# You should also set the CONFIG_M386/486/586/686 according to your
# processor type. When running an DEC alpha then comment out the
# CONFIG_M486=y line and uncomment the CONFIG_ALPHA=y line.
#

#CONFIG_M386=y
CONFIG_M486=y
#CONFIG_M586=y
#CONFIG_M686=y
#CONFIG_MAMDK6
#CONFIG_ALPHA=y
#CONFIG_MODVERSIONS=y

#
# DON'T touch the following two lines! To enable/disable the procfs
# interface you should uncomment/comment out the CONFIG_FT_PROC_FS
# option below and leave the CONFIG_PROC_FS option ENABLED.
#

CONFIG_PROC_FS=y
CONFIG_MODULES=y

endif

#
###############################################################################

###############################################################################
# IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT #
###############################################################################
#
# You MUST uncomment the following line if you are running a SMP
# (multi-processor) system
#
#SMP = 1
#
###############################################################################

###############################################################################
# IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT  IMPORTANT #
###############################################################################
#
# Hardware configuration for the floppy tape drive.
#
# You need to take care of the following options if you didn't connect
# your floppy tape to the standard floppy controller, i.e. if you
# didn't plugged the floppy tape into the floppy controller already
# contained in your computer system.
#
# Short description of available options
# (`FDC' stands for `Floppy Disk Controller')
#
#       PROBE_FC10      - if defined will look for a FC-10 (or FC-20)
#                         card.
#       FDC_BASE        - sets base address if using non-standard fdc
#       FDC_IRQ         - sets interrupt if FDC_BASE is defined
#       FDC_DMA         - sets dma channel if FDC_BASE is defined
#       MACH2           - Support for Mountain MACH-2 controller. You
#                         have to specify its base address (either
#                         0x1E0 or 0x3E0). 
#       CLK_48MHZ       - must be defined and set to 0 if your 82078
#                         is _not_ being run from a 48 Mhz clock
#                         oscillator. Normally you don't need to worry
#                         about it.
#       
#
#
# If you're using a non-standard floppy disk controller for the tape
# drive, enable one (only!) of the following lines and set the
# FDC_BASE, FDC_IRQ and FDC_DMA parameters to the actual values.
#
# `enable' means: `uncomment one of the lines starting with
# "FDC_OPT = ..."'. `uncomment' means: remove the leading `#'
#
# The following values hopefully reflect the default settings for
# those controllers.
#
# Note1: A FC-10/FC-20 controller must use either of DMA 1, 2, or 3.
#        DMA 5 and 7 does NOT work!.
#
# Note2: IRQ 2 and IRQ 9 can be considered the same. When using IRQ 2
#        on a controller you must specify IRQ 9 here!
#
# Note3: *_ALL_* parameters can as well be set as module parameters
#        during module loading. This means that the following values
#        only give the defaults in case you load the modules without
#        any parameters.
#
# Note4: The "..._DEV=0" lines determine which device nodes to use
#        with which floppy tape controller (/dev/qft0, ...,
#        /dev/qft3).  In case you have an internal floppy tape plugged
#        into the standard floppy controller and a parallel port
#        floppy tape drive, then leave the "STD_DEV=0" line as it is
#        and uncomment either the option settings for the Trakker or
#        the BackPack tape drive and set either "TRAKKER_DEV=1" or
#        "BPCK_DEV=1" to use the parallel port tape drive using
#        "/dev/qft1".
#
FDC_OPT :=
#
# For a standard floppy tape controller or automatic configuration of
# parallel port floppy tape drives uncomment the following line:
#
AUTO_DEV=0
FDC_OPT +=      -DCONFIG_FT_STD_FDC_$(AUTO_DEV) \
		-DCONFIG_FT_AUTO_$(AUTO_DEV)=1
#
# For a standard floppy tape controller, uncomment the following line:
#
STD_DEV=0
#FDC_OPT +=      -DCONFIG_FT_STD_FDC_$(STD_DEV) \
		-DCONFIG_FT_INT_$(STD_DEV)=1
#
# For a Mountain MACH-2 controller, try
#
MACH2_DEV=0
#FDC_OPT +=	-DCONFIG_FT_MACH2_$(MACH2_DEV)=1	\
		-DCONFIG_FT_FDC_BASE_$(MACH2_DEV)=0x1E0	\
		-DCONFIG_FT_FDC_IRQ_$(MACH2_DEV)=6	\
		-DCONFIG_FT_FDC_DMA_$(MACH2_DEV)=2	\
		-DCONFIG_FT_NR_BUFFERS=3		\
		-DCONFIG_FT_INT_$(MACH2_DEV)=1
#
# For Colorado CMS FC-10 or FC-20 controllers:
#
FC10_DEV=0
#FDC_OPT +=	-DCONFIG_FT_FC10_$(FC10_DEV)=1	\
		-DCONFIG_FT_FDC_BASE_$(FC10_DEV)=0x180	\
		-DCONFIG_FT_FDC_IRQ_$(FC10_DEV)=9	\
		-DCONFIG_FT_FDC_DMA_$(FC10_DEV)=3	\
		-DCONFIG_FT_NR_BUFFERS=3		\
		-DCONFIG_FT_INT_$(FC10_DEV)=1
#
# Secondary floppy disk controller:
# including Ditto Dash 2Mbps controller, ExaByte accelerator card,
# CTC-2Mb (Seagate) and hopefully any 82078 based FDC controller card.
#
82078_DEV=0
#FDC_OPT =	-DCONFIG_FT_FDC_BASE_$(82078_DEV)=0x370	\
		-DCONFIG_FT_FDC_IRQ_$(82078_DEV)=6	\
		-DCONFIG_FT_FDC_DMA_$(82078_DEV)=2	\
		-DCONFIG_FT_NR_BUFFERS=3		\
		-DCONFIG_FT_INT_$(82078_DEV)=1
#
# Maybe one of the following alternatives work if you have a Ditto
# Dash and the above setting doesn't work:
#
#FDC_OPT =	-DCONFIG_FT_FDC_BASE_$(82078_DEV)=0x370	\
		-DCONFIG_FT_FDC_IRQ_$(82078_DEV)=5	\
		-DCONFIG_FT_FDC_DMA_$(82078_DEV)=3	\
		-DCONFIG_FT_NR_BUFFERS=3		\
		-DCONFIG_FT_INT_$(82078_DEV)=1
#FDC_OPT =	-DCONFIG_FT_FDC_BASE_$(82078_DEV)=0x370	\
		-DCONFIG_FT_FDC_IRQ_$(82078_DEV)=2	\
		-DCONFIG_FT_FDC_DMA_$(82078_DEV)=3	\
		-DCONFIG_FT_NR_BUFFERS=3		\
		-DCONFIG_FT_INT_$(82078_DEV)=1
#
# For a HP Colorado Trakker parallel port drive, try
#
TRAKKER_DEV=0
#FDC_OPT +=	-DCONFIG_FT_FDC_PARPORT_$(TRAKKER_DEV)=-1 \
                -DCONFIG_FT_PAR_$(TRAKKER_DEV)=1 \
                -DCONFIG_FT_TRAKKER_$(TRAKKER_DEV)=1
#
# For a Micro Solutions opispo "backpack" based parallel port drive, try
#
BPCK_DEV=0
#FDC_OPT +=	-DCONFIG_FT_FDC_PARPORT_$(BPCK_DEV)=-1 \
                -DCONFIG_FT_PAR_$(BPCK_DEV)=1 \
		-DCONFIG_FT_BPCK_$(BPCK_DEV)=1
#
#
#
#
###############################################################################

###############################################################################
#
# Generic ftape options.
#
# Valid ftape options are:
#
# GCC_2_4_5_BUG         - must be set if using gcc-2.4.5 to prevent
#                         bad assembler-code for the dma
#                         handling. Type `gcc --version' to determine
#                         the version of gcc.
#
# CONFIG_FT_PROC_FS     - enables proc interface (read-only) to provide
#                         information about kind of tape drive, data
#                         rate etc. Consumes about 2 kb of memory.
#                         Make sure to read the file `BUGS' before
#                         enabling this option. THIS WILL NOT WORK
#                         with Linux v1.2.13 (and older) kernels. It
#                         is safe to use this option with v2.1.x and
#                         later kernels
#
# BROKEN_FLOPPY_DRIVER  - leave this defined if you DON'T apply the patch
#                         `patches/v2.0/floppy.c.dif' to the floppy
#                         driver of the standard kernel distribution.
#                         If you DON'T apply my patch, then you
#                         definitely need this switch if you want to
#                         create an emergency (rescue) disk with
#                         ftape. DON'T define this if you are running
#                         v2.1.x or later kernels. But if you are
#                         running v2.1.115 (maybe also v2.1.116) or
#                         previous kernels of the 2.1.x series, then
#                         consider applying the patch
#                         `patches/v2.1/floppy.c.dif' to your kernel.
#

FTAPE_OPT  = -DTHE_FTAPE_MAINTAINER=\"heine@math1.rwth-aachen.de\"
FTAPE_OPT += -DBROKEN_FLOPPY_DRIVER
FTAPE_OPT += -DCONFIG_FT_PROC_FS

#
###############################################################################

###############################################################################
#
# Options that affect the amount of debugging messages printed to the
# system console (or kernel log files). Also reduces the size of the
# driver.
#
#  CONFIG_FT_FULL_DEBUG      - if NOT defined, all messages with trace
#                              level 6 (i.e. ft_fdc_dma) or higher are
#                              disabled. You probably don't want to
#                              define this unless you want debug the
#                              drive. If unsure, don't define this.
#
#  CONFIG_FT_NO_TRACE        - if defined, only information and errors
#                              show up. If unsure, don't define it.
#   
#  CONFIG_FT_NO_TRACE_AT_ALL - if defined, no trace output shows
#                              up. If unsure, don't define it.
#

#TRACE_FLAGS = -DCONFIG_FT_NO_TRACE
#TRACE_FLAGS = -DCONFIG_FT_NO_TRACE_AT_ALL
#TRACE_FLAGS = -DCONFIG_FT_FULL_DEBUG

#
###############################################################################

###############################################################################
#
# Compiler options for your architecture
#
# ... in case you need any special options ...
#

# ARCH_OPT = 

#
###############################################################################

###############################################################################
#
#  Don't change anything below this point!!!!
#  
#  Unless you know what you are doing. Don't expect me to help you.
#

ifeq ($(CONFIG_MODULES),n)
ERROR_RULE:
	@echo
	@echo "*************************************************"
	@echo
	@echo "Please reconfigure your kernel to support runtime"
	@echo "loadable modules. Retry making ftape afterwards."
	@echo
	@echo "*************************************************"
	@echo
	exit 1
endif

#
# MODVERSIONS and MODULES stuff
#
MAKING_MODULES  = 1
MODULE_OPT      = -DMODULE
ifeq ($(CONFIG_MODVERSIONS),y)
MODULE_OPT     += -DMODVERSIONS
MODULE_OPT     += -include $(LINUX_LOCATION)/include/linux/modversions.h
MODULE_OPT     += -include $(TOPDIR)/include/linux/modversions.h
GENKSYMS        = /sbin/genksyms
endif

#
# assemble the compile time options 
#
CONFIG_OPT := $(FTAPE_OPT) $(FDC_OPT) $(TRACE_FLAGS) 
CONFIG_OPT += -DCONFIG_FTAPE_MODULE
CONFIG_OPT += -DCONFIG_FT_INTERNAL_MODULE
CONFIG_OPT += -DCONFIG_FT_TRAKKER_MODULE
CONFIG_OPT += -DCONFIG_FT_BPCK_MODULE
CONFIG_OPT += -DCONFIG_ZFTAPE_MODULE
CONFIG_OPT += -DCONFIG_ZFT_COMPRESSOR_MODULE
override CONFIG_FTAPE          := m
override CONFIG_FT_INTERNAL    := m
override CONFIG_FT_TRAKKER     := m
override CONFIG_FT_BPCK        := m
override CONFIG_ZFTAPE         := m
override CONFIG_ZFT_COMPRESSOR := m
ifneq ($(findstring, CONFIG_FT_PROC_FS,$(FTAPE_OPT)),"")
CONFIG_FT_PROC_FS              := y
endif

#
# options needed to compile kernel source
#
INCLUDE_PATH   := -I. -I$(TOPDIR)/include -I$(LINUX_LOCATION)/include
KERNEL_OPT     := -D__KERNEL__ $(INCLUDE_PATH)
ifdef SMP
KERNEL_OPT     += -D__SMP__
endif
#
# processor specific options.
#
ifdef CONFIG_M386
KERNEL_OPT     += -m386 -DCPU=386
endif
ifdef CONFIG_M486
KERNEL_OPT     += -m486 -DCPU=486
endif
ifdef CONFIG_M586
KERNEL_OPT     += -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586
endif
ifdef CONFIG_M686
KERNEL_OPT     += -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
endif
ifdef CONFIG_MAMDK6
KERNEL_OPT     += -mamdk6 -frisc
endif

WARNINGS        = -Wall -Wstrict-prototypes
COMPILE         = -O2 $(ARCH_OPT) -fomit-frame-pointer -fno-strength-reduce
LD_OPT	        = -r -S

ifdef CONFIG_ALPHA
#
#  The -dc flag is needed when using BFD insmod on an alpha !
#  You should probably also remove -m486 when compiling on the alpha.
#
LD_OPT         += -dc
endif

CC              = gcc

HOSTCC          = gcc

#
# these are the flags referred to by the make rules in Rules.make.
# 
GKSFLAGS  = $(CONFIG_OPT) $(KERNEL_OPT) $(EXTRA_CFLAGS)
CPPFLAGS  = $(CONFIG_OPT) $(MODULE_OPT) $(KERNEL_OPT) $(EXTRA_CFLAGS)
CFLAGS    = $(WARNINGS) $(COMPILE) $(CPPFLAGS)
SFLAGS    = -fverbose-asm $(CFLAGS)
EXTRA_LDFLAGS = $(LD_OPT)

INSTALL  = install -c -o root -g root

#
#  end of MCONFIG
#
################################################################################ 
# LocalWords:  cvs ftape MCONFIG QIC Linux usr src linux Ok UTS ifeq config FS
# LocalWords:  wildcard MODVERSIONS modversions PROC MAMDK endif MODULESDIR lib
# LocalWords:  misc swapout kdtime SBINDIR sbin INFODIR DOCDIR html dvi doc SMP
# LocalWords:  MANDIR FDC FC IRQ DMA fd fdc dma CLK Mhz DCONFIG CMS Mbps CTC Mb
# LocalWords:  ExaByte GCC gcc NR Sparc Mips proc kb dif DTHE claus momo rwth
# LocalWords:  aachen DBROKEN DMODULE DMODVERSIONS TOPDIR GENKSYMS genksyms ZFT
# LocalWords:  ZFTAPE ifneq findstring ifdef DCPU mamdk frisc Wstrict fomit fno
# LocalWords:  LD dc BFD insmod CC GKSFLAGS CFLAGS CPPFLAGS SFLAGS fverbose asm
# LocalWords:  LDFLAGS ftformat procfs LocalWords