From 356adae07bc66f5ccb708230952173c84e42d6ae Mon Sep 17 00:00:00 2001 From: ppisa Date: Fri, 6 Oct 2006 18:41:05 +0000 Subject: [PATCH] The non-OMK stand-alone build updated to work with 2.6.18+ kernels. The linux/version.h file no longer provides information about kernel release. This information can be found in the linux/utsrelease.h include file. The problem reported and correction suggested by Francesco Monica, but little different solution tested in other drivers has been included at the end. --- lincan/src/Makefile.std | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lincan/src/Makefile.std b/lincan/src/Makefile.std index b71ca95..c6c8112 100644 --- a/lincan/src/Makefile.std +++ b/lincan/src/Makefile.std @@ -48,6 +48,7 @@ endif #KERNEL_LOCATION=/usr/src/linux-2.2.19 #KERNEL_LOCATION=/usr/src/linux-2.2.22 #KERNEL_LOCATION=/usr/src/linux-2.6.0 +#KERNEL_LOCATION=/usr/src/linux-2.6.18-rc4/_build/arm #KERNEL_LOCATION=/home/cvs/ocera/ocera-build/kernel/linux @@ -97,6 +98,13 @@ CONFIG_SHELL = TOPDIR=$(TOPDIR) KERNEL_VERSION := $(shell awk -F\" '/REL/ {print $$2}' \ $(KERNEL_LOCATION)/include/linux/version.h | awk -F\- '{print $$1}') +ifeq ($(KERNEL_VERSION),) +KERNEL_VERSION=$(shell grep UTS_RELEASE ${KERNEL_LOCATION}/include/linux/utsrelease.h | \ + sed 's/[^"]*"\(.*\)\{1\}"/\1/') +endif + +#$(warning KERNEL_VERSION = $(KERNEL_VERSION)) + PROC_FS := $(shell awk -F\ '/PROC_FS/ {print $$3}' \ $(KERNEL_LOCATION)/include/linux/autoconf.h) -- 2.39.2