source: trunk/package/ltq-vmmc/Makefile @ 27409

Last change on this file since 27409 was 27409, checked in by blogic, 5 years ago

fixes dependencies of pjsip and ltq-vmmc

File size: 4.7 KB
Line 
1#
2# Copyright (C) 2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=drv_vmmc
12PKG_VERSION:=1.9.0
13PKG_RELEASE:=2
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_MD5SUM:=d8eee8cba0edb28974cc1f8532e3bd18
17PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
18
19include $(INCLUDE_DIR)/package.mk
20
21define KernelPackage/ltq-vmmc
22  SUBMENU:=Voice over IP
23  TITLE:=TAPI LL driver for Voice Macro
24  URL:=http://www.lantiq.com/
25  DEPENDS:=+kmod-ltq-tapi @TARGET_lantiq
26  FILES:=$(PKG_BUILD_DIR)/src/drv_vmmc.ko
27  AUTOLOAD:=$(call AutoLoad,25,drv_vmmc)
28  MAINTAINER:=John Crispin <blogic@openwrt.org>
29endef
30
31define KernelPackage/ltq-vmmc/description
32        Voice Subsystem Low Level Driver for Danube, AR9, VR9 device families
33endef
34
35define KernelPackage/ltq-vmmc/config
36        source "$(SOURCE)/Config.in"
37endef
38
39CONFIGURE_ARGS += \
40        ARCH=$(LINUX_KARCH) \
41        --enable-linux-26 \
42        --enable-kernelbuild="$(LINUX_DIR)" \
43        --enable-kernelincl="$(LINUX_DIR)/include" \
44        --enable-tapiincl="$(STAGING_DIR)/usr/include/drv_tapi" \
45        --with-ifxos-incl=$(STAGING_DIR)/usr/include/ifxos \
46        $(call autoconf_bool,CONFIG_VOICE_CPE_VMMC_EVENT_LOGGER,el-debug) \
47        $(call autoconf_bool,CONFIG_VOICE_CPE_VMMC_PMC,pmc) \
48        $(call autoconf_bool,CONFIG_VOICE_CPE_VMMC_DISABLE_DECT_NIBBLE_SWAP,dect-nibble-swap) \
49        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_FAX,fax t38) \
50        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_CID,cid) \
51        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_DECT,dect) \
52        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_KPI,kpi) \
53        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_LT_GR909,lt calibration) \
54        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_HDLC,hdlc) \
55        $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_TRACES,trace)
56
57ifneq ($(CONFIG_VOICE_CPE_VMMC_MPS_HISTORY_SIZE),128)
58  CONFIGURE_ARGS += --enable-history-buf=$(CONFIG_VOICE_CPE_VMMC_MPS_HISTORY_SIZE)
59endif
60
61#defaults
62FW_URL:=http://localhost/
63FW_TARGET:=ifx_firmware.bin
64FW_FILE:=fw_voip_ifx.tar.gz
65COEF_TARGET:=ifx_bbd_fxs.bin
66COEF_FILE:=coef_voip_ifx.tar.gz
67
68FW_DIR:=lib/firmware
69
70ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE),y)
71  CONFIGURE_ARGS += --with-device=DANUBE
72  FW_SOURCE:=voip_R12.1.0.1.0-enc.bin
73  FW_TARGET:=danube_firmware.bin
74  FW_FILE=fw_voip_danube-12.1.0.1.0.tar.gz
75  FW_MD5SUM:=51868b88dee9dbc65d3dbba355ded91c
76  FW_DOWNLOAD:=1
77  COEF_SRC:=danube_bbd_fxs.bin
78  COEF_TARGET:=danube_bbd_fxs.bin
79  COEF_FILE:=coef_voip_danube-0.9.0.tar.gz
80  COEF_MD5SUM:=c8ac6592b304b03829a8123560e15710
81  COEF_DOWNLOAD:=1
82endif
83
84ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_AR9),y)
85  CONFIGURE_ARGS += --with-device=AR9
86  # TODO: add fw/coef
87endif
88
89COEF_SRC:=$(COEF_TARGET)
90
91ifeq ($(CONFIG_VOICE_VMMC_WITH_DEVICE_FALCON),y)
92  CONFIGURE_ARGS += --with-device=FALCON
93  FW_SOURCE:=voip_R1.1.0.6.0-enc.bin
94  FW_MD5SUM:=cd4366a52a8010b76793e3810a4f14b3
95  FW_TARGET:=falcon_voip_fw.bin
96  FW_FILE=fw_voip_falcon-1.1.0.6.0.tar.gz
97  FW_DOWNLOAD:=1
98  COEF_TARGET:=falcon_bbd.bin
99# FXS part
100ifeq ($(CONFIG_LTQ_VOICE_CPE_VMMC_COEF_FALCON_ETSI),y)
101        COEF_SRC:=ETSI_3_10.BIN
102endif
103ifeq ($(CONFIG_LTQ_VOICE_CPE_VMMC_COEF_FALCON_US600R),y)
104        COEF_SRC:=R600_3_10.BIN
105endif
106ifeq ($(CONFIG_LTQ_VOICE_CPE_VMMC_COEF_FALCON_USE_CUSTOM_FILE),y)
107        COEF_SRC:=$(CONFIG_LTQ_VOICE_CPE_VMMC_COEF_FALCON_CUSTOM_FILE)
108endif
109  COEF_FILE:=coef_voip_falcon.tar.gz
110  COEF_MD5SUM:=56c5a838f2bb9bd87d0e8dce271f810b
111  COEF_DOWNLOAD:=1
112endif
113
114ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_VR9),y)
115  CONFIGURE_ARGS += --with-device=VR9
116  # TODO: add fw/coef
117endif
118
119define Download/firmware
120  FILE:=$(FW_FILE)
121  URL:=$(FW_URL)
122  MD5SUM:=$(FW_MD5SUM)
123endef
124$(eval $(if $(FW_DOWNLOAD),$(call Download,firmware)))
125
126define Download/coef
127  FILE:=$(COEF_FILE)
128  URL:=$(FW_URL)
129  MD5SUM:=$(COEF_MD5SUM)
130endef
131$(eval $(if $(COEF_DOWNLOAD),$(call Download,coef)))
132
133define Build/Configure
134        rm -rf \
135                $(PKG_BUILD_DIR)/coef \
136                $(PKG_BUILD_DIR)/firmware
137        mkdir -p \
138                $(PKG_BUILD_DIR)/coef \
139                $(PKG_BUILD_DIR)/firmware
140        $(TAR) -C $(PKG_BUILD_DIR)/firmware -xvzf $(DL_DIR)/$(FW_FILE)
141        $(TAR) -C $(PKG_BUILD_DIR)/coef -xvzf $(DL_DIR)/$(COEF_FILE)
142        (cd $(PKG_BUILD_DIR); aclocal && autoconf && automake)
143        $(call Build/Configure/Default)
144endef
145
146ifdef CONFIG_TARGET_lantiq
147  define Build/InstallDev
148        $(INSTALL_DIR) $(1)/usr/include
149        mkdir -p $(1)/usr/include/drv_vmmc
150        $(CP) -v --dereference $(PKG_BUILD_DIR)/include/* $(1)/usr/include/drv_vmmc
151        (cd $(1)/usr/include/drv_vmmc && ln -snf . include)
152  endef
153
154  define KernelPackage/ltq-vmmc/install
155        $(INSTALL_DIR) $(1)/etc/init.d $(1)/$(FW_DIR)
156        $(INSTALL_BIN) ./files/vmmc.init $(1)/etc/init.d/vmmc
157        $(CP) $(PKG_BUILD_DIR)/firmware/$(FW_SOURCE) $(1)/$(FW_DIR)/$(FW_TARGET)
158        $(CP) $(PKG_BUILD_DIR)/coef/$(COEF_SRC) $(1)/$(FW_DIR)/$(COEF_TARGET)
159  endef
160endif
161
162$(eval $(call KernelPackage,ltq-vmmc))
Note: See TracBrowser for help on using the repository browser.