Subject: PCMCIA driver compilation!

From: "Sun, Lei" <[email-masked]>
Date: Tue, 1 Aug 2000 11:43:01 -0400

(I post this message on arm-linux-kernel, but I didn't see what I posted, so
I post again in this mailing list,sorry)
Hi all:
   I am heading to write a device driver for a PCMCIA based data card for my
arm-linux machine. I tried to compile serial_cs.c and dummy_cs.c, just to
see if I can compile them as module. However I got tons of warning and
errors. like this:
/home/linuxsrc/linux/include/asm/semaphore.h:17: parse error before
`wait_queue
/home/arm_backup/arm/lib/gcc-lib/arm-linux/2.95.2/../../../../arm-linux/sys-
incl
ude/bits/types.h:95: warning: `__NFDBITS' redefined
serial_cs.c:249: `KERN_NOTICE' undeclared (first use in this function)
serial_cs.c:379: `link' undeclared (first use in this function)
bla bla.....
   My Makefile looks like this:

DEBUG=y

CC=arm-linux-gcc
LD=arm-linux-ld

INCLUDEDIR = /home/linuxsrc/linux/include
ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DPCMCIA_DEBUG
else
  DEBFLAGS = -O2
endif

CFLAGS = -D__kernel__  -DMODULE  -Wall  -I$(INCLUDEDIR) $(DEBFLAGS)

OBJS = serial_cs.o
all: $(OBJS)
   It looks like all the required header are sit in there. How comes it
could't find the symbol (or some symbols are redifined as WARNING).
   Anybody can tell me what's going on , please!

thank you!
Lei Sun

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Philip Blundell <[email-masked]>
Date: Tue, 01 Aug 2000 20:00:58 +0100

>CFLAGS = -D__kernel__  -DMODULE  -Wall  -I$(INCLUDEDIR) $(DEBFLAGS)

That probably needs to be `-D__KERNEL__ ...'.  The C preprocessor is case 
sensitive.

p.