Re: how to transplant a driver from 2.4 to 2.6?

From: Alexander Clouter
Date: Mon Aug 09 2010 - 05:10:13 EST


hacklu <embedway.linux@xxxxxxxxx> wrote:
>
> 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 use the following 2.6 Makefile template for an out of kernel drive I
am forced to use:
----
alex@berk:~$ cat /usr/src/wag54g/sangam-atm/Makefile
ifneq ($(KERNELRELEASE),)
include Kbuild
else
KERNELDIR := /usr/src/wag54g/linux/
all::
$(MAKE) -C $(KERNELDIR) M=`pwd` tiatm.ko
endif
alex@berk:~$ cat /usr/src/wag54g/sangam-atm/Kbuild
obj-m := tiatm.o
tiatm-y := cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o

ccflags-y += -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL -DCPATM_TASKLET_MODE
#ccflags-$(DEBUG) += -D....
----

It's not great, but it works.

Cheers

--
Alexander Clouter
.sigmonster says: Never eat more than you can lift.
-- Miss Piggy

--
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/