how to transplant a driver from 2.4 to 2.6?
From: hacklu
Date: Mon Aug 09 2010 - 04:04:06 EST
I have a driver project programmed under the 2.4 kernel.
but now ,I want to transplant it to 2.6.
the driver has some directions;
like 1/1.c 2/2.c 3/3_1.c 3_2.c
in this case ,how can I imtate the template Makefile of 2.6's driver
I only kown this:
------------------------------------------
ifneq ($(KERNELRELEASE),)
# call from kernel build system
scull-objs := demo1.o demo2.o
obj-m := demo.o
else
CROSS_COMPILE ?=powerpc
KERNELLIBDIR=/lib
KERNELDIR ?= /linux-2.6.25_minifo
PWD := $(shell pwd)
all:
$(MAKE) CROSS_COMPILE=$(CROSS_COMPILE) ARCH=powerpc -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
endif
depend .depend dep:
$(CC) $(CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
-----------------------------------------
thanks so much
--------------
hacklu
2010-08-09
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/