mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Axel Weiss <aweiss@informatik.hu-berlin.de>
To: linux-kernel@vger.kernel.org
Subject: kernelversion distinction (was 2.6.5 - incomplete headers?)
Date: Sun, 11 Apr 2004 20:33:19 +0200	[thread overview]
Message-ID: <200404112033.20025.aweiss@informatik.hu-berlin.de> (raw)
In-Reply-To: <40793189.3070403@portrix.net>

Am Sonntag, 11. April 2004 13:52 schrieb Jan Dittmer:
> Axel Weiss wrote:
> > 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.
> >
> > (Where is the starting point to read, in this case?)
>
> LWN has quite a collection:
>
> http://lwn.net/Articles/driver-porting/
Thanks, very helpful!

Now, I`m trying to be compatible with older kernels (2.2 - 2.4) and want to 
find out what kernel version ist installed, from Makefile. My first solution:

# Makefile
KERNELVERSION := $(shell uname -r)
KERNELBASE    := $(basename $(KERNELVERSION))
KERNELMINOR   := $(suffix $(KERNELBASE))
KERNELMAJOR   := $(basename $(KERNELBASE))

OLD_MODULES := $(strip $(foreach V, .0 .1 .2 .3 .4, $(shell [ "$(V)" = 
"$(KERNELMINOR)" ] && echo yes)))

ifeq ($(KERNELMAJOR),2)
ifeq ($(OLD_MODULES),yes)
#	old style make
endif #ifeq ($(OLD_MODULES),yes)
#	new style make, like pointed out in LWN
else #ifeq ($(KERNELMAJOR),2)
all:
	@echo kernel $(KERNELVERSION) not supported
endif #ifeq ($(KERNELMAJOR),2)

Any improvements? Up to which kernel version should old style make be used?

Regards,
Axel Weiss


  reply	other threads:[~2004-04-11 18:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-11 11:27 2.6.5 - incomplete headers? Axel Weiss
2004-04-11 11:52 ` Jan Dittmer
2004-04-11 18:33   ` Axel Weiss [this message]
2004-04-11 20:33     ` kernelversion distinction (was 2.6.5 - incomplete headers?) Sam Ravnborg
2004-04-12 10:21       ` kernelversion distinction Axel Weiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200404112033.20025.aweiss@informatik.hu-berlin.de \
    --to=aweiss@informatik.hu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®