[zaptel-commits] branch group/kernelmove r1049 - in
/team/group/kernelmove: ./ kernel/
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Tue May 9 22:34:40 MST 2006
Author: jcollie
Date: Wed May 10 00:34:38 2006
New Revision: 1049
URL: http://svn.digium.com/view/zaptel?rev=1049&view=rev
Log:
More build updates.
Modified:
team/group/kernelmove/Makefile
team/group/kernelmove/kernel/Makefile
team/group/kernelmove/kernel/Makefile.24
team/group/kernelmove/kernel/Makefile.26
Modified: team/group/kernelmove/Makefile
URL: http://svn.digium.com/view/zaptel/team/group/kernelmove/Makefile?rev=1049&r1=1048&r2=1049&view=diff
==============================================================================
--- team/group/kernelmove/Makefile (original)
+++ team/group/kernelmove/Makefile Wed May 10 00:34:38 2006
@@ -15,19 +15,6 @@
UNAME_M:=$(DEB_HOST_GNU_TYPE)
endif
# If you want to build for a kernel other than the current kernel, set KVERS
-ifndef KVERS
-KVERS:=$(shell uname -r)
-endif
-ifndef KSRC
- ifneq (,$(wildcard /lib/modules/$(KVERS)/build))
- KSRC:=/lib/modules/$(KVERS)/build
- else
- KSRC_SEARCH_PATH:=/usr/src/linux-2.4 /usr/src/linux
- KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ]; then echo $$dir; break; fi; done)
- endif
-endif
-KVERS_MAJ:=$(shell echo $(KVERS) | cut -d. -f1-2)
-KINCLUDES:=$(KSRC)/include
CFLAGS+=-I. -Ikernel -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
ifneq (,$(findstring ppc,$(UNAME_M)))
@@ -38,27 +25,11 @@
endif
CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
-KFLAGS=-I$(KINCLUDES) -O6
-KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I$(KSRC)/drivers/net \
- -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I$(KSRC)/drivers/net/wan -I$(KINCLUDES)/net
-ifneq (,$(wildcard $(KINCLUDES)/linux/modversions.h))
- KFLAGS+=-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h
-endif
-ifneq (,$(findstring ppc,$(UNAME_M)))
-KFLAGS_PPC:=-msoft-float -fsigned-char
-endif
-KFLAGS+=$(KFLAGS_PPC)
-ifeq ($(KVERS_MAJ),2.4)
- ifneq (,$(findstring x86_64,$(UNAME_M)))
- KFLAGS+=-mcmodel=kernel
- endif
-endif
#
# Features are now configured in zconfig.h
#
-KFLAGS+=-DSTANDALONE_ZAPATA
CFLAGS+=-DSTANDALONE_ZAPATA
KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/$(KERNDIR)
KMAKE_INST = $(KMAKE) \
@@ -69,12 +40,6 @@
CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
-
-ifeq ($(KVERS_MAJ),2.4)
- BUILDVER:=linux24
-else
- BUILDVER:=linux26
-endif
ifeq ($(BUILDVER),linux26)
ifneq (,$(wildcard $(ROOT_PREFIX)/etc/modprobe.d))
@@ -141,22 +106,7 @@
LIBTONEZONE_SO_MAJOR_VER:=1
LIBTONEZONE_SO_MINOR_VER:=0
-MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
- ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp pciradio \
- ztd-loc # ztdummy
-#MODULES+=wcfxsusb
-# build ztdummy by default for 2.6 kernels
-ifeq (${BUILDVER},linux26)
-MODULES+=ztdummy
-endif
-
-MODULESO:=$(MODULES:%=%.o)
-MODULESKO:=$(MODULES:%=%.ko)
-ifeq ($(BUILDVER),linux26)
-MODULES_BUILD:=$(MODULESKO)
-else
-MODULES_BUILD:=$(MODULESO)
-endif
+
BIN_DIR:=$(INSTALL_PREFIX)/sbin
LIB_DIR:=$(INSTALL_PREFIX)/usr/lib
@@ -170,14 +120,6 @@
obj-m:=$(MODULESO)
-# Also build xpp in the subdirectory xpp/ . But only for >=2.6.10 and only
-# for i386. On other archs the module will probably build but panic.
-# This line is only meaningful when this Makefile is used as kconfig for
-# 2.6 build
-
-ifneq (,$(shell [ 0$(SUBLEVEL) -ge 10 ] && [ "$(ARCH)" = 'i386' ] && echo 1))
-obj-m+=xpp/
-endif
ifneq (,$(wildcard /usr/include/newt.h))
ZTTOOL:=zttool
@@ -207,8 +149,6 @@
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
$(KMAKE) modules
-xpp: linux26
-
#ifneq ($(TOPDIR),)
#include $(TOPDIR)/Rules.make
#endif
@@ -224,26 +164,6 @@
tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
-tor2.o: tor2-hw.h tor2fw.h
-
-zaptel.o: digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
-
-torisa.o: torisa.h
-
-wcusb.o: wcusb.h
-
-wcfxsusb.o: wcfxsusb.h
-
-wctdm.o: wctdm.h
-
-wctdm24xxp.o: wctdm.h
-
-pciradio.o: radfw.h
-
-ztdummy.o: ztdummy.h
-
-$(MODULESO): %.o: %.c zaptel.h
- $(HOSTCC) $(KFLAGS) -o $@ -c $<
tor2ee.o: tor2-hw.h
@@ -257,8 +177,6 @@
torisatool: torisatool.o
$(CC) -o $@ $^
-
-zaptel.c: tones.h
prereq: version.h
Modified: team/group/kernelmove/kernel/Makefile
URL: http://svn.digium.com/view/zaptel/team/group/kernelmove/kernel/Makefile?rev=1049&r1=1048&r2=1049&view=diff
==============================================================================
--- team/group/kernelmove/kernel/Makefile (original)
+++ team/group/kernelmove/kernel/Makefile Wed May 10 00:34:38 2006
@@ -1,1 +1,44 @@
-# detect kernel major version and select proper makefile here
+ifneq ($(KERNELRELEASE),)
+
+# support older 2.5/2.6 kernel builds that don't know about 'Kbuild' files
+include Kbuild
+
+else
+
+# search for kernel sources
+
+ifeq ($(KERNELDIR),)
+KERNELDIR_SEARCH_PATH=/lib/modules/`uname -r`/build /usr/src/linux-2.4 /usr/src/linux
+KERNELDIR=$(shell for dir in $(KERNELDIR_SEARCH_PATH); do if [ -f $$dir/Makefile ]; then echo $$dir; break; fi; done)
+endif
+
+ifeq ($(wildcard $(KERNELDIR)/Makefile),)
+
+modules:
+ @echo Cannot find kernel sources...
+ @exit 1
+
+clean:
+ @echo Cannot find kernel sources...
+ @exit 1
+
+else
+
+VERSION=$(shell awk '/^VERSION/ { print $$3 }' $(KERNELDIR)/Makefile )
+PATCHLEVEL=$(shell awk '/^PATCHLEVEL/ { print $$3 }' $(KERNELDIR)/Makefile )
+SUBLEVEL=$(shell awk '/^SUBLEVEL/ { print $$3 }' $(KERNELDIR)/Makefile )
+
+export KERNELDIR
+export VERSION
+export PATCHLEVEL
+export SUBLEVEL
+
+modules:
+ $(MAKE) -f Makefile.$(VERSION)$(PATCHLEVEL) modules
+
+clean:
+ $(MAKE) -f Makefile.$(VERSION)$(PATCHLEVEL) clean
+
+endif
+
+endif
Modified: team/group/kernelmove/kernel/Makefile.24
URL: http://svn.digium.com/view/zaptel/team/group/kernelmove/kernel/Makefile.24?rev=1049&r1=1048&r2=1049&view=diff
==============================================================================
--- team/group/kernelmove/kernel/Makefile.24 (original)
+++ team/group/kernelmove/kernel/Makefile.24 Wed May 10 00:34:38 2006
@@ -22,9 +22,6 @@
KFLAGS+=-DSTANDALONE_ZAPATA
-CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
-CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
-
#MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
# ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp pciradio \
# ztd-loc # ztdummy
@@ -34,15 +31,14 @@
all: $(MODULESO)
-version.h: ../version.h
- cp $^ $@
+tor2.o: tor2-hw.h tor2fw.h
-tor2.o: tor2-hw.h tor2fw.h
-
zaptel.o: digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
-
+
+digits.h: tones.h
+
torisa.o: torisa.h
-
+
wcusb.o: wcusb.h
wcfxsusb.o: wcfxsusb.h
@@ -55,26 +51,29 @@
ztdummy.o: ztdummy.h
-$(MODULESO): %.o: %.c zaptel.h version.h
+$(MODULESO): %.o: %.c zaptel.h ../version.h
$(HOSTCC) $(KFLAGS) -o $@ -c $<
-tones.h: ../tones.h
- cp $^ $@
+tones.h: gendigits
+ ./gendigits > tones.h
-tor2fw.h: ../tor2fw.h
- cp $^ $@
+tor2fw.h: tormenta.rbt
+ ./makefw tormenta.rbt tor2fw > tor2fw.h
-radfw.h: ../radfw.h
- cp $^ $@
+radfw.h: pciradio.rbt
+ ./makefw pciradio.rbt radfw > radfw.h
-zaptel.c: tones.h
+zaptel.c: tones.h ../version.h
+
+../version.h:
+ $(MAKE) -C .. version.h
# TODO: what about this one?
data:
$(MAKE) -C datamods datamods
clean:
- rm -f makefw tor2fw.h radfw.h
+ rm -f tor2fw.h radfw.h
rm -f *.o
rm -rf .tmp_versions
rm -f gendigits tones.h
Modified: team/group/kernelmove/kernel/Makefile.26
URL: http://svn.digium.com/view/zaptel/team/group/kernelmove/kernel/Makefile.26?rev=1049&r1=1048&r2=1049&view=diff
==============================================================================
--- team/group/kernelmove/kernel/Makefile.26 (original)
+++ team/group/kernelmove/kernel/Makefile.26 Wed May 10 00:34:38 2006
@@ -5,7 +5,7 @@
else
# Normal Makefile
-KERNELDIR := /lib/modules/`uname -r`/build
+KERNELDIR?=/lib/modules/`uname -r`/build
all: modules
More information about the zaptel-commits
mailing list