diff -Naurp dahdi-linux-2.6.0/drivers/dahdi/Kbuild dahdi-linux-2.6.0.mod/drivers/dahdi/Kbuild
--- dahdi-linux-2.6.0/drivers/dahdi/Kbuild	2012-01-03 23:44:43.000000000 +0100
+++ dahdi-linux-2.6.0.mod/drivers/dahdi/Kbuild	2012-02-28 23:26:58.702294362 +0100
@@ -31,6 +31,8 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECH
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_KB1)	+= dahdi_echocan_kb1.o
 obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2)	+= dahdi_echocan_mg2.o
 
+obj-m += oct612x/
+
 obj-m += $(DAHDI_MODULES_EXTRA)
 
 # Only enable this if you think you know what you're doing. This is not
diff -Naurp dahdi-linux-2.6.0/drivers/dahdi/oct612x/Kbuild dahdi-linux-2.6.0.mod/drivers/dahdi/oct612x/Kbuild
--- dahdi-linux-2.6.0/drivers/dahdi/oct612x/Kbuild	1970-01-01 01:00:00.000000000 +0100
+++ dahdi-linux-2.6.0.mod/drivers/dahdi/oct612x/Kbuild	2012-02-28 23:14:21.596595303 +0100
@@ -0,0 +1,29 @@
+EXTRA_CFLAGS = -I$(src)/include -I$(src)/octdeviceapi -I$(src)/octdeviceapi/oct6100api
+
+APIDIR := octdeviceapi/oct6100api/oct6100_api
+
+obj-m += oct612x.o
+
+oct612x-objs := oct612x_base.o \
+	$(APIDIR)/oct6100_adpcm_chan.o \
+	$(APIDIR)/oct6100_channel.o \
+	$(APIDIR)/oct6100_chip_open.o \
+	$(APIDIR)/oct6100_chip_stats.o \
+	$(APIDIR)/oct6100_conf_bridge.o \
+	$(APIDIR)/oct6100_debug.o \
+	$(APIDIR)/oct6100_events.o \
+	$(APIDIR)/oct6100_interrupts.o \
+	$(APIDIR)/oct6100_memory.o \
+	$(APIDIR)/oct6100_miscellaneous.o \
+	$(APIDIR)/oct6100_mixer.o \
+	$(APIDIR)/oct6100_phasing_tsst.o \
+	$(APIDIR)/oct6100_playout_buf.o \
+	$(APIDIR)/oct6100_remote_debug.o \
+	$(APIDIR)/oct6100_tlv.o \
+	$(APIDIR)/oct6100_tone_detection.o \
+	$(APIDIR)/oct6100_tsi_cnct.o \
+	$(APIDIR)/oct6100_tsst.o \
+	$(APIDIR)/oct6100_user.o \
+	apilib/bt/octapi_bt0.o \
+	apilib/largmath/octapi_largmath.o \
+	apilib/llman/octapi_llman.o
diff -Naurp dahdi-linux-2.6.0/drivers/dahdi/oct612x/Makefile dahdi-linux-2.6.0.mod/drivers/dahdi/oct612x/Makefile
--- dahdi-linux-2.6.0/drivers/dahdi/oct612x/Makefile	2010-08-13 21:38:32.000000000 +0200
+++ dahdi-linux-2.6.0.mod/drivers/dahdi/oct612x/Makefile	2012-02-28 22:48:19.007717573 +0100
@@ -1,3 +1,10 @@
+ifdef KBUILD_EXTMOD
+# We only get here on kernels 2.6.0-2.6.9 .
+# For newer kernels, Kbuild will be included directly by the kernel
+# build system.
+include $(src)/Kbuild
+
+else
 CFLAGS=-V3.4 -ffunction-sections -I/lib/modules/$(shell uname -r)/build/include -Iinclude -Ioctdeviceapi -Ioctdeviceapi/oct6100api -DGFP_ATOMIC=0 -Dkmalloc=calloc -Dkfree=free
 LDFLAGS=-V3.4 -Wl,-Map -Wl,test.map -Wl,--gc-sections
 
@@ -36,3 +43,4 @@ test: test.o $(OCTASIC_OBJS)
 clean:
 	rm -rf test test.o
 	rm -rf $(OCTASIC_OBJS)
+endif
diff -Naurp dahdi-linux-2.6.0/drivers/dahdi/oct612x/oct612x_base.c dahdi-linux-2.6.0.mod/drivers/dahdi/oct612x/oct612x_base.c
--- dahdi-linux-2.6.0/drivers/dahdi/oct612x/oct612x_base.c	1970-01-01 01:00:00.000000000 +0100
+++ dahdi-linux-2.6.0.mod/drivers/dahdi/oct612x/oct612x_base.c	2012-02-28 23:20:13.484738514 +0100
@@ -0,0 +1,29 @@
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+#include <oct6100api/oct6100_api.h>
+
+EXPORT_SYMBOL(Oct6100ChannelOpen);
+EXPORT_SYMBOL(Oct6100ToneDetectionEnableDef);
+EXPORT_SYMBOL(Oct6100ChipOpen);
+EXPORT_SYMBOL(Oct6100ChannelOpenDef);
+EXPORT_SYMBOL(Oct6100ChipClose);
+EXPORT_SYMBOL(Oct6100ChipCloseDef);
+EXPORT_SYMBOL(Oct6100GetInstanceSize);
+EXPORT_SYMBOL(Oct6100ChannelModifyDef);
+EXPORT_SYMBOL(Oct6100InterruptServiceRoutine);
+EXPORT_SYMBOL(Oct6100GetInstanceSizeDef);
+EXPORT_SYMBOL(Oct6100ChipOpenDef);
+EXPORT_SYMBOL(Oct6100InterruptServiceRoutineDef);
+EXPORT_SYMBOL(Oct6100ApiGetCapacityPins);
+EXPORT_SYMBOL(Oct6100ToneDetectionEnable);
+EXPORT_SYMBOL(Oct6100EventGetToneDef);
+EXPORT_SYMBOL(Oct6100ChannelModify);
+EXPORT_SYMBOL(Oct6100EventGetTone);
+EXPORT_SYMBOL(Oct6100ApiGetCapacityPinsDef);
+
+MODULE_LICENSE("Proprietary");
+MODULE_AUTHOR("Stefan Knoblich");
+MODULE_DESCRIPTION("Octasic 612x echo canceller library");
+MODULE_VERSION("0.0.1");
diff -Naurp dahdi-linux-2.6.0/drivers/dahdi/wct4xxp/Kbuild dahdi-linux-2.6.0.mod/drivers/dahdi/wct4xxp/Kbuild
--- dahdi-linux-2.6.0/drivers/dahdi/wct4xxp/Kbuild	2011-11-01 16:27:21.000000000 +0100
+++ dahdi-linux-2.6.0.mod/drivers/dahdi/wct4xxp/Kbuild	2012-02-28 22:57:30.663667452 +0100
@@ -2,7 +2,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT
 
 FIRM_DIR	:= ../firmware
 
-EXTRA_CFLAGS += -I$(src)/.. $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../oct612x/include -Wno-undef
 
 # The OCT612X source files are from a vendor drop and we do not want to edit
 # them to make this warning go away. Therefore, turn off the
@@ -14,7 +14,7 @@ ifeq ($(HOTPLUG_FIRMWARE),yes)
   EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
 endif
 
-wct4xxp-objs := base.o vpm450m.o $(shell $(src)/../oct612x/octasic-helper objects ../oct612x)
+wct4xxp-objs := base.o vpm450m.o
 
 ifneq ($(HOTPLUG_FIRMWARE),yes)
 wct4xxp-objs += $(FIRM_DIR)/dahdi-fw-oct6114-064.o $(FIRM_DIR)/dahdi-fw-oct6114-128.o $(FIRM_DIR)/dahdi-fw-oct6114-256.o
