From 1464800759840509d5b2094b6b408575a6de59fb Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Wed, 30 Sep 2015 21:29:34 -0300 Subject: [PATCH 01/15] asterisk: Add recipe Asterisk is an Open Source PBX and telephony toolkit. Signed-off-by: Fabio Berton --- recipes-asterisk/asterisk/asterisk_13.5.0.bb | 155 ++++++++++++++++++ .../0001-Use-pkgconfig-to-find-sdl.patch | 26 +++ .../0002-Use-pkgconfig-to-find-libxml2.patch | 73 +++++++++ .../asterisk/files/asterisk.init.d | 150 +++++++++++++++++ 4 files changed, 404 insertions(+) create mode 100644 recipes-asterisk/asterisk/asterisk_13.5.0.bb create mode 100644 recipes-asterisk/asterisk/files/0001-Use-pkgconfig-to-find-sdl.patch create mode 100644 recipes-asterisk/asterisk/files/0002-Use-pkgconfig-to-find-libxml2.patch create mode 100644 recipes-asterisk/asterisk/files/asterisk.init.d diff --git a/recipes-asterisk/asterisk/asterisk_13.5.0.bb b/recipes-asterisk/asterisk/asterisk_13.5.0.bb new file mode 100644 index 0000000000..c912b3d1dd --- /dev/null +++ b/recipes-asterisk/asterisk/asterisk_13.5.0.bb @@ -0,0 +1,155 @@ +DESCRIPTION = "Asterisk is an Open Source PBX and telephony toolkit." +HOMEPAGE = "http://www.asterisk.org/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3aa955c628d43053f8ba9569d173105a" + +DEPENDS += "jansson sqlite3 libedit alsa-lib util-linux" + +SRC_URI = "\ + http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ + file://0001-Use-pkgconfig-to-find-sdl.patch \ + file://0002-Use-pkgconfig-to-find-libxml2.patch \ + file://asterisk.init.d \ +" + +SRC_URI[md5sum] = "2fb7d247aacdbb9736c82b133053dfdf" +SRC_URI[sha256sum] = "e8b8d071f783edea82de510194dd272070ffbb7cdb2f5f6b020be5d15b67e8b9" + +S = "${WORKDIR}/asterisk-${PV}" + +inherit autotools-brokensep pkgconfig useradd update-rc.d + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system -g asterisk --shell /bin/false asterisk" +GROUPADD_PARAM_${PN} = "--system asterisk" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)}" +# Optional features +PACKAGECONFIG[dev-mode] = "--enable-dev-mode,--disable-dev-mode" +PACKAGECONFIG[coverage] = "--enable-coverage,--disable-coverage" +PACKAGECONFIG[xmldoc] = "--enable-xmldoc,--disable-xmldoc" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile" +PACKAGECONFIG[internal-poll] = "--enable-internal-poll,--disable-internal-poll" +PACKAGECONFIG[asteriskssl] = "--enable-asteriskssl,--disable-asteriskssl,openssl" +PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath" +# Optional packages +PACKAGECONFIG[bfd] = "--with-bfd,--without-bfd" +PACKAGECONFIG[bluetooth] = "--with-bluetooth,--without-bluetooth,bluez5" +PACKAGECONFIG[backtrace] = "--with-execinfo,--without-execinfo" +PACKAGECONFIG[cap] = "--with-cap,--without-cap,libcap" +PACKAGECONFIG[corosync] = "--with-cpg,--without-cpg,corosync" +PACKAGECONFIG[curses] = "--with-curses,--without-curses,ncurses" +PACKAGECONFIG[crypt] = "--with-crypt,--without-crypt" +PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto" +PACKAGECONFIG[dahdi] = "--with-dahdi,--without-dahdi,dahdi-tools" +# To enable FFMPEG add LICENSE_FLAGS_WHITELIST = "commercial" to your local.conf +PACKAGECONFIG[ffmpeg] = "--with-avcodec,--without-avcodec,libav" +PACKAGECONFIG[gsm] = "--with-gsm,--without-gsm,libgsm" +PACKAGECONFIG[ilbc] = "--with-ilbc,--without-ilbc" +PACKAGECONFIG[gtk2] = "--with-gtk2,--without-gtk2,gtk+" +PACKAGECONFIG[gmime] = "--with-gmime,--without-gmime" +PACKAGECONFIG[openh323] = "--with-h323,--without-h323" +PACKAGECONFIG[hoard] = "--with-hoard,--without-hoard" +PACKAGECONFIG[ical] = "--with-ical,--without-ical" +PACKAGECONFIG[iconv] = "--with-iconv,--without-iconv,libiconv" +PACKAGECONFIG[iksemel] = "--with-iksemel,--without-iksemel,iksemel" +PACKAGECONFIG[imap_tk] = "--with-imap,--without-imap,uw-imap" +PACKAGECONFIG[inotify] = "--with-inotify,--without-inotify" +PACKAGECONFIG[iodbc] = "--with-iodbc,--without-iodbc" +PACKAGECONFIG[isdnnet] = "--with-isdnnet,--without-isdnnet" +# Jack depends on kqeueu +PACKAGECONFIG[jack] = "--with-jack,--without-jack,jack" +PACKAGECONFIG[uriparser] = "--with-uriparser,--without-uriparser" +PACKAGECONFIG[kqueue] = "--with-kqueue,--without-kqueue" +PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" +PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl" +PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2" +PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt" +PACKAGECONFIG[ltdl] = "--with-ltdl,--without-ltdl,libtool" +PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua" +PACKAGECONFIG[misdn] = "--with-misdn,--without-misdn,misdn-utils" +PACKAGECONFIG[mysqlclient] = "--with-mysqlclient,--without-mysqlclient,mariadb" +PACKAGECONFIG[nbs] = "--with-nbs,--without-nbs" +PACKAGECONFIG[ncurses] = "--with-curses,--without-curses,ncurses" +PACKAGECONFIG[neon] = "--with-neon,--without-neon,neon" +PACKAGECONFIG[netsnmp] = "--with-netsnmp,--without-netsnmp,net-snmp" +PACKAGECONFIG[newt] = "--with-newt,--without-newt,libnewt" +PACKAGECONFIG[ogg] = "--with-ogg,--without-ogg,libogg" +PACKAGECONFIG[openr2] = "--with-openr2,--without-openr2" +PACKAGECONFIG[opus] = "--with-opus,--without-opus,libopus" +PACKAGECONFIG[osptk] = "--with-osptk,--without-osptk" +PACKAGECONFIG[oss] = "--with-oss,--without-oss,alsa-oss" +PACKAGECONFIG[pgsql] = "--with-postgres,--without-postgres,postgresql" +PACKAGECONFIG[pjproject] = "--with-pjproject,--without-pjproject,pjproject" +PACKAGECONFIG[popt] = "--with-popt,--without-popt,popt" +PACKAGECONFIG[portaudio] = "--with-portaudio,--without-portaudio,portaudio-v19" +PACKAGECONFIG[pri] = "--with-pri,--without-pri,misdn-utils" +PACKAGECONFIG[pwlib] = "--with-pwlib,--without-pwlib,pwlib" +PACKAGECONFIG[radius] = "--with-radius,--without-radius,radiusclient-ng" +PACKAGECONFIG[resample] = "--with-resample,--without-resample,ncurses" +# Need to enable sdl_images to use sdl +PACKAGECONFIG[sdl] = "--with-sdl,--without-sdl,libsdl" +PACKAGECONFIG[sdl_image] = "--with-SDL_image,--without-SDL_image,libsdl-image" +PACKAGECONFIG[sounds-cache] = "--with-sounds-cache,--without-sounds-cache" +PACKAGECONFIG[spandsp] = "--with-spandsp,--without-spandsp" +PACKAGECONFIG[ss7] = "--with-ss7,--without-ss7" +PACKAGECONFIG[speex] = "--with-speex,--without-speex,speex" +PACKAGECONFIG[speexdsp] = "--with-speexdsp,--without-speexdsp,speexdsp" +PACKAGECONFIG[srtp] = "--with-srtp,--without-srtp" +PACKAGECONFIG[openssl] = "--with-ssl,--without-ssl,openssl" +PACKAGECONFIG[suppserv] = "--with-suppserv,--without-suppserv,misdn-utils" +PACKAGECONFIG[freetds] = "--with-tds,--without-tds" +PACKAGECONFIG[termcap] = "--with-termcap,--without-termcap,libcap" +PACKAGECONFIG[timerfd] = "--with-timerfd,--without-timerfd" +PACKAGECONFIG[tinfo] = "--with-tinfo,--without-tinfo,ncurses" +PACKAGECONFIG[tonezone] = "--with-tonezone,--without-tonezone" +PACKAGECONFIG[unixodbc] = "--with-unixodbc,--without-unixodbc,libodbc" +PACKAGECONFIG[vorbis] = "--with-vorbis,--without-vorbis,libvorbis" +PACKAGECONFIG[vpb] = "--with-vpb,--without-vpb" +PACKAGECONFIG[x11] = "--with-x11,--without-x11,libx11" +PACKAGECONFIG[zlib] = "--with-z,--without-z,zlib" + +EXTRA_OECONF += " \ + --with-libedit=${STAGING_INCDIR} \ +" + +INITSCRIPT_NAME = "asterisk" +INITSCRIPT_PARAMS = "defaults" + +do_configure_append() { + echo "Regenerate the configure scripts" + for d in ${S}/menuselect; do + echo " - $d" + (cd $d; autoreconf -I ${S}/autoconf) + done + + echo "Starting the build of menuselect" + cd ${B}/menuselect + CC="${HOST_CC}" \ + CXX="${HOST_CXX}" \ + LD="" \ + AR="" \ + RANLIB="" \ + CFLAGS="${HOST_CFLAGS}" \ + LDFLAGS="${HOST_LDFLAGS}" \ + ./configure +} + +do_install_append() { + oe_runmake DESTDIR=${D} samples + install -Dm 0755 ${WORKDIR}/asterisk.init.d ${D}${sysconfdir}/init.d/asterisk + # Set file permissions and ownerships + chown -R root:asterisk ${D}${sysconfdir}/asterisk + chmod -R u=rwX,g=rwX,o= ${D}${sysconfdir}/asterisk + for x in spool run lib log; do + chown -R asterisk:asterisk ${D}${localstatedir}/${x}/asterisk + chmod -R u=rwX,g=rwX,o= ${D}${localstatedir}/${x}/asterisk + done +} + +FILES_${PN} += "\ + /run/asterisk \ + ${datadir}/dahdi/* \ + ${libdir}/hotplug/firmware \ +" +FILES_${PN}-dbg += "${libdir}/*/*/.debug" diff --git a/recipes-asterisk/asterisk/files/0001-Use-pkgconfig-to-find-sdl.patch b/recipes-asterisk/asterisk/files/0001-Use-pkgconfig-to-find-sdl.patch new file mode 100644 index 0000000000..a0cc4b2510 --- /dev/null +++ b/recipes-asterisk/asterisk/files/0001-Use-pkgconfig-to-find-sdl.patch @@ -0,0 +1,26 @@ +Upstream-Status: Pending + +Subject: [PATCH 1/2] Use pkgconfig to find sdl +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 971f9bf..c371d19 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2427,7 +2427,7 @@ AC_SUBST(PBX_IXJUSER) + AST_C_DEFINE_CHECK([MSG_NOSIGNAL], [MSG_NOSIGNAL], [sys/socket.h]) + AST_C_DEFINE_CHECK([SO_NOSIGPIPE], [SO_NOSIGPIPE], [sys/socket.h]) + +-AST_EXT_TOOL_CHECK([SDL], [sdl-config]) ++AST_PKG_CONFIG_CHECK([SDL], [sdl]) + AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}]) + AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [${PTHREAD_LIBS} -lz -lm], [${PTHREAD_CFLAGS}]) + +-- +2.1.4 + diff --git a/recipes-asterisk/asterisk/files/0002-Use-pkgconfig-to-find-libxml2.patch b/recipes-asterisk/asterisk/files/0002-Use-pkgconfig-to-find-libxml2.patch new file mode 100644 index 0000000000..f5c8d260d9 --- /dev/null +++ b/recipes-asterisk/asterisk/files/0002-Use-pkgconfig-to-find-libxml2.patch @@ -0,0 +1,73 @@ +Upstream-Status: Pending + +Subject: [PATCH 2/2] Use pkgconfig to find libxml2 +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + configure.ac | 12 +----------- + menuselect/configure.ac | 11 +++-------- + 2 files changed, 4 insertions(+), 19 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c371d19..17f0d2d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -575,17 +575,6 @@ if test "x$JANSSON_LIB" == "x"; then + AC_MSG_ERROR([*** JSON support not found (this typically means the libjansson development package is missing)]) + fi + +-AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , , +- [#include +- #include ], +- [LIBXML_TEST_VERSION]) +- +-if test "${PBX_LIBXML2}" != 1; then +- AC_MSG_NOTICE(*** The Asterisk menuselect tool requires the 'libxml2' development package.) +- AC_MSG_NOTICE(*** Please install the 'libxml2' development package.) +- exit 1 +-fi +- + AST_EXT_LIB_CHECK([URIPARSER], [uriparser], [uriParseUriA], [uriparser/Uri.h]) + + # Another mandatory item (unless it's explicitly disabled) +@@ -1280,6 +1269,7 @@ PKG_PROG_PKG_CONFIG() + + + # do the package library checks now ++AST_PKG_CONFIG_CHECK([LIBXML2], [libxml-2.0]) + + AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl]) + +diff --git a/menuselect/configure.ac b/menuselect/configure.ac +index 5989f5c..675113b 100644 +--- a/menuselect/configure.ac ++++ b/menuselect/configure.ac +@@ -125,14 +125,6 @@ AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2]) + AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h]) + AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h]) + AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h]) +-AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , , +- [#include +- #include ], +- [LIBXML_TEST_VERSION]) +- +-if test "${PBX_LIBXML2}" != 1; then +- AC_MSG_ERROR([Could not find required 'Libxml2' development package]) +-fi + + PBX_GTK2=0 + AC_CHECK_TOOL(PKGCONFIG, pkg-config, No) +@@ -146,6 +138,9 @@ AC_SUBST(PBX_GTK2) + AC_SUBST(GTK2_INCLUDE) + AC_SUBST(GTK2_LIB) + ++PKG_PROG_PKG_CONFIG() ++AST_PKG_CONFIG_CHECK([LIBXML2], [libxml-2.0]) ++ + test "$silent"=yes && ac_sub_configure_args="${ac_sub_configure_args} --silent" + + AC_CONFIG_FILES([makeopts]) +-- +2.1.4 + diff --git a/recipes-asterisk/asterisk/files/asterisk.init.d b/recipes-asterisk/asterisk/files/asterisk.init.d new file mode 100644 index 0000000000..631ce1d808 --- /dev/null +++ b/recipes-asterisk/asterisk/files/asterisk.init.d @@ -0,0 +1,150 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: asterisk +# Required-Start: $network $syslog $named $local_fs $remote_fs +# Required-Stop: $network $syslog $named $local_fs $remote_fs +# Should-Start: dahdi misdn lcr wanrouter mysql postgresql +# Should-Stop: dahdi misdn lcr wanrouter mysql postgresql +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Asterisk PBX +# Description: Asterisk Open Source PBX +### END INIT INFO + +# Do NOT "set -e" + +log_daemon_msg() { + echo $* +} + +log_end_msg() { + if [ $1 -eq 0 ]; then + success $* + else + failure $* + fi +} + +log_failure_msg() { + echo $* +} + +log_success_msg() { + echo $* +} + + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Asterisk PBX" +NAME=asterisk +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +CHROOT=/var/run/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# LSB log_* functions +. /etc/init.d/functions + +do_start() +{ + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 +} + +do_stop() +{ + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + rm -f $PIDFILE + return "$RETVAL" +} + +do_reload() { + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +# +# Function that shows the daemon/service status +# +status_of_proc () { + local pid status + + status=0 + # pidof output null when no program is running, so no "2>/dev/null". + pid=`pidofproc $NAME` || status=$? + case $status in + 0) + echo "$DESC is running ($pid)." + exit 0 + ;; + *) + echo "$DESC is not running." >&2 + exit $status + ;; + esac +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + reload) + log_daemon_msg "Reloading $DESC" "$NAME" + do_reload + log_end_msg $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + status) + status_of_proc $DAEMON $NAME -p $PIDFILE && exit 0 || exit $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 + exit 3 + ;; +esac + +: + From f6234c4d326ec622456ddbc55c6d57e53e87da6c Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Mon, 26 Oct 2015 13:12:01 -0200 Subject: [PATCH 02/15] libgsm: Drop libgsm.inc Move all code to bb file. Signed-off-by: Fabio Berton --- recipes-isdn/libgsm/libgsm.inc | 34 ---------------------------- recipes-isdn/libgsm/libgsm_1.0.13.bb | 34 ++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 36 deletions(-) delete mode 100644 recipes-isdn/libgsm/libgsm.inc diff --git a/recipes-isdn/libgsm/libgsm.inc b/recipes-isdn/libgsm/libgsm.inc deleted file mode 100644 index aa0386c31c..0000000000 --- a/recipes-isdn/libgsm/libgsm.inc +++ /dev/null @@ -1,34 +0,0 @@ -DESCRIPTION = "GSM Audio Library" -SECTION = "libs" -PRIORITY = "optional" -LICENSE = "libgsm" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc1372895b173aaf543a122db37e04f5" - -INC_PR = "r2" - -SRC_URI = "http://www.quut.com/gsm/gsm-${PV}.tar.gz \ - file://01_makefile.patch \ - file://02_cplusplus.patch \ - file://03_config.patch \ - file://04_includes.patch \ - file://05_compiler_warnings.patch \ - " - -CFLAGS += "-c -g -fPIC -Wall -D_GNU_SOURCE -D_REENTRANT -DNeedFunctionPrototypes=1 -DWAV49 -I./inc" - -PARALLEL_MAKE = "" - -do_compile() { - unset LD - oe_runmake CCFLAGS="${CFLAGS}" -} - -do_install() { - oe_libinstall -a -C lib libgsm ${D}${libdir} - oe_libinstall -so -C lib libgsm ${D}${libdir} - install -d ${D}${includedir}/gsm - install -m 0644 ${S}/inc/gsm.h ${D}${includedir}/gsm/ - cd ${D}${includedir} - ln -s gsm/gsm.h gsm.h -} - diff --git a/recipes-isdn/libgsm/libgsm_1.0.13.bb b/recipes-isdn/libgsm/libgsm_1.0.13.bb index e6bf9baf60..38e7e1134e 100644 --- a/recipes-isdn/libgsm/libgsm_1.0.13.bb +++ b/recipes-isdn/libgsm/libgsm_1.0.13.bb @@ -1,8 +1,38 @@ -require libgsm.inc +DESCRIPTION = "GSM Audio Library" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "libgsm" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc1372895b173aaf543a122db37e04f5" -PR = "${INC_PR}.0" +INC_PR = "r2" + +SRC_URI = "http://www.quut.com/gsm/gsm-${PV}.tar.gz \ + file://01_makefile.patch \ + file://02_cplusplus.patch \ + file://03_config.patch \ + file://04_includes.patch \ + file://05_compiler_warnings.patch \ + " S = "${WORKDIR}/gsm-1.0-pl13/" SRC_URI[md5sum] = "c1ba392ce61dc4aff1c29ea4e92f6df4" SRC_URI[sha256sum] = "52c518244d428c2e56c543b98c9135f4a76ff780c32455580b793f60a0a092ad" + +CFLAGS += "-c -g -fPIC -Wall -D_GNU_SOURCE -D_REENTRANT -DNeedFunctionPrototypes=1 -DWAV49 -I./inc" + +PARALLEL_MAKE = "" + +do_compile() { + unset LD + oe_runmake CCFLAGS="${CFLAGS}" +} + +do_install() { + oe_libinstall -a -C lib libgsm ${D}${libdir} + oe_libinstall -so -C lib libgsm ${D}${libdir} + install -d ${D}${includedir}/gsm + install -m 0644 ${S}/inc/gsm.h ${D}${includedir}/gsm/ + cd ${D}${includedir} + ln -s gsm/gsm.h gsm.h +} From ee5e6c4c53d553b4ccd8a58bc0f6662aba68e41b Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Mon, 26 Oct 2015 13:17:41 -0200 Subject: [PATCH 03/15] libgsm: Organize recipe Fix indentations and style issues. Signed-off-by: Fabio Berton --- recipes-isdn/libgsm/libgsm_1.0.13.bb | 37 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/recipes-isdn/libgsm/libgsm_1.0.13.bb b/recipes-isdn/libgsm/libgsm_1.0.13.bb index 38e7e1134e..fb16037f06 100644 --- a/recipes-isdn/libgsm/libgsm_1.0.13.bb +++ b/recipes-isdn/libgsm/libgsm_1.0.13.bb @@ -4,15 +4,14 @@ PRIORITY = "optional" LICENSE = "libgsm" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc1372895b173aaf543a122db37e04f5" -INC_PR = "r2" - -SRC_URI = "http://www.quut.com/gsm/gsm-${PV}.tar.gz \ - file://01_makefile.patch \ - file://02_cplusplus.patch \ - file://03_config.patch \ - file://04_includes.patch \ - file://05_compiler_warnings.patch \ - " +SRC_URI = "\ + http://www.quut.com/gsm/gsm-${PV}.tar.gz \ + file://01_makefile.patch \ + file://02_cplusplus.patch \ + file://03_config.patch \ + file://04_includes.patch \ + file://05_compiler_warnings.patch \ +" S = "${WORKDIR}/gsm-1.0-pl13/" @@ -23,16 +22,16 @@ CFLAGS += "-c -g -fPIC -Wall -D_GNU_SOURCE -D_REENTRANT -DNeedFunctionPrototypes PARALLEL_MAKE = "" -do_compile() { - unset LD - oe_runmake CCFLAGS="${CFLAGS}" +do_compile(){ + unset LD + oe_runmake CCFLAGS="${CFLAGS}" } -do_install() { - oe_libinstall -a -C lib libgsm ${D}${libdir} - oe_libinstall -so -C lib libgsm ${D}${libdir} - install -d ${D}${includedir}/gsm - install -m 0644 ${S}/inc/gsm.h ${D}${includedir}/gsm/ - cd ${D}${includedir} - ln -s gsm/gsm.h gsm.h +do_install(){ + oe_libinstall -a -C lib libgsm ${D}${libdir} + oe_libinstall -so -C lib libgsm ${D}${libdir} + install -d ${D}${includedir}/gsm + install -m 0644 ${S}/inc/gsm.h ${D}${includedir}/gsm/ + cd ${D}${includedir} + ln -s gsm/gsm.h gsm.h } From efa5849c453ec48dd27631b624573fbf1bb5d06b Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Mon, 26 Oct 2015 13:22:07 -0200 Subject: [PATCH 04/15] libgsm: Update to version 1.0.14 Signed-off-by: Fabio Berton --- .../0001-Configure-Makefile.patch} | 34 +++++--- .../libgsm/files/0002-Add-defines-to-c.patch | 39 +++++++++ ..._config.-header-instead-of-config.h.patch} | 84 +++++++++++++------ .../libgsm/files/0004-Add-includes.patch | 41 +++++++++ .../0005-Change-compiler-warnings.patch} | 46 ++++++---- .../libgsm/libgsm-1.0.13/02_cplusplus.patch | 25 ------ .../libgsm/libgsm-1.0.13/04_includes.patch | 43 ---------- .../{libgsm_1.0.13.bb => libgsm_1.0.14.bb} | 18 ++-- 8 files changed, 202 insertions(+), 128 deletions(-) rename recipes-isdn/libgsm/{libgsm-1.0.13/01_makefile.patch => files/0001-Configure-Makefile.patch} (67%) create mode 100644 recipes-isdn/libgsm/files/0002-Add-defines-to-c.patch rename recipes-isdn/libgsm/{libgsm-1.0.13/03_config.patch => files/0003-Use-gsm_config.-header-instead-of-config.h.patch} (70%) create mode 100644 recipes-isdn/libgsm/files/0004-Add-includes.patch rename recipes-isdn/libgsm/{libgsm-1.0.13/05_compiler_warnings.patch => files/0005-Change-compiler-warnings.patch} (64%) delete mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch delete mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch rename recipes-isdn/libgsm/{libgsm_1.0.13.bb => libgsm_1.0.14.bb} (60%) diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch b/recipes-isdn/libgsm/files/0001-Configure-Makefile.patch similarity index 67% rename from recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch rename to recipes-isdn/libgsm/files/0001-Configure-Makefile.patch index 947db37bfc..60aa78d660 100644 --- a/recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch +++ b/recipes-isdn/libgsm/files/0001-Configure-Makefile.patch @@ -1,7 +1,18 @@ -diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile ---- libgsm-1.0.12~/Makefile 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.12/Makefile 2007-11-01 15:43:06.000000000 +0100 -@@ -96,7 +96,7 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 1/5] Configure Makefile +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + Makefile | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index cfab74f..410d3f6 100644 +--- a/Makefile ++++ b/Makefile +@@ -96,7 +96,7 @@ TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1 # Other tools SHELL = /bin/sh @@ -10,15 +21,15 @@ diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile BASENAME = basename AR = ar ARFLAGS = cr -@@ -140,6 +140,7 @@ +@@ -140,6 +140,7 @@ LFLAGS = $(LDFLAGS) $(LDINC) # Targets LIBGSM = $(LIB)/libgsm.a -+LIBGSMSO= $(LIB)/libgsm.so ++LIBGSMSO = $(LIB)/libgsm.so TOAST = $(BIN)/toast UNTOAST = $(BIN)/untoast -@@ -279,7 +280,7 @@ +@@ -279,7 +280,7 @@ TOAST_INSTALL_TARGETS = \ # Target rules @@ -27,7 +38,7 @@ diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile @-echo $(ROOT): Done. tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result -@@ -299,6 +300,11 @@ +@@ -299,6 +300,11 @@ install: toastinstall gsminstall # The basic API: libgsm @@ -39,7 +50,7 @@ diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile $(LIBGSM): $(LIB) $(GSM_OBJECTS) -rm $(RMFLAGS) $(LIBGSM) $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS) -@@ -308,15 +314,15 @@ +@@ -308,15 +314,15 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS) # Toast, Untoast and Tcat -- the compress-like frontends to gsm. $(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) @@ -58,7 +69,7 @@ diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile # The local bin and lib directories -@@ -426,7 +432,9 @@ +@@ -426,7 +432,9 @@ semi-clean: clean: semi-clean -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \ @@ -69,3 +80,6 @@ diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile $(ROOT)/gsm-1.0.tar.Z +-- +2.1.4 + diff --git a/recipes-isdn/libgsm/files/0002-Add-defines-to-c.patch b/recipes-isdn/libgsm/files/0002-Add-defines-to-c.patch new file mode 100644 index 0000000000..70f34f2a59 --- /dev/null +++ b/recipes-isdn/libgsm/files/0002-Add-defines-to-c.patch @@ -0,0 +1,39 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 2/5] Add defines to c++ +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + inc/gsm.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/inc/gsm.h b/inc/gsm.h +index 4714ab6..eb2d5e7 100644 +--- a/inc/gsm.h ++++ b/inc/gsm.h +@@ -54,6 +54,10 @@ typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */ + #define GSM_OPT_FRAME_INDEX 5 + #define GSM_OPT_FRAME_CHAIN 6 + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + extern gsm gsm_create GSM_P((void)); + extern void gsm_destroy GSM_P((gsm)); + +@@ -66,6 +70,10 @@ extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *)); + extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *)); + extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *)); + ++#ifdef __cplusplus ++} ++#endif ++ + #undef GSM_P + + #endif /* GSM_H */ +-- +2.1.4 + diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch b/recipes-isdn/libgsm/files/0003-Use-gsm_config.-header-instead-of-config.h.patch similarity index 70% rename from recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch rename to recipes-isdn/libgsm/files/0003-Use-gsm_config.-header-instead-of-config.h.patch index dad241e2bd..675512456a 100644 --- a/recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch +++ b/recipes-isdn/libgsm/files/0003-Use-gsm_config.-header-instead-of-config.h.patch @@ -1,7 +1,27 @@ -diff -urNad libgsm-1.0.10~/Makefile libgsm-1.0.10/Makefile ---- libgsm-1.0.10~/Makefile 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/Makefile 2007-11-01 15:48:02.000000000 +0100 -@@ -151,7 +151,7 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 3/5] Use gsm_config. header instead of config.h +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + Makefile | 2 +- + inc/config.h | 37 ------------------------------------- + inc/gsm_config.h | 37 +++++++++++++++++++++++++++++++++++++ + inc/toast.h | 2 +- + src/code.c | 2 +- + src/gsm_create.c | 2 +- + src/gsm_destroy.c | 2 +- + tls/taste.c | 2 +- + 8 files changed, 43 insertions(+), 43 deletions(-) + delete mode 100644 inc/config.h + create mode 100644 inc/gsm_config.h + +diff --git a/Makefile b/Makefile +index 410d3f6..c8c5b58 100644 +--- a/Makefile ++++ b/Makefile +@@ -152,7 +152,7 @@ GSM_HEADERS = $(INC)/gsm.h HEADERS = $(INC)/proto.h \ $(INC)/unproto.h \ @@ -10,9 +30,11 @@ diff -urNad libgsm-1.0.10~/Makefile libgsm-1.0.10/Makefile $(INC)/private.h \ $(INC)/gsm.h \ $(INC)/toast.h \ -diff -urNad libgsm-1.0.10~/inc/config.h libgsm-1.0.10/inc/config.h ---- libgsm-1.0.10~/inc/config.h 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/inc/config.h 1970-01-01 01:00:00.000000000 +0100 +diff --git a/inc/config.h b/inc/config.h +deleted file mode 100644 +index dfb1ead..0000000 +--- a/inc/config.h ++++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische @@ -51,9 +73,11 @@ diff -urNad libgsm-1.0.10~/inc/config.h libgsm-1.0.10/inc/config.h -/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */ - -#endif /* CONFIG_H */ -diff -urNad libgsm-1.0.10~/inc/gsm_config.h libgsm-1.0.10/inc/gsm_config.h ---- libgsm-1.0.10~/inc/gsm_config.h 1970-01-01 01:00:00.000000000 +0100 -+++ libgsm-1.0.10/inc/gsm_config.h 2007-11-01 15:46:19.000000000 +0100 +diff --git a/inc/gsm_config.h b/inc/gsm_config.h +new file mode 100644 +index 0000000..28cee6d +--- /dev/null ++++ b/inc/gsm_config.h @@ -0,0 +1,37 @@ +/* + * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische @@ -92,9 +116,10 @@ diff -urNad libgsm-1.0.10~/inc/gsm_config.h libgsm-1.0.10/inc/gsm_config.h +/*efine HAS_UTIMEUSEC 1 -* microseconds in utimbuf? */ + +#endif /* CONFIG_H */ -diff -urNad libgsm-1.0.10~/inc/toast.h libgsm-1.0.10/inc/toast.h ---- libgsm-1.0.10~/inc/toast.h 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/inc/toast.h 2007-11-01 15:48:17.000000000 +0100 +diff --git a/inc/toast.h b/inc/toast.h +index b42d9ae..911769d 100644 +--- a/inc/toast.h ++++ b/inc/toast.h @@ -9,7 +9,7 @@ #ifndef TOAST_H #define TOAST_H /* Guard against multiple includes */ @@ -104,9 +129,10 @@ diff -urNad libgsm-1.0.10~/inc/toast.h libgsm-1.0.10/inc/toast.h #include #include -diff -urNad libgsm-1.0.10~/src/code.c libgsm-1.0.10/src/code.c ---- libgsm-1.0.10~/src/code.c 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/src/code.c 2007-11-01 15:48:34.000000000 +0100 +diff --git a/src/code.c b/src/code.c +index 402f614..5222727 100644 +--- a/src/code.c ++++ b/src/code.c @@ -6,7 +6,7 @@ /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/code.c,v 1.3 1996/07/02 09:59:05 jutta Exp $ */ @@ -115,10 +141,11 @@ diff -urNad libgsm-1.0.10~/src/code.c libgsm-1.0.10/src/code.c +#include "gsm_config.h" - #ifdef HAS_STDLIB_H -diff -urNad libgsm-1.0.10~/src/gsm_create.c libgsm-1.0.10/src/gsm_create.c ---- libgsm-1.0.10~/src/gsm_create.c 1996-07-02 16:32:44.000000000 +0200 -+++ libgsm-1.0.10/src/gsm_create.c 2007-11-01 15:48:48.000000000 +0100 + #ifdef HAS_STRING_H +diff --git a/src/gsm_create.c b/src/gsm_create.c +index a0bf634..9cc2670 100644 +--- a/src/gsm_create.c ++++ b/src/gsm_create.c @@ -6,7 +6,7 @@ static char const ident[] = "$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_create.c,v 1.4 1996/07/02 09:59:05 jutta Exp $"; @@ -128,9 +155,10 @@ diff -urNad libgsm-1.0.10~/src/gsm_create.c libgsm-1.0.10/src/gsm_create.c #ifdef HAS_STRING_H #include -diff -urNad libgsm-1.0.10~/src/gsm_destroy.c libgsm-1.0.10/src/gsm_destroy.c ---- libgsm-1.0.10~/src/gsm_destroy.c 1996-07-02 16:32:39.000000000 +0200 -+++ libgsm-1.0.10/src/gsm_destroy.c 2007-11-01 15:48:57.000000000 +0100 +diff --git a/src/gsm_destroy.c b/src/gsm_destroy.c +index 03c8659..274dc4c 100644 +--- a/src/gsm_destroy.c ++++ b/src/gsm_destroy.c @@ -7,7 +7,7 @@ /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_destroy.c,v 1.3 1994/11/28 19:52:25 jutta Exp $ */ @@ -140,9 +168,10 @@ diff -urNad libgsm-1.0.10~/src/gsm_destroy.c libgsm-1.0.10/src/gsm_destroy.c #include "proto.h" #ifdef HAS_STDLIB_H -diff -urNad libgsm-1.0.10~/tls/taste.c libgsm-1.0.10/tls/taste.c ---- libgsm-1.0.10~/tls/taste.c 1996-07-02 16:33:05.000000000 +0200 -+++ libgsm-1.0.10/tls/taste.c 2007-11-01 15:49:54.000000000 +0100 +diff --git a/tls/taste.c b/tls/taste.c +index 4bc84ad..56d1a93 100644 +--- a/tls/taste.c ++++ b/tls/taste.c @@ -10,7 +10,7 @@ #include #include @@ -152,3 +181,6 @@ diff -urNad libgsm-1.0.10~/tls/taste.c libgsm-1.0.10/tls/taste.c #ifdef HAS_STDLIB_H # include +-- +2.1.4 + diff --git a/recipes-isdn/libgsm/files/0004-Add-includes.patch b/recipes-isdn/libgsm/files/0004-Add-includes.patch new file mode 100644 index 0000000000..efb113358e --- /dev/null +++ b/recipes-isdn/libgsm/files/0004-Add-includes.patch @@ -0,0 +1,41 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 4/5] Add includes +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + inc/toast.h | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/inc/toast.h b/inc/toast.h +index 911769d..3e710d0 100644 +--- a/inc/toast.h ++++ b/inc/toast.h +@@ -16,10 +16,11 @@ + + #include + #include ++#include + #include + + #include +-#ifndef HAS_ERRNO_DECL ++#ifndef errno + extern int errno; + #endif + +@@ -37,6 +38,10 @@ + # endif + #endif + ++#ifdef HAS_STDIO_H ++# include ++#endif ++ + #include "gsm.h" + + #ifndef S_ISREG +-- +2.1.4 + diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch b/recipes-isdn/libgsm/files/0005-Change-compiler-warnings.patch similarity index 64% rename from recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch rename to recipes-isdn/libgsm/files/0005-Change-compiler-warnings.patch index c40100c922..126d4ff5a0 100644 --- a/recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch +++ b/recipes-isdn/libgsm/files/0005-Change-compiler-warnings.patch @@ -1,7 +1,19 @@ -diff -urNad libgsm-1.0.10~/src/debug.c libgsm-1.0.10/src/debug.c ---- libgsm-1.0.10~/src/debug.c 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/src/debug.c 2007-11-01 15:53:42.000000000 +0100 -@@ -49,7 +49,7 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 5/5] Change compiler warnings +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + src/debug.c | 6 +++--- + src/toast.c | 17 +++++++---------- + 2 files changed, 10 insertions(+), 13 deletions(-) + +diff --git a/src/debug.c b/src/debug.c +index 04c3907..a2a5136 100644 +--- a/src/debug.c ++++ b/src/debug.c +@@ -49,7 +49,7 @@ void gsm_debug_longwords P4( (name, from, to, ptr), fprintf( stderr, "%s [%d .. %d]: ", name, from, to ); while (from <= to) { @@ -10,7 +22,7 @@ diff -urNad libgsm-1.0.10~/src/debug.c libgsm-1.0.10/src/debug.c from++; if (nprinted++ >= 7) { nprinted = 0; -@@ -63,14 +63,14 @@ +@@ -63,14 +63,14 @@ void gsm_debug_longword P2( (name, value), char * name, longword value ) { @@ -27,10 +39,11 @@ diff -urNad libgsm-1.0.10~/src/debug.c libgsm-1.0.10/src/debug.c } #endif -diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c ---- libgsm-1.0.10~/src/toast.c 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/src/toast.c 2007-11-01 15:53:42.000000000 +0100 -@@ -251,8 +251,8 @@ +diff --git a/src/toast.c b/src/toast.c +index 9823642..55606d7 100644 +--- a/src/toast.c ++++ b/src/toast.c +@@ -251,8 +251,8 @@ static char * emalloc P1((len), size_t len) { char * s; if (!(s = malloc(len))) { @@ -41,7 +54,7 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c onintr(); exit(1); } -@@ -270,7 +270,7 @@ +@@ -270,7 +270,7 @@ static char* normalname P3((name, want, cut), char *name, char *want,char *cut) maxlen = strlen(name) + 1 + strlen(want) + strlen(cut); p = strcpy(emalloc(maxlen), name); @@ -50,7 +63,7 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c else if (*want && !suffix(p, want)) strcat(p, want); return p; -@@ -386,7 +386,7 @@ +@@ -386,7 +386,7 @@ static void update_times P0() ut[0] = instat.st_atime; ut[1] = instat.st_mtime; @@ -59,7 +72,7 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c #endif /* UTIMBUF */ } -@@ -416,7 +416,7 @@ +@@ -416,7 +416,7 @@ static int okay_as_input P3((name,f,st), char* name, FILE* f, struct stat * st) } if (st->st_nlink > 1 && !f_cat && !f_precious) { fprintf(stderr, @@ -68,7 +81,7 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2)); return 0; } -@@ -585,8 +585,8 @@ +@@ -585,8 +585,8 @@ static int process_decode P0() if (cc != sizeof(s)) { if (cc >= 0) fprintf(stderr, @@ -79,7 +92,7 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c "s" + (sizeof(s) - cc == 1), inname ? inname : "stdin" ); gsm_destroy(r); -@@ -624,8 +624,6 @@ +@@ -624,8 +624,6 @@ static int process_decode P0() static int process P1((name), char * name) { @@ -88,7 +101,7 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c out = (FILE *)0; in = (FILE *)0; -@@ -779,7 +777,6 @@ +@@ -779,7 +777,6 @@ int main P2((ac, av), int ac, char **av) case 'h': help(); exit(0); default: @@ -96,3 +109,6 @@ diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c fprintf(stderr, "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n", progname); +-- +2.1.4 + diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch b/recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch deleted file mode 100644 index a4bbb40674..0000000000 --- a/recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -urNad libgsm-1.0.10~/inc/gsm.h libgsm-1.0.10/inc/gsm.h ---- libgsm-1.0.10~/inc/gsm.h 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/inc/gsm.h 2007-11-01 15:44:52.000000000 +0100 -@@ -54,6 +54,10 @@ - #define GSM_OPT_FRAME_INDEX 5 - #define GSM_OPT_FRAME_CHAIN 6 - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - extern gsm gsm_create GSM_P((void)); - extern void gsm_destroy GSM_P((gsm)); - -@@ -66,6 +70,10 @@ - extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *)); - extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *)); - -+#ifdef __cplusplus -+} -+#endif -+ - #undef GSM_P - - #endif /* GSM_H */ diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch b/recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch deleted file mode 100644 index 2769b40b05..0000000000 --- a/recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -urNad libgsm-1.0.10~/inc/toast.h libgsm-1.0.10/inc/toast.h ---- libgsm-1.0.10~/inc/toast.h 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/inc/toast.h 2007-11-01 15:52:33.000000000 +0100 -@@ -16,11 +16,12 @@ - - #include - #include -+#include - #include - - #include --#ifndef HAS_ERRNO_DECL -- extern int errno; -+#ifndef errno -+ extern int errno; - #endif - - #ifdef HAS_LIMITS_H -@@ -37,6 +38,10 @@ - # endif - #endif - -+#ifdef HAS_STDIO_H -+# include -+#endif -+ - #include "gsm.h" - - #ifndef S_ISREG -diff -urNad libgsm-1.0.10~/src/code.c libgsm-1.0.10/src/code.c ---- libgsm-1.0.10~/src/code.c 2007-11-01 15:37:52.000000000 +0100 -+++ libgsm-1.0.10/src/code.c 2007-11-01 15:52:33.000000000 +0100 -@@ -9,8 +9,8 @@ - #include "config.h" - - --#ifdef HAS_STDLIB_H --#include -+#ifdef HAS_STRING_H -+#include - #else - # include "proto.h" - extern char * memcpy P((char *, char *, int)); diff --git a/recipes-isdn/libgsm/libgsm_1.0.13.bb b/recipes-isdn/libgsm/libgsm_1.0.14.bb similarity index 60% rename from recipes-isdn/libgsm/libgsm_1.0.13.bb rename to recipes-isdn/libgsm/libgsm_1.0.14.bb index fb16037f06..8d90ffcc89 100644 --- a/recipes-isdn/libgsm/libgsm_1.0.13.bb +++ b/recipes-isdn/libgsm/libgsm_1.0.14.bb @@ -1,22 +1,22 @@ DESCRIPTION = "GSM Audio Library" SECTION = "libs" PRIORITY = "optional" -LICENSE = "libgsm" +LICENSE = "ISC" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc1372895b173aaf543a122db37e04f5" SRC_URI = "\ http://www.quut.com/gsm/gsm-${PV}.tar.gz \ - file://01_makefile.patch \ - file://02_cplusplus.patch \ - file://03_config.patch \ - file://04_includes.patch \ - file://05_compiler_warnings.patch \ + file://0001-Configure-Makefile.patch \ + file://0002-Add-defines-to-c.patch \ + file://0003-Use-gsm_config.-header-instead-of-config.h.patch \ + file://0004-Add-includes.patch \ + file://0005-Change-compiler-warnings.patch \ " -S = "${WORKDIR}/gsm-1.0-pl13/" +SRC_URI[md5sum] = "4cbb4e7b73842de3d12d30b0d74200d4" +SRC_URI[sha256sum] = "5814a16a30b3c026871b3739812dc4a2a84299331182c987da1c212c93e9352c" -SRC_URI[md5sum] = "c1ba392ce61dc4aff1c29ea4e92f6df4" -SRC_URI[sha256sum] = "52c518244d428c2e56c543b98c9135f4a76ff780c32455580b793f60a0a092ad" +S = "${WORKDIR}/gsm-1.0-pl14/" CFLAGS += "-c -g -fPIC -Wall -D_GNU_SOURCE -D_REENTRANT -DNeedFunctionPrototypes=1 -DWAV49 -I./inc" From 4a63c7c73eb8073a69cdf078b6c5ddf97887e66b Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:17:20 -0300 Subject: [PATCH 05/15] misdn-utils: Organize recipe Fix indentations and style issues. Signed-off-by: Fabio Berton --- recipes-isdn/misdn/misdn-utils_git.bb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/recipes-isdn/misdn/misdn-utils_git.bb b/recipes-isdn/misdn/misdn-utils_git.bb index 261bbed442..9e08090120 100644 --- a/recipes-isdn/misdn/misdn-utils_git.bb +++ b/recipes-isdn/misdn/misdn-utils_git.bb @@ -2,17 +2,20 @@ DESCRITOPN = "mISDNutils userspace library" HOMEPAGE = "http://misdn.org" LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605" -PR = "r4" -SRC_URI = "git://git.misdn.eu/mISDNuser.git \ - file://misdn-ph-size.diff" +SRC_URI = "\ + git://git.misdn.eu/mISDNuser.git \ + file://misdn-ph-size.diff \ +" + SRCREV = "fd246f6bbbf2f4692f507018bcd1a526fab16499" S = "${WORKDIR}/git" -PACKAGES =+ "misdn-tools-dbg misdn-tools" - inherit autotools +PACKAGES =+ "misdn-tools-dbg misdn-tools" + FILES_misdn-tools = "${bindir} ${sbindir}" FILES_misdn-tools-dbg = "${bindir}/.debug ${sbindir}/.debug" + RDEPENDS_misdn-tools-dbg = "${PN}-dbg" From a354c4242e5734c3b12968ed8bf8033cf73fa343 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:21:48 -0300 Subject: [PATCH 06/15] misdn-utils: Update to version 2.0.19 Signed-off-by: Fabio Berton --- .../misdn/files/0001-mbuffer-data-size.patch | 26 +++++++++++++++++++ recipes-isdn/misdn/files/misdn-ph-size.diff | 13 ---------- recipes-isdn/misdn/misdn-utils_git.bb | 7 ++--- 3 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 recipes-isdn/misdn/files/0001-mbuffer-data-size.patch delete mode 100644 recipes-isdn/misdn/files/misdn-ph-size.diff diff --git a/recipes-isdn/misdn/files/0001-mbuffer-data-size.patch b/recipes-isdn/misdn/files/0001-mbuffer-data-size.patch new file mode 100644 index 0000000000..1160fe4a0b --- /dev/null +++ b/recipes-isdn/misdn/files/0001-mbuffer-data-size.patch @@ -0,0 +1,26 @@ +Upstream-Status: Pending + +Subject: [PATCH] mbuffer data size +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + include/mISDN/mbuffer.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/mISDN/mbuffer.h b/include/mISDN/mbuffer.h +index 96afa5e..fe1a1e9 100644 +--- a/include/mISDN/mbuffer.h ++++ b/include/mISDN/mbuffer.h +@@ -72,7 +72,7 @@ struct mbuffer { + #endif + } __attribute__((__may_alias__)); + +-#define MBUFFER_DATA_SIZE 280 ++#define MBUFFER_DATA_SIZE 400 + + /* + * init mbuffer caching +-- +2.1.4 + diff --git a/recipes-isdn/misdn/files/misdn-ph-size.diff b/recipes-isdn/misdn/files/misdn-ph-size.diff deleted file mode 100644 index 98bf866d26..0000000000 --- a/recipes-isdn/misdn/files/misdn-ph-size.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/mISDN/mbuffer.h b/include/mISDN/mbuffer.h -index 5e3dc96..8e6ed52 100644 ---- a/include/mISDN/mbuffer.h -+++ b/include/mISDN/mbuffer.h -@@ -54,7 +54,7 @@ struct mbuffer { - struct l3_msg l3; - } __attribute__((__may_alias__)); - --#define MBUFFER_DATA_SIZE 280 -+#define MBUFFER_DATA_SIZE 400 - - /* - * init mbuffer caching diff --git a/recipes-isdn/misdn/misdn-utils_git.bb b/recipes-isdn/misdn/misdn-utils_git.bb index 9e08090120..1d9f0f2ecc 100644 --- a/recipes-isdn/misdn/misdn-utils_git.bb +++ b/recipes-isdn/misdn/misdn-utils_git.bb @@ -4,11 +4,12 @@ LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605" SRC_URI = "\ - git://git.misdn.eu/mISDNuser.git \ - file://misdn-ph-size.diff \ + git://git.misdn.eu/mISDNuser.git;branch=socket \ + file://0001-mbuffer-data-size.patch \ " +# Release v2.0.19 +SRCREV = "3638cf36df506b96015e1f37ce3bb36ec94a01fb" -SRCREV = "fd246f6bbbf2f4692f507018bcd1a526fab16499" S = "${WORKDIR}/git" inherit autotools From 425322314af07cfc7dcabfd44d4c2d23211ff893 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:26:18 -0300 Subject: [PATCH 07/15] dahdi-linux: Drop dahdi-linux.inc Move all code to bb file. Signed-off-by: Fabio Berton --- recipes-isdn/dahdi-linux/dahdi-linux.inc | 78 ------------------- recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb | 78 ++++++++++++++++++- 2 files changed, 76 insertions(+), 80 deletions(-) delete mode 100644 recipes-isdn/dahdi-linux/dahdi-linux.inc diff --git a/recipes-isdn/dahdi-linux/dahdi-linux.inc b/recipes-isdn/dahdi-linux/dahdi-linux.inc deleted file mode 100644 index 3633a0e481..0000000000 --- a/recipes-isdn/dahdi-linux/dahdi-linux.inc +++ /dev/null @@ -1,78 +0,0 @@ -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" diff --git a/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb b/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb index 3d429c7efd..4ed7b2028d 100644 --- a/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb +++ b/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb @@ -1,5 +1,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" -require ${PN}.inc +# 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\ + " -PR = "${INC_PR}.1" +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" From f6bd02dc6848b2cac1bd168fd2a4359c896fd631 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:34:19 -0300 Subject: [PATCH 08/15] dahdi-linux: Organize recipe Fix indentations and style issues. Signed-off-by: Fabio Berton --- recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb | 94 +++++++++---------- 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb b/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb index 4ed7b2028d..1db3d0e51e 100644 --- a/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb +++ b/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb @@ -2,78 +2,74 @@ DESCRITOPN = "Digium Asterisk Hardware Driver Interface - Linux kernel part" SECTION = "base" HOMEPAGE = "http://www.asterisk.org" LICENSE = "GPLv2" -RDEPENDS_${PN} = "kernel (${KERNEL_VERSION})" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a" + 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\ - " +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 + # 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_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 + 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 } +PACKAGE_ARCH_dahdi-firmware = "all" 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" +RDEPENDS_${PN} = "kernel (${KERNEL_VERSION})" +RRECOMMENDS_${PN} = "dahdi-firmware" From 988c11d3ddca8732821c913175a9259c6dd798ec Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:45:08 -0300 Subject: [PATCH 09/15] dahdi-linux: Update to version 2.10.2 Signed-off-by: Fabio Berton --- .../dahdi-linux/dahdi-linux_2.10.2.bb | 141 ++++++++++++++++++ recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb | 75 ---------- .../0001-Use-objcopy-from-toolchain.patch | 39 +++++ 3 files changed, 180 insertions(+), 75 deletions(-) create mode 100644 recipes-isdn/dahdi-linux/dahdi-linux_2.10.2.bb delete mode 100644 recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb create mode 100644 recipes-isdn/dahdi-linux/files/0001-Use-objcopy-from-toolchain.patch diff --git a/recipes-isdn/dahdi-linux/dahdi-linux_2.10.2.bb b/recipes-isdn/dahdi-linux/dahdi-linux_2.10.2.bb new file mode 100644 index 0000000000..59825718d6 --- /dev/null +++ b/recipes-isdn/dahdi-linux/dahdi-linux_2.10.2.bb @@ -0,0 +1,141 @@ +DESCRITOPN = "Digium Asterisk Hardware Driver Interface - Linux kernel part" +SECTION = "base" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a" + +DEPENDS = "virtual/kernel" + +# 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-a4a-a0017.tar.gz;name=dahdi-fw-a4a-a0017 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-d001e.tar.gz;name=dahdi-fw-a4b-d001e \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz;name=dahdi-fw-a8a-1d0017 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1f001e.tar.gz;name=dahdi-fw-a8b-1f001e \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz;name=dahdi-fw-hx8 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz;name=dahdi-fw-oct6114-032 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz;name=dahdi-fw-oct6114-064 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz;name=dahdi-fw-oct6114-128 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz;name=dahdi-fw-oct6114-256 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz;name=dahdi-fw-tc400m-MR6 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-7a001e.tar.gz;name=dahdi-fw-te133-7a001e \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz;name=dahdi-fw-te134-780017 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-13001e.tar.gz;name=dahdi-fw-te435-13001e \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz;name=dahdi-fw-te436-10017 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz;name=dahdi-fw-te820-1.76 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz;name=dahdi-fw-vpmoct032 \ + http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz;name=dahdi-fwload-vpmadt032 \ +" + +SRC_URI[dahdi-fw-a4a-a0017.md5sum] = "7fab377be2dff23188e234475bc044f9" +SRC_URI[dahdi-fw-a4a-a0017.sha256sum] = "d5b6ab6851e431afcfec2ecc39d95fa88fe3939ffdb2e3d4f28a43cabf30e95b" +SRC_URI[dahdi-fw-a4b-d001e.md5sum] = "f16247c3d92d9b1d183de28230fa85b1" +SRC_URI[dahdi-fw-a4b-d001e.sha256sum] = "e039af8bec36407b74e1dd9ebdd49ba077469eda79d4e6093721ed2836d4536f" +SRC_URI[dahdi-fw-a8a-1d0017.md5sum] = "1e771e250721105013cbdb6b6e66f9dc" +SRC_URI[dahdi-fw-a8a-1d0017.sha256sum] = "5064f9877b8aec99b19fd57988216fe1a9c0b7c07853dd3b32b5a55ab7b418e6" +SRC_URI[dahdi-fw-a8b-1f001e.md5sum] = "014b46ac0b04cd93327908a082304dd0" +SRC_URI[dahdi-fw-a8b-1f001e.sha256sum] = "09a8992786309e025aa60b400a2c7d21226ac9bb6f1b66f562a5e7e9dc892b03" +SRC_URI[dahdi-fw-hx8.md5sum] = "a7f3886942bb3e9fed349a41b3390c9f" +SRC_URI[dahdi-fw-hx8.sha256sum] = "449ab3fd03d55d808e999efb7677cd04de202b92c9fcb039539a7e48a39a80f5" +SRC_URI[dahdi-fw-oct6114-032.md5sum] = "5e0b48da8a9912f2a40a0e0508c96948" +SRC_URI[dahdi-fw-oct6114-032.sha256sum] = "7a006073202d67e45f1d5ff1e9c6e8663e6056cef9dc4c5abae86a1018db349c" +SRC_URI[dahdi-fw-oct6114-064.md5sum] = "88db9b7a07d8392736171b1b3e6bcc66" +SRC_URI[dahdi-fw-oct6114-064.sha256sum] = "56bac1f2024c76ecf9b6f40992eeea29a1fbee676bb2a37a058179bacfbb1c91" +SRC_URI[dahdi-fw-oct6114-128.md5sum] = "c1f1a18d3e20d283f42c71e580a64b5a" +SRC_URI[dahdi-fw-oct6114-128.sha256sum] = "e1146749d205c41603b9b76852c3f8104dac233d0025d700db24504d10c99775" +SRC_URI[dahdi-fw-oct6114-256.md5sum] = "4b3b763fc89f81d569a42da7c9ef0eee" +SRC_URI[dahdi-fw-oct6114-256.sha256sum] = "5fe5036a2766cf0e8a968b0c58b700507d86e1cde9296ca437170cc626a9c79c" +SRC_URI[dahdi-fw-tc400m-MR6.md5sum] = "2ea860bb8a9d8ede2858b9557b74ee3c" +SRC_URI[dahdi-fw-tc400m-MR6.sha256sum] = "11dd8d009809e41fc9a3a36766f59ff73d29075eede5b8724331d9a6e5259774" +SRC_URI[dahdi-fw-te133-7a001e.md5sum] = "74f0ca211d31dc6683126cfaf399de91" +SRC_URI[dahdi-fw-te133-7a001e.sha256sum] = "511c1966295a20df673bb87af30245f0ad165efd6ccb92b4d8ed535ca7f5ac65" +SRC_URI[dahdi-fw-te134-780017.md5sum] = "71eda5003be050e9cd2f9ecea4fc898b" +SRC_URI[dahdi-fw-te134-780017.sha256sum] = "99f7c410bf47d2a5ae687d717e51448ce5b52aca902830bf39bffe683150fa2d" +SRC_URI[dahdi-fw-te435-13001e.md5sum] = "19bd5ac1ac886c38258d7079ff18ca83" +SRC_URI[dahdi-fw-te435-13001e.sha256sum] = "c8f55d57cc0bf332e8d96cdf9ff6dd0e322f33581e1efc24c2b9a0e0c5eb7ee4" +SRC_URI[dahdi-fw-te436-10017.md5sum] = "44b5a653aeab6f0e1e73348195c04a58" +SRC_URI[dahdi-fw-te436-10017.sha256sum] = "0980f4a8d191c6872aa27d971758046f0e7827ac161549f2cc1b0eeab0ae9333" +SRC_URI[dahdi-fw-te820-1.76.md5sum] = "07b389e2a4f2a2513240187f1c295626" +SRC_URI[dahdi-fw-te820-1.76.sha256sum] = "5b823e25828e2c1c6548886ad408b2e31dbc8cd17170c52592792d9c754a199c" +SRC_URI[dahdi-fw-vpmoct032.md5sum] = "2c7d5b17c23c34624158ee640818043b" +SRC_URI[dahdi-fw-vpmoct032.sha256sum] = "6b199cf836f150f9cb35f763f0f502fb52cfa2724a449b500429c746973904ad" +SRC_URI[dahdi-fwload-vpmadt032.md5sum] = "19a660c2073749641072ca644e983cbc" +SRC_URI[dahdi-fwload-vpmadt032.sha256sum] = "3ff26cf80555fd7470b43a87c51d03c1db2a75abcd4561d79f69b6c48298e4a1" + +SRC_URI = "\ + http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-${PV}.tar.gz;name=dahdi-linux \ + file://0001-Use-objcopy-from-toolchain.patch \ +" +SRC_URI[dahdi-linux.md5sum] = "0281de245f4fa056f765ae2a6e1f1a4b" +SRC_URI[dahdi-linux.sha256sum] = "6270444cb9b345941267b162038cc45f5ef4485139176e88e2c4d22fa35a2c59" + +SRC_URI =+ "${FIRMWARE_URI}" + +inherit module + +export TARGET_SYS +EXTRA_OEMAKE += "KSRC=${STAGING_KERNEL_BUILDDIR}" + +do_configure() { + # make sure the extracted firmware.bin are where Makefile expects + cp ../*.bin drivers/dahdi/firmware/ + cp ${DL_DIR}/dahdi-fwload-*.tar.gz drivers/dahdi/firmware/ + cp ${DL_DIR}/dahdi-fw-*.tar.gz drivers/dahdi/firmware/ +} + +do_install() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo DESTDIR="${D}" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + install +} + +DAHDI_KERNEL_MODULE = "\ + kernel-module-oct612x \ + kernel-module-dahdi-echocan-jpah \ + kernel-module-dahdi \ + kernel-module-xpd-fxo \ + kernel-module-wctdm \ + kernel-module-dahdi-dynamic-loc \ + kernel-module-xpp-usb \ + kernel-module-xpp \ + kernel-module-wcb4xxp \ + kernel-module-wcte43x \ + kernel-module-wctdm24xxp \ + kernel-module-pciradio \ + kernel-module-wcte12xp \ + kernel-module-dahdi-voicebus \ + kernel-module-dahdi-dynamic-ethmf \ + kernel-module-dahdi-dynamic \ + kernel-module-wctc4xxp \ + kernel-module-dahdi-echocan-sec2 \ + kernel-module-xpd-bri \ + kernel-module-wcaxx \ + kernel-module-dahdi-transcode \ + kernel-module-wcte11xp \ + kernel-module-dahdi-echocan-kb1 \ + kernel-module-wcte13xp \ + kernel-module-dahdi-dynamic-eth \ + kernel-module-dahdi-echocan-mg2 \ + kernel-module-wct1xx \ + kernel-module-wct4xxp \ + kernel-module-tor2 \ + kernel-module-xpd-pri \ + kernel-module-wct1xxp \ + kernel-module-wcfxo \ + kernel-module-dahdi-echocan-sec \ + kernel-module-xpd-echo \ + kernel-module-xpd-fxs \ +" + +PACKAGE_ARCH_dahdi-firmware = "all" +PACKAGES =+ "dahdi-firmware ${DAHDI_KERNEL_MODULE}" + +FILES_${PN} = "${base_libdir}/modules/ ${sysconfdir}/udev/rules.d" +FILES_dahdi-firmware = "${base_libdir}/firmware ${datadir}/dahdi" + +RRECOMMENDS_${PN} = "dahdi-firmware" diff --git a/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb b/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb deleted file mode 100644 index 1db3d0e51e..0000000000 --- a/recipes-isdn/dahdi-linux/dahdi-linux_2.6.0.bb +++ /dev/null @@ -1,75 +0,0 @@ -DESCRITOPN = "Digium Asterisk Hardware Driver Interface - Linux kernel part" -SECTION = "base" -HOMEPAGE = "http://www.asterisk.org" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a" - -DEPENDS = "virtual/kernel" - -# 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}" - -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 -} - -PACKAGE_ARCH_dahdi-firmware = "all" -PACKAGES =+ "dahdi-firmware" - -FILES_${PN} = "${base_libdir}/modules/ ${sysconfdir}/udev/rules.d" -FILES_dahdi-firmware = "${base_libdir}/firmware ${datadir}/dahdi" - -RDEPENDS_${PN} = "kernel (${KERNEL_VERSION})" -RRECOMMENDS_${PN} = "dahdi-firmware" diff --git a/recipes-isdn/dahdi-linux/files/0001-Use-objcopy-from-toolchain.patch b/recipes-isdn/dahdi-linux/files/0001-Use-objcopy-from-toolchain.patch new file mode 100644 index 0000000000..a6a199379a --- /dev/null +++ b/recipes-isdn/dahdi-linux/files/0001-Use-objcopy-from-toolchain.patch @@ -0,0 +1,39 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH] Use objcopy from toolchain +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + drivers/dahdi/firmware/Makefile | 4 ++-- + drivers/dahdi/firmware/make_firmware_object.in | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/dahdi/firmware/Makefile b/drivers/dahdi/firmware/Makefile +index fbd6582..1f9ce7f 100644 +--- a/drivers/dahdi/firmware/Makefile ++++ b/drivers/dahdi/firmware/Makefile +@@ -158,8 +158,8 @@ hotplug-uninstall: + fi + + make_firmware_object: make_firmware_object.in ../dahdi-base.o +- @export BFDNAME=`LANG=C objdump -f ../dahdi-base.o | grep -e "dahdi-base.o:" | sed "s/.*file format \(.*\)/\1/"`; \ +- export BFDARCH=`LANG=C objdump -f ../dahdi-base.o | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`; \ ++ @export BFDNAME=`LANG=C ${TARGET_SYS}-objdump -f ../dahdi-base.o | grep -e "dahdi-base.o:" | sed "s/.*file format \(.*\)/\1/"`; \ ++ export BFDARCH=`LANG=C ${TARGET_SYS}-objdump -f ../dahdi-base.o | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`; \ + sed -e s/BFDNAME/$${BFDNAME}/ -e s/BFDARCH/$${BFDARCH}/ $< > $@ + @chmod +x $@ + +diff --git a/drivers/dahdi/firmware/make_firmware_object.in b/drivers/dahdi/firmware/make_firmware_object.in +index 0effb32..6fe232a 100644 +--- a/drivers/dahdi/firmware/make_firmware_object.in ++++ b/drivers/dahdi/firmware/make_firmware_object.in +@@ -5,4 +5,4 @@ + # 1 - firmware file + # 2 - output file + +-objcopy -I binary ${1} -B BFDARCH -O BFDNAME ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly ++${TARGET_SYS}-objcopy -I binary ${1} -B BFDARCH -O BFDNAME ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly +-- +2.1.4 + From a1debd963cd2a0d24eaaddc661c109ab02ed3cba Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:47:54 -0300 Subject: [PATCH 10/15] dahdi-tools: Drop dahdi-tools.inc Move all code to bb file. Signed-off-by: Fabio Berton --- recipes-isdn/dahdi-tools/dahdi-tools.inc | 36 ------------------- recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb | 36 +++++++++++++++++-- 2 files changed, 34 insertions(+), 38 deletions(-) delete mode 100644 recipes-isdn/dahdi-tools/dahdi-tools.inc diff --git a/recipes-isdn/dahdi-tools/dahdi-tools.inc b/recipes-isdn/dahdi-tools/dahdi-tools.inc deleted file mode 100644 index 06ef35cf23..0000000000 --- a/recipes-isdn/dahdi-tools/dahdi-tools.inc +++ /dev/null @@ -1,36 +0,0 @@ -DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" -DEPENDS = "dahdi-linux libnewt libpcap" -RDEPENDS_${PN} += "perl perl-module-strict perl-module-file-basename perl-module-config \ - perl-module-warnings perl-module-getopt perl-module-getopt-std \ - perl-module-file perl-module-file-glob perl-module-xsloader \ - perl-module-dynaloader perl-module-carp perl-module-errno" - -HOMEPAGE = "http://www.asterisk.org" -LICENSE = "GPLv2" - -SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz \ - file://perl_install.patch " - -INC_PR="r19" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ - file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09" - -FILES_${PN} += "${datadir}/dahdi" - -inherit autotools_stage pkgconfig perlnative cpan-base - -do_configure() { - oe_runconf -} - -do_compile() { - base_do_compile - oe_runmake dahdi_pcap -} - -export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" -do_install() { - autotools_do_install - install -m 755 ${S}/dahdi_pcap ${D}${sbindir}/ -} diff --git a/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb b/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb index 35132e4b8a..06ef35cf23 100644 --- a/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb +++ b/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb @@ -1,4 +1,36 @@ -require ${PN}.inc +DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" +DEPENDS = "dahdi-linux libnewt libpcap" +RDEPENDS_${PN} += "perl perl-module-strict perl-module-file-basename perl-module-config \ + perl-module-warnings perl-module-getopt perl-module-getopt-std \ + perl-module-file perl-module-file-glob perl-module-xsloader \ + perl-module-dynaloader perl-module-carp perl-module-errno" -PR = "${INC_PR}.2" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPLv2" +SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz \ + file://perl_install.patch " + +INC_PR="r19" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09" + +FILES_${PN} += "${datadir}/dahdi" + +inherit autotools_stage pkgconfig perlnative cpan-base + +do_configure() { + oe_runconf +} + +do_compile() { + base_do_compile + oe_runmake dahdi_pcap +} + +export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" +do_install() { + autotools_do_install + install -m 755 ${S}/dahdi_pcap ${D}${sbindir}/ +} From 23399a4592d7bbfe2c9361ff3bef899709eba4bf Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 14:56:07 -0300 Subject: [PATCH 11/15] dahdi-tools: Organize recipe Fix indentations and style issues. Signed-off-by: Fabio Berton --- recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb b/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb index 06ef35cf23..2b26b273de 100644 --- a/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb +++ b/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb @@ -1,36 +1,41 @@ DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" -DEPENDS = "dahdi-linux libnewt libpcap" -RDEPENDS_${PN} += "perl perl-module-strict perl-module-file-basename perl-module-config \ - perl-module-warnings perl-module-getopt perl-module-getopt-std \ - perl-module-file perl-module-file-glob perl-module-xsloader \ - perl-module-dynaloader perl-module-carp perl-module-errno" - HOMEPAGE = "http://www.asterisk.org" LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09 \ +" -SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz \ - file://perl_install.patch " +DEPENDS = "dahdi-linux libnewt libpcap" -INC_PR="r19" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ - file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09" - -FILES_${PN} += "${datadir}/dahdi" +SRC_URI = "\ + http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz \ + file://perl_install.patch \ +" inherit autotools_stage pkgconfig perlnative cpan-base +export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" + do_configure() { - oe_runconf + oe_runconf } do_compile() { - base_do_compile - oe_runmake dahdi_pcap + base_do_compile + oe_runmake dahdi_pcap } -export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" do_install() { - autotools_do_install - install -m 755 ${S}/dahdi_pcap ${D}${sbindir}/ + autotools_do_install + install -m 755 ${S}/dahdi_pcap ${D}${sbindir}/ } + +FILES_${PN} += "${datadir}/dahdi" + +RDEPENDS_${PN} += "\ + perl perl-module-strict perl-module-file-basename perl-module-config \ + perl-module-warnings perl-module-getopt perl-module-getopt-std \ + perl-module-file perl-module-file-glob perl-module-xsloader \ + perl-module-dynaloader perl-module-carp perl-module-errno \ +" From a066f13e756a05781677171b57d838896d15daca Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Thu, 15 Oct 2015 15:11:46 -0300 Subject: [PATCH 12/15] dahdi-tools: Update to version 2.10.2 * libpcap is no longer a dependence. * libusb is needed for building fpga_load, needed for firmware loading of the Xorcom Astribank. * do_configure, do_compile and do_install were removed to use functions provided by autotools class. Signed-off-by: Fabio Berton --- .../dahdi-tools/dahdi-tools_2.10.2.bb | 44 +++ recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb | 41 --- .../files/0001-Set-perllibdir.patch | 26 ++ .../files/0002-Use-sh-not-bash.patch | 23 ++ .../0003-Remove-Werror-from-Makefile.patch | 42 +++ recipes-isdn/dahdi-tools/files/dahdi.init.d | 343 ++++++++++++++++++ .../dahdi-tools/files/perl_install.patch | 13 - 7 files changed, 478 insertions(+), 54 deletions(-) create mode 100644 recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb delete mode 100644 recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb create mode 100644 recipes-isdn/dahdi-tools/files/0001-Set-perllibdir.patch create mode 100644 recipes-isdn/dahdi-tools/files/0002-Use-sh-not-bash.patch create mode 100644 recipes-isdn/dahdi-tools/files/0003-Remove-Werror-from-Makefile.patch create mode 100644 recipes-isdn/dahdi-tools/files/dahdi.init.d delete mode 100755 recipes-isdn/dahdi-tools/files/perl_install.patch diff --git a/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb b/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb new file mode 100644 index 0000000000..337186dfbd --- /dev/null +++ b/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb @@ -0,0 +1,44 @@ +DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09 \ +" + +DEPENDS = "dahdi-linux libnewt libusb" + +SRC_URI = "\ + http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz \ + file://0001-Set-perllibdir.patch \ + file://0002-Use-sh-not-bash.patch \ + file://0003-Remove-Werror-from-Makefile.patch \ + file://dahdi.init.d \ +" + +SRC_URI[md5sum] = "6928cdf6f7710299ecbcacbac20d5c92" +SRC_URI[sha256sum] = "9e904815dedab231084c542d2d7d5dcc832ebec4b5d5d999a5d757df8b2d571a" + +S = "${WORKDIR}/${PN}-${PV}" + +inherit autotools-brokensep pkgconfig perlnative cpan-base update-rc.d + +export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" + +INITSCRIPT_NAME = "dahdi" +INITSCRIPT_PARAMS = "defaults" + +do_install_append(){ + oe_runmake DESTDIR=${D} config + install -Dm 0755 ${WORKDIR}/dahdi.init.d ${D}${sysconfdir}/init.d/dahdi + chown -R root:root ${D}${datadir}/dahdi/ +} + +FILES_${PN} += "${datadir}/dahdi" + +RDEPENDS_${PN} += "\ + perl perl-module-strict perl-module-file-basename perl-module-config \ + perl-module-warnings perl-module-getopt-std perl-module-file-glob \ + perl-module-xsloader perl-module-dynaloader perl-module-carp \ + perl-module-errno perl-module-file-basename dahdi-linux \ +" diff --git a/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb b/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb deleted file mode 100644 index 2b26b273de..0000000000 --- a/recipes-isdn/dahdi-tools/dahdi-tools_2.6.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" -HOMEPAGE = "http://www.asterisk.org" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "\ - file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ - file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09 \ -" - -DEPENDS = "dahdi-linux libnewt libpcap" - -SRC_URI = "\ - http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz \ - file://perl_install.patch \ -" - -inherit autotools_stage pkgconfig perlnative cpan-base - -export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" - -do_configure() { - oe_runconf -} - -do_compile() { - base_do_compile - oe_runmake dahdi_pcap -} - -do_install() { - autotools_do_install - install -m 755 ${S}/dahdi_pcap ${D}${sbindir}/ -} - -FILES_${PN} += "${datadir}/dahdi" - -RDEPENDS_${PN} += "\ - perl perl-module-strict perl-module-file-basename perl-module-config \ - perl-module-warnings perl-module-getopt perl-module-getopt-std \ - perl-module-file perl-module-file-glob perl-module-xsloader \ - perl-module-dynaloader perl-module-carp perl-module-errno \ -" diff --git a/recipes-isdn/dahdi-tools/files/0001-Set-perllibdir.patch b/recipes-isdn/dahdi-tools/files/0001-Set-perllibdir.patch new file mode 100644 index 0000000000..6bf46af1fa --- /dev/null +++ b/recipes-isdn/dahdi-tools/files/0001-Set-perllibdir.patch @@ -0,0 +1,26 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 1/3] Set perllibdir +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + xpp/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xpp/Makefile b/xpp/Makefile +index 12909f2..8e8b6c9 100644 +--- a/xpp/Makefile ++++ b/xpp/Makefile +@@ -30,7 +30,7 @@ SBINDIR = $(prefix)/sbin + DATADIR = $(datadir)/dahdi + MANDIR = $(mandir)/man8 + HOTPLUG_USB_DIR = $(sysconfdir)/hotplug/usb +-PERLLIBDIR := $(shell eval `perl -V:sitelib`; echo "$$sitelib") ++PERLLIBDIR = $(DAHDI_PERLLIBDIR) + PERL_DIRS := $(shell cd perl_modules; find * -name '[A-Z]*' -type d| xargs) + PERL_MODS_PAT := *.pm $(PERL_DIRS:%=%/*.pm) + PERL_MODS := $(shell cd perl_modules; echo $(PERL_MODS_PAT)) +-- +2.1.4 + diff --git a/recipes-isdn/dahdi-tools/files/0002-Use-sh-not-bash.patch b/recipes-isdn/dahdi-tools/files/0002-Use-sh-not-bash.patch new file mode 100644 index 0000000000..e6d15b5d7c --- /dev/null +++ b/recipes-isdn/dahdi-tools/files/0002-Use-sh-not-bash.patch @@ -0,0 +1,23 @@ +Upstream-Status: Inappropriate [configuration] + +Subject: [PATCH 2/3] Use sh not bash +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + xpp/xpp_fxloader | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xpp/xpp_fxloader b/xpp/xpp_fxloader +index 5135ebf..8598004 100644 +--- a/xpp/xpp_fxloader ++++ b/xpp/xpp_fxloader +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # xpp_fxloader: load Xorcom Astribank (XPP) firmware + # $Id$ +-- +2.1.4 + diff --git a/recipes-isdn/dahdi-tools/files/0003-Remove-Werror-from-Makefile.patch b/recipes-isdn/dahdi-tools/files/0003-Remove-Werror-from-Makefile.patch new file mode 100644 index 0000000000..9c1f9fa25a --- /dev/null +++ b/recipes-isdn/dahdi-tools/files/0003-Remove-Werror-from-Makefile.patch @@ -0,0 +1,42 @@ +Upstream-Status: Pending + +Fix error: "cc1: all warnings being treated as errors" + +Subject: [PATCH 3/3] Remove Werror from Makefile +Organization: O.S. Systems Software LTDA. + +Signed-off-by: Fabio Berton +--- + Makefile | 2 +- + xpp/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 69741e6..1a5eefc 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,7 +27,7 @@ CFLAGS+=-m64 + endif + + ifeq ($(DAHDI_DEVMODE),yes) +- CFLAGS+=-Werror -Wunused -Wundef $(DAHDI_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security #-Wformat=2 ++ CFLAGS+= -Wunused -Wundef $(DAHDI_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security #-Wformat=2 + endif + + ROOT_PREFIX= +diff --git a/xpp/Makefile b/xpp/Makefile +index 8e8b6c9..001e476 100644 +--- a/xpp/Makefile ++++ b/xpp/Makefile +@@ -146,7 +146,7 @@ ifneq (,$(PERLLIBDIR)) + done + endif + +-CFLAGS += -I. -Ixtalk -Wall -Werror ++CFLAGS += -I. -Ixtalk -Wall + + astribank_hexload: $(ABHEXLOAD_OBJS) + astribank_hexload: LIBS+=$(EXTRA_LIBS) $(USB_LIB) +-- +2.1.4 + diff --git a/recipes-isdn/dahdi-tools/files/dahdi.init.d b/recipes-isdn/dahdi-tools/files/dahdi.init.d new file mode 100644 index 0000000000..87b57d5db1 --- /dev/null +++ b/recipes-isdn/dahdi-tools/files/dahdi.init.d @@ -0,0 +1,343 @@ +#!/bin/sh +# +# dahdi This shell script takes care of loading and unloading \ +# DAHDI Telephony interfaces +# chkconfig: 2345 9 92 +# description: The DAHDI drivers allow you to use your linux \ +# computer to accept incoming data and voice interfaces +# +# config: /etc/dahdi/init.conf + +### BEGIN INIT INFO +# Provides: dahdi +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: $network $syslog +# Should-Stop: $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: DAHDI kernel modules +# Description: dahdi - load and configure DAHDI modules +### END INIT INFO + +initdir=/etc/init.d + +# Don't edit the following values. Edit /etc/dahdi/init.conf instead. + +DAHDI_CFG=/usr/sbin/dahdi_cfg +DAHDI_CFG_CMD=${DAHDI_CFG_CMD:-"$DAHDI_CFG"} # e.g: for a custom system.conf location + +FXOTUNE=/usr/sbin/fxotune + +# The default syncer Astribank. Usually set automatically to a sane +# value by xpp_sync(1) if you have an Astribank. You can set this to an +# explicit Astribank (e.g: 01). +XPP_SYNC=auto + +# The maximal timeout (seconds) to wait for udevd to finish generating +# device nodes after the modules have loaded and before running dahdi_cfg. +DAHDI_DEV_TIMEOUT=20 + +# A list of modules to unload when stopping. +# All of their dependencies will be unloaded as well. +DAHDI_UNLOAD_MODULES="dahdi" + +# +# Determine which kind of configuration we're using +# +system=debian # assume debian +if [ -f /etc/debian_version ]; then + system=debian +fi + +if [ -f /etc/gentoo-release ]; then + system=debian +fi + +if [ -f /etc/SuSE-release -o -f /etc/novell-release ] +then + system=debian +fi + +# Source function library. +if [ $system = debian ]; then + . $initdir/functions || exit 0 +fi + +DAHDI_MODULES_FILE="/etc/dahdi/modules" + +[ -r /etc/dahdi/init.conf ] && . /etc/dahdi/init.conf + +if [ $system = redhat ]; then + LOCKFILE=/var/lock/subsys/dahdi +fi + +# recursively unload a module and its dependencies, if possible. +# where's modprobe -r when you need it? +# inputs: module to unload. +# returns: the result from +unload_module() { + module="$1" + line=`lsmod 2>/dev/null | grep "^$1 "` + if [ "$line" = '' ]; then return; fi # module was not loaded + + set -- $line + # $1: the original module, $2: size, $3: refcount, $4: deps list + mods=`echo $4 | tr , ' '` + ec_modules="" + # xpp_usb keeps the xpds below busy if an xpp hardware is + # connected. Hence must be removed before them: + case "$module" in xpd_*) mods="xpp_usb $mods";; esac + + for mod in $mods; do + case "$mod" in + dahdi_echocan_*) + ec_modules="$mod $ec_modules" + ;; + *) + # run in a subshell, so it won't step over our vars: + (unload_module $mod) + ;; + esac + done + # Now that all the other dependencies are unloaded, we can unload the + # dahdi_echocan modules. The drivers that register spans may keep + # references on the echocan modules before they are unloaded. + for mod in $ec_modules; do + (unload_module $mod) + done + rmmod $module +} + +unload_modules() { + for module in $DAHDI_UNLOAD_MODULES; do + unload_module $module + done +} + +# In (xpp) hotplug mode, the init script is also executed from the +# hotplug hook. In that case it should not attempt to loade modules. +# +# This function only retunrs false (1) if we're in hotplug mode and +# coming from the hotplug hook script. +hotplug_should_load_modules() { + if [ "$XPP_HOTPLUG_DAHDI" = yes -a "$CALLED_FROM_ATRIBANK_HOOK" != '' ] + then + return 1 + fi + return 0 +} + +# In (xpp) hotplug mode: quit after we loaded modules. +# +# In hotplug mode, the main run should end here, whereas the rest of the +# script should be finished by the instance running from the hook. +# Note that we only get here if there are actually Astribanks on the +# system (otherwise noone will trigger the run of the hotplug hook +# script). +hotplug_exit_after_load() { + if [ "$XPP_HOTPLUG_DAHDI" = yes -a "$CALLED_FROM_ATRIBANK_HOOK" = '' ] + then + exit 0 + fi +} + +# Initialize the Xorcom Astribank (xpp/) using perl utiliites: +xpp_startup() { + if [ "$ASTERISK_SUPPORTS_DAHDI_HOTPLUG" = yes ]; then + aas_param='/sys/module/dahdi/parameters/auto_assign_spans' + aas=`cat "$aas_param" 2>/dev/null` + if [ "$aas" = 0 ]; then + echo 1>&2 "Don't wait for Astribanks (use Asterisk hotplug-support)" + return 0 + fi + fi + # do nothing if there are no astribank devices: + if ! /usr/share/dahdi/waitfor_xpds; then return 0; fi + + hotplug_exit_after_load +} + + +hpec_start() { + # HPEC license found + if ! echo /var/lib/digium/licenses/HPEC-*.lic | grep -v '\*' | grep -q .; then + return + fi + + # dahdihpec_enable not installed in /usr/sbin + if [ ! -f /usr/sbin/dahdihpec_enable ]; then + echo -n "Running dahdihpec_enable: Failed" + echo -n "." + echo " The dahdihpec_enable binary is not installed in /usr/sbin." + return + fi + + # dahdihpec_enable not set executable + if [ ! -x /usr/sbin/dahdihpec_enable ]; then + echo -n "Running dahdihpec_enable: Failed" + echo -n "." + echo " /usr/sbin/dahdihpec_enable is not set as executable." + return + fi + + # dahdihpec_enable properly installed + if [ $system = debian ]; then + echo -n "Running dahdihpec_enable: " + /usr/sbin/dahdihpec_enable 2> /dev/null + elif [ $system = redhat ]; then + action "Running dahdihpec_enable: " /usr/sbin/dahdihpec_enable + fi + if [ $? = 0 ]; then + echo -n "done" + echo "." + else + echo -n "Failed" + echo -n "." + echo " This can be caused if you had already run dahdihpec_enable, or if your HPEC license is no longer valid." + fi +} + +shutdown_dynamic() { + if ! grep -q ' DYN/' /proc/dahdi/* 2>/dev/null; then return; fi + + # we should only get here if we have dynamic spans. Right? + $DAHDI_CFG_CMD -s +} + +load_modules() { + # Some systems, e.g. Debian Lenny, add here -b, which will break + # loading of modules blacklisted in modprobe.d/* + unset MODPROBE_OPTIONS + modules=`sed -e 's/#.*$//' $DAHDI_MODULES_FILE 2>/dev/null` + #if [ "$modules" = '' ]; then + # what? + #fi + echo "Loading DAHDI hardware modules:" + modprobe dahdi + for line in $modules; do + if [ $system = debian ]; then + echo -n " ${line}: " + if modprobe $line 2> /dev/null; then + echo -n "done" + else + echo -n "error" + fi + elif [ $system = redhat ]; then + action " ${line}: " modprobe $line + fi + done + echo "" +} + +# Make sure that either dahdi is loaded or modprobe-able +dahdi_modules_loadable() { + modinfo dahdi >/dev/null 2>&1 || lsmod | grep -q -w ^dahdi +} + +if [ ! -x "$DAHDI_CFG" ]; then + echo "dahdi_cfg not executable" + exit 0 +fi + +RETVAL=0 + +# See how we were called. +case "$1" in + start) + if ! dahdi_modules_loadable; then + echo "No DAHDI modules on the system. Not starting" + exit 0 + fi + if hotplug_should_load_modules; then + load_modules + fi + + TMOUT=$DAHDI_DEV_TIMEOUT # max secs to wait + + while [ ! -d /dev/dahdi ] ; do + sleep 1 + TMOUT=`expr $TMOUT - 1` + if [ $TMOUT -eq 0 ] ; then + echo "Error: missing /dev/dahdi!" + exit 1 + fi + done + + xpp_startup + + # Assign all spans that weren't handled via udev + /etc/dahdi/assigned-spans.conf + /usr/share/dahdi/dahdi_auto_assign_compat + + if [ $system = debian ]; then + echo -n "Running dahdi_cfg: " + $DAHDI_CFG_CMD 2> /dev/null && echo -n "done" + echo "." + elif [ $system = redhat ]; then + action "Running dahdi_cfg: " $DAHDI_CFG_CMD + fi + RETVAL=$? + + if [ "$LOCKFILE" != '' ]; then + [ $RETVAL -eq 0 ] && touch $LOCKFILE + fi + + if [ -x "$FXOTUNE" ] && [ -r /etc/fxotune.conf ]; then + # Allowed to fail if e.g. Asterisk already uses channels: + $FXOTUNE -s || : + fi + + # Do not try to call xpp_sync if there are no Astribank devices + # installed. + if test -e /sys/bus/astribanks; then + # Set the right Astribanks ticker: + LC_ALL=C xpp_sync "$XPP_SYNC" + fi + + hpec_start + ;; + stop) + # Unload drivers + #shutdown_dynamic # FIXME: needs test from someone with dynamic spans + echo -n "Unloading DAHDI hardware modules: " + if unload_modules; then + echo "done" + else + echo "error" + fi + if [ "$LOCKFILE" != '' ]; then + [ $RETVAL -eq 0 ] && rm -f $LOCKFILE + fi + ;; + unload) + unload_modules + ;; + restart|force-reload) + $0 stop + $0 start + ;; + reload) + if [ $system = debian ]; then + echo -n "Rerunning dahdi_cfg: " + $DAHDI_CFG_CMD 2> /dev/null && echo -n "done" + echo "." + elif [ $system = redhat ]; then + action "Rerunning dahdi_cfg: " $DAHDI_CFG_CMD + fi + RETVAL=$? + ;; + status) + if [ -d /proc/dahdi ]; then + /usr/sbin/lsdahdi + RETVAL=0 + else + RETVAL=3 + fi + ;; + *) + echo "Usage: dahdi {start|stop|restart|status|reload|unload}" + exit 1 +esac + +exit $RETVAL + diff --git a/recipes-isdn/dahdi-tools/files/perl_install.patch b/recipes-isdn/dahdi-tools/files/perl_install.patch deleted file mode 100755 index adcda2be96..0000000000 --- a/recipes-isdn/dahdi-tools/files/perl_install.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: dahdi-tools-2.6.0/xpp/Makefile -=================================================================== ---- dahdi-tools-2.6.0.orig/xpp/Makefile 2011-07-11 00:25:18.000000000 +0800 -+++ dahdi-tools-2.6.0/xpp/Makefile 2012-07-21 23:30:58.244897984 +0800 -@@ -28,7 +28,7 @@ - DATADIR = $(datadir)/dahdi - MANDIR = $(mandir)/man8 - HOTPLUG_USB_DIR = $(sysconfdir)/hotplug/usb --PERLLIBDIR := $(shell eval `perl -V:sitelib`; echo "$$sitelib") -+PERLLIBDIR = $(DAHDI_PERLLIBDIR) - PERL_DIRS := $(shell cd perl_modules; find * -name '[A-Z]*' -type d| xargs) - PERL_MODS_PAT := *.pm $(PERL_DIRS:%=%/*.pm) - PERL_MODS := $(shell cd perl_modules; echo $(PERL_MODS_PAT)) From 9b6c17ad0172ec88bd8ea684b39bd2d38702894e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 1 Nov 2015 22:46:11 +0100 Subject: [PATCH 13/15] asterisk/dahdi-tools: Make it parsable on dora systems In dora we do not have autotools-brokensep. Do it the old way and set the B variable directly. At sysmocom we still use this layer for the very old Dora release. --- recipes-asterisk/asterisk/asterisk_13.5.0.bb | 5 ++++- recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes-asterisk/asterisk/asterisk_13.5.0.bb b/recipes-asterisk/asterisk/asterisk_13.5.0.bb index c912b3d1dd..ff71607cb9 100644 --- a/recipes-asterisk/asterisk/asterisk_13.5.0.bb +++ b/recipes-asterisk/asterisk/asterisk_13.5.0.bb @@ -17,7 +17,10 @@ SRC_URI[sha256sum] = "e8b8d071f783edea82de510194dd272070ffbb7cdb2f5f6b020be5d15b S = "${WORKDIR}/asterisk-${PV}" -inherit autotools-brokensep pkgconfig useradd update-rc.d +inherit autotools pkgconfig useradd update-rc.d + +# dora doesn't have autotools-brokensep. Still needed for sysmocom +B = "${S}" USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system -g asterisk --shell /bin/false asterisk" diff --git a/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb b/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb index 337186dfbd..7dec897f87 100644 --- a/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb +++ b/recipes-isdn/dahdi-tools/dahdi-tools_2.10.2.bb @@ -21,7 +21,9 @@ SRC_URI[sha256sum] = "9e904815dedab231084c542d2d7d5dcc832ebec4b5d5d999a5d757df8b S = "${WORKDIR}/${PN}-${PV}" -inherit autotools-brokensep pkgconfig perlnative cpan-base update-rc.d +inherit autotools pkgconfig perlnative cpan-base update-rc.d +# dora doesn't have autotools-brokensep. Still needed for sysmocom +B = "${S}" export DAHDI_PERLLIBDIR="${PERLLIBDIRS}/${@get_perl_version(d)}" From 2c54ce9af5f7c76fa9842ea51e535ff7472e111c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 7 Dec 2015 13:22:37 +0100 Subject: [PATCH 14/15] libosmo-abis: Build newer release for osmo-bts This adds RTP statistics support to libosmotrau. --- recipes-osmocom/libosmo-abis/libosmo-abis_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb index 8ea0c0527d..8010389286 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb +++ b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "3a580f263a24e0ce7d3ed544af0373c22ae9eeac" +SRCREV = "3cef39b03cb46de4a7aba65137d724a000b184cb" SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git" -PV = "0.3.1+gitr${SRCPV}" +PV = "0.3.2+gitr${SRCPV}" PR = "${INC_PR}.1" From a715416731955e0454fc88d439709c94afb4b1af Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 26 Dec 2015 18:48:41 +0100 Subject: [PATCH 15/15] libosmocore/libosmo-netif: Bump version needed for osmo-pcu --- conf/layer.conf | 2 +- recipes-osmocom/libosmo-netif/libosmo-netif_git.bb | 2 +- recipes-osmocom/libosmocore/libosmocore_git.bb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/layer.conf b/conf/layer.conf index d67459b3e6..da1f278dac 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -9,4 +9,4 @@ BBFILE_COLLECTIONS += "telephony" BBFILE_PATTERN_telephony = "^${LAYERDIR}/" BBFILE_PRIORITY_telephony = "5" -META_TELEPHONY_OSMO_INC = "17" +META_TELEPHONY_OSMO_INC = "18" diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb index 073f0abef8..bbfa7c07b9 100644 --- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb +++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "c55d867508c8ddb93a822c018b5ce5a9a72006aa" +SRCREV = "efb9af4dada5e2426e69d670f4549f8fec3c9cb2" SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git" PV = "0.4.0+gitr${SRCPV}" PR = "${INC_PR}.2" diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index c22076ccfe..e8db2bc99a 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,10 +1,10 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "c1cb75eff5b060da9e6d43521e4913a8bf4e74fc" +SRCREV = "70fcbda6dd733a503e9a046e01986d8bfc2e2bb2" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" -PV = "0.8.1+gitr${SRCPV}" -PR = "r2" +PV = "0.9.0+gitr${SRCPV}" +PR = "r0" PACKAGES =+ "libosmoctrl" FILES_libosmoctrl = "${libdir}/libosmoctrl${SOLIBS}"