aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb
blob: 4ed7b2028d2be6b443e91b0414d8894ec12ae163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
DESCRITOPN = "Digium Asterisk Hardware Driver Interface - Linux kernel part"
SECTION = "base"
HOMEPAGE = "http://www.asterisk.org"
LICENSE = "GPLv2"
RDEPENDS_${PN} = "kernel (${KERNEL_VERSION})"
DEPENDS = "virtual/kernel"
RRECOMMENDS_${PN} = "dahdi-firmware"

# those firmware images are normally downloaded as part of the 'make'
# process of dahdi-linux.  In the context of OE, we want to list them
# here so they are part of the 'downloads' directory and thus don't need
# to be downloaded all the time.
FIRMWARE_URI = " \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmadt032-1.07.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.11.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.8.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.17.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.18.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.19.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.20.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.22.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-oct6114-064-1.05.01.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-oct6114-128-1.05.01.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-tc400m-MR5.6.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-tc400m-MR6.12.tar.gz \
http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-vpmadt032-1.07.tar.gz\
	"

SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-${PV}.tar.gz "
SRC_URI =+ "${FIRMWARE_URI}"

INC_PR="r9"

LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a"

inherit module

do_configure() {
	# make sure the extracted firmware.bin are where Makefile expects
	mv ../dahdi-fw-*.bin ../zaptel-fw-*.bin drivers/dahdi/firmware/
	cp ${DL_DIR}/dahdi-fwload-*.tar.gz drivers/dahdi/firmware/
	cp ${DL_DIR}/zaptel-fw-*.tar.gz drivers/dahdi/firmware/
	cp ${DL_DIR}/dahdi-fw-*.tar.gz drivers/dahdi/firmware/

	# Enable the mirror for pcap..
        sed -i s,"\/\* #define CONFIG_DAHDI_MIRROR \*\/","#define CONFIG_DAHDI_MIRROR", ${S}/include/dahdi/dahdi_config.h
}

do_compile () {
	do_make_scripts
	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
	oe_runmake KSRC=${STAGING_KERNEL_DIR}   \
		   KVERS=${KERNEL_VERSION}    \
		   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
		   AR="${KERNEL_AR}" \
		   ${MAKE_TARGETS}
}

do_install () {
	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
	oe_runmake DEPMOD=echo DESTDIR="${D}" \
	           KSRC=${STAGING_KERNEL_DIR} \
		   KVERS=${KERNEL_VERSION}    \
	           CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
	           install
}

PACKAGES =+ "dahdi-firmware"

FILES_${PN} = "${base_libdir}/modules/ ${sysconfdir}/udev/rules.d"

FILES_dahdi-firmware = "${base_libdir}/firmware ${datadir}/dahdi"
PACKAGE_ARCH_dahdi-firmware = "all"