All of lore.kernel.org
 help / color / mirror / Atom feed
* how to transplant a driver from 2.4 to 2.6?
@ 2010-08-09  8:03 hacklu
  2010-08-09  8:28 ` Alexander Clouter
  2010-08-09  8:59 ` Valeo de Vries
  0 siblings, 2 replies; 3+ messages in thread
From: hacklu @ 2010-08-09  8:03 UTC (permalink / raw)
  To: linux-kernel

 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to transplant a driver from 2.4 to 2.6?
  2010-08-09  8:03 how to transplant a driver from 2.4 to 2.6? hacklu
@ 2010-08-09  8:28 ` Alexander Clouter
  2010-08-09  8:59 ` Valeo de Vries
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Clouter @ 2010-08-09  8:28 UTC (permalink / raw)
  To: linux-kernel

hacklu <embedway.linux@gmail.com> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to transplant a driver from 2.4 to 2.6?
  2010-08-09  8:03 how to transplant a driver from 2.4 to 2.6? hacklu
  2010-08-09  8:28 ` Alexander Clouter
@ 2010-08-09  8:59 ` Valeo de Vries
  1 sibling, 0 replies; 3+ messages in thread
From: Valeo de Vries @ 2010-08-09  8:59 UTC (permalink / raw)
  To: hacklu; +Cc: linux-kernel

On 9 August 2010 09:03, hacklu <embedway.linux@gmail.com> 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
>
> [...]

Fortunately for me, I've not been unlucky enough to need to port 2.4
drivers myself, so I can't tell you the exact steps. However there are
many articles and guides on the 'net that can: a google search for
"linux kernel porting driver 2.4 2.6" will suffice; just look at the
first few hits. If you need more help on Kconfig this may also help
you: http://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
.

Valeo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-09  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09  8:03 how to transplant a driver from 2.4 to 2.6? hacklu
2010-08-09  8:28 ` Alexander Clouter
2010-08-09  8:59 ` Valeo de Vries

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.