Prevent an early load of the Astribank (xpp) drivers at initrd time, as
they require some files from the root filesystem.
This installs a file in the dracut configuration directory that will
take effect the next time dracut generates an initrd image.
This installs an configuration file for dracut which is ignored if
dracut is not installed and is a no-op if xpp_usb is not loaded on your
system.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This was originally done in the init script after all Astribanks were
connected. But now there is no single point in the startup sequence
where we can guarantee all of them were loaded.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
In file's output Perl scripts may be 'awk or perl script',
'/usr/bin/perl script' or 'Perl script' (with some minor variants). The
latter was not detected by current code and thus perld man pages were
not created.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* While technically Git can support $ID keywords, in practice they are not
used.
* GCC now give a warning about ''rcsid' defined but not used' for some
of those.
Let's just remove the unused rcsid.
* Otherwise, they pull compilation of xpp tools via implicit rules.
* This breaks build without libusb/libusbx
* To test this scenario:
./configure .... --without-libusb --without-libusbx
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
* So they are always included in 'make dist' even if PBX_USB is false.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* The file is defined as XTALK_OPTIONS_FILE (/etc/dahdi/xpp.conf):
- Lines beginning with '#' are skipped.
- Line beginning with "XTALK_OPTIONS" are used.
- Anything after whitespaces (with optional "=" characters) is part
of the value.
* An environment variable named "XTALK_OPTIONS" may override file contents.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Build new libxtalk as local convenience library
* Have new mpptalk.[ch] and astribank.[ch] wrap the new API
* Modify all tools to use the new API
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Do not remove yet the old ones.
* So new files are built, but not used yet.
* Build as a "noinst_" convenience library.
* Also, compile with '-Wno-unknown-pragmas' because we use some pragmas.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Use pkg-config
* For tight control have: --with-libusbx, --with-libusb
- For now, we choose libusb (AKA libusb-0.1)
- After committing support for libusbx (AKA libusb-1.0)
we'll change the default.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Allow firmware loading to take much longer (up to 180 seconds) before
it is killed. The default timeout is 30 seconds.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Exposed in twinstar setups where dahdi has auto_assign_spans=1:
* We start configuration with an empty /etc/dahdi/xpp_order
* If "XPP_HOTPLUG_DAHDI=yes", the astribank_hook removes
the asterisk_is_starting semaphore too early.
* There's no point in waiting for non-existant or empty /etc/dahdi/xpp_order
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
gcc 5 found this with the new -Werror=logical-not-parenthesis warning. Since we
have -Wall by default, it would also fail the compile.
Internal-Issue-ID: DAHLIN-347
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
* Fix distcheck by having all the targets installed under $prefix
* But by default (no prefix or prefix=/usr), revert to older pathes:
- /etc/dahdi
- udev rules in /etc/udev/rules.d
- perl in perl sitelib
- man pages in /usr/share/man
* Add configure options:
--with-udevrules= (e.g.: /lib/udev/rules.d)
--with-perllib= (e.g.: `perl -V:vendorlib)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Install to $datadir/dahdi and not $datadir/dahdi-tools
* Install to $includedir/dahdi and not $includedir/dahdi-tools
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Fix small compile warnings (which are now errors):
- hdlcgen.c
- hdlcstress.c (remove return value which isn't checked)
- patlooptest.c
* Also added dev-mode to xpp with relevant compile fixes.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Set udev installation directory to $sysconfdir/udev/rules.d
* Add definitions to xpp/Makefile.am and remove them from xpp/Makefile.legacy
* TODO: add "--with-udev-rulesdir=" for packagers (/lib/udev/rules.d)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Now man-pages and perl-script are handled by xpp/Makefile.am
* Removed from xpp/Makefile.legacy
* Detect perl and set perllibdir in configure.ac
* Handle modules in their own xpp/perl_modules/Makefile.am
* Enclose perl-related stuff in conditional
* Updates for "make dist"
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Added xpp/oct612x/Makefile.am:
- Compile octasic sources into a convenience library (static, not installed)
- Set OCTASIC_CFLAGS in configure.ac, as they are used in two
Makefile.am's
- Added relevant Makefile.in and Makefile into build_tools/make_dist
* In xpp/Makefile.am:
- Have USE_OCTASIC conditional (currently configure.ac always set it to true)
* Added PBX_USB automake conditional, so we only build our tools if
configure'd for libusb.
* Create two convenience libraries (libastribank and libecholoader)
Statically link them into our tools.
* Handle man-pages for the tools.
* Remove all new functionality from xpp/Makefile.legacy -- it now
contains:
- All perl related tools and man-pages
- Other misc stuff (udev files, etc.)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Added needed boilerplate to configure.ac
* Wrap original Makefile's with automake:
- Renamed all original Makefile -> Makefile.legacy
- Force automake generated Makefile to call Makefile.legacy:
Currently handle: all, install, clean, distclean, dist, docs, config
- Note: our temporary 'dist' target conflicts with automake 'dist' target.
* Temporarily added extra dist files into build_tools/make_dist
(until we move "make dist" functionality into automake)
* For now, we don't try to compile ppp/ as it wasn't compiled
from the top-level Makefile before.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
If we have /etc/dahdi/span-types.conf but it doesn't have any
line, we should avoid using the option -S to astribank_hexload.
Fix the test for this.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Don't run the final astribank_is_starting if asterisk is hotpluggable.
Likewise, if there's no xpp_order file, waiting is pointless as the hook
can't count Astribanks.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* 'time' was added here for debugging and never actually needed.
* It actually causes a minor bashism issue.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* New asynchronous behavior is used only when two conditions are met:
- Finding new $ASTERISK_SUPPORTS_DAHDI_HOTPLUG=yes in /etc/dahdi/init.conf
This should be set only when Asterisk support hotplug and configured
to use it (no_failed_channels==1).
- DAHDI auto_assign_spans==0
* Adapt /usr/share/dahdi/astribank_hook:
- Refactor old twinstar behavior into functions
- Add new behavior in a function (just enable the Asrribank watchdog)
- Call the correct function.
* Adapt init script:
If asynchronous behavior is on, don't wait for all Astribanks to
finish initialization (it's enough that we saw all/some of them)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Do print a message if no semaphore exists. It means that either there
are no Astribanks, or existing Astribanks were already initialized.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Why:
* Doing "clear_halt" is normally the right thing to do on startup.
* The original observed problem is better fixed via USB bios settings.
* Defaulting to no "clear_halt" cause more problems on other platform
combinations (hardware/kernel).
The change:
* We now reverted to do "clear_halt" by default.
* The XTALK_OPTIONS may now contain either "use-clear-halt" (the default)
or "no-use-clear-halt" to override for debugging/testing.
Original commit: ca7c04e9cb
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
DAHDI 2.9.2 added support for -S (span specs). However if this option
was not specified, it fails to run.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The variable 'default_law' was the result of a partial renaming of the
original variable 'law'. Let's keep all of them in sync.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>