public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: kernelversion distinction
@ 2004-04-12 13:20 sam
  2004-04-12 14:51 ` Axel Weiss
  0 siblings, 1 reply; 3+ messages in thread
From: sam @ 2004-04-12 13:20 UTC (permalink / raw)
  To: Axel Weiss; +Cc: Sam Ravnborg, linux-kernel

Date: Man, 12 Apr 2004 12:21:44 +0200 skrev Axel Weiss <aweiss@informatik.hu-berlin.de> : 

>Ok, maybe there's some misunderstanding due to copy-n-paste-mistakes
>I made in my former mail.
>
>As I suppose my device drivers will not become part of the official
>kernel, I 
>keep them with my project. My opinion now is to use one Makefile for
>both, 
>2.2-2.4 and 2.6 kernels, and to keep this Makefile simple.

I have never looked at 2.2 so here I cannot help you.
But my original questions remains:
Why you cannot use the same Makefile for 2.4 and 2.6?

A simple Makefile like you outline:
>EXTRA_CFLAGS := -I/usr/include
>obj-m	       += <my_module>.o
><my_module>-objs = <my module object files>

Will work flawlessly with both 2.4 and 2.6.
I know people for a long time have hardcoded the gcc commandline
to build modules for 2.4 - but thats just wrong.
In this way you do not catch differences in gcc options.
For 2.4 we have seen only few of these config related flags to gcc,
in 2.6 we have a lot.

Please next time post the full Makefile.

Btw, a module that is dependent on /usr/include looks wrong...

I have no knowledge of a documented way to distingush between 2.4
and 2.6 in the Makefiles.

>Maybe, I'm not the first one who tries this, or maybe others would
>find it 
>useful - that's the reason why I want to discuss this topic here.
>(If I'm OT, 
>please let me know).
Not OT - please continue.

>
>all:
>	 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>
>clean:
>	 rm -f *.o *.ko .*.cmd <my_module>.mod.c

For the new external module support implemented in -mc4 you
do not have to hardcode the clean: target, and no attempts will
be made to update the kernel stuff.
Documentation soon to arrive...

     Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread
* 2.6.5 - incomplete headers?
@ 2004-04-11 11:27 Axel Weiss
  2004-04-11 18:33 ` kernelversion distinction (was 2.6.5 - incomplete headers?) Axel Weiss
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Weiss @ 2004-04-11 11:27 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm going to bring my device drivers[1] from 2.4 to 2.6 and have successfully 
installed kernel-2.6.5 for my athlon-PC.

Compiling (unmodified) 2.4-sources of my modules stops, missing irq_vectors.h.

What do I have to do to successfully include <linux/interrupt.h> from inside a 
kernel module? Or is ther a completely different strategy for ISRs in 2.6? 
(Where is the starting point to read, in this case?)

FYI:

$ uname -r
2.6.5

$ gcc -c -Wall -I/lib/modules/`uname -r`/build/include -DMODULE -D__KERNEL__ 
-DHARMONIE_DEBUG harmonie_io.c
In file included from /lib/modules/2.6.5/build/include/linux/irq.h:20,
                 from /lib/modules/2.6.5/build/include/asm/hardirq.h:6,
                 from /lib/modules/2.6.5/build/include/linux/interrupt.h:11,
                 from harmonie_io.c:44:
/lib/modules/2.6.5/build/include/asm/irq.h:16:25: irq_vectors.h: No such file 
or directory

Regards,
Axel Weiss

[1] device drivers for some dsp-cards, can be found at http://sourceforge.net/
projects/freesp/


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

end of thread, other threads:[~2004-04-12 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-12 13:20 kernelversion distinction sam
2004-04-12 14:51 ` Axel Weiss
  -- strict thread matches above, loose matches on Subject: below --
2004-04-11 11:27 2.6.5 - incomplete headers? Axel Weiss
2004-04-11 18:33 ` kernelversion distinction (was 2.6.5 - incomplete headers?) Axel Weiss
2004-04-11 20:33   ` Sam Ravnborg
2004-04-12 10:21     ` kernelversion distinction Axel Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox