2012-04-27 15:44:27 +00:00
|
|
|
DESCRIPTION = "sysmocom OsmoBTS"
|
|
|
|
LICENSE = "AGPLv3"
|
|
|
|
LIC_FILES_CHKSUM="file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
|
|
|
|
|
2015-12-07 12:24:21 +00:00
|
|
|
SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=sysmocom/0.3.5-stable;name=osmobts;destsuffix=git \
|
2017-03-29 17:57:57 +00:00
|
|
|
git://git.osmocom.org/openbsc;protocol=git;branch=master;name=openbsc;destsuffix=openbsc \
|
|
|
|
file://gcc6-linking-fix.patch"
|
2017-06-11 08:19:21 +00:00
|
|
|
SRC_URI_append_sysmobts2100 = " file://osmo-bts-lc15.service"
|
2017-06-02 12:59:05 +00:00
|
|
|
SRCREV_osmobts = "a4bd813081e788012c72f34d31150cdf02db307f"
|
2015-06-26 08:26:03 +00:00
|
|
|
SRCREV_openbsc = "57ee78078905c7499bd4e6857f8981d22badfcac"
|
2014-07-30 10:46:53 +00:00
|
|
|
PV = "0.4.3+git${SRCPV}"
|
2017-06-11 08:19:21 +00:00
|
|
|
PR = "r19.${META_TELEPHONY_OSMO_INC}"
|
2012-04-27 15:44:27 +00:00
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
|
|
|
|
SRCREV_FORMAT = "openbsc-rosmobts"
|
2017-06-11 08:19:21 +00:00
|
|
|
|
2015-01-11 20:32:37 +00:00
|
|
|
DEPENDS = "libosmocore libosmo-abis femtobts-api gpsd"
|
2017-06-11 08:19:21 +00:00
|
|
|
DEPENDS_append_sysmobts-v2 = " femtobts-api"
|
|
|
|
DEPENDS_append_sysmobts2100 = " lc15-firmware"
|
|
|
|
|
|
|
|
RDEPENDS_${PN} += "coreutils"
|
|
|
|
|
|
|
|
RDEPENDS_${PN}_append_sysmobts-v2 = " sysmobts-firmware (>= 5.1)"
|
|
|
|
RCONFLICTS_${PN}_append_sysmobts-v2 = " sysmobts-firmware (< 5.1)"
|
|
|
|
|
|
|
|
RDEPENDS_${PN}_append_sysmobts2100 = " lc15-firmware"
|
2012-04-27 15:44:27 +00:00
|
|
|
|
2017-06-11 08:19:21 +00:00
|
|
|
EXTRA_OECONF_sysmobts-v2 += "--enable-sysmocom-bts"
|
|
|
|
EXTRA_OECONF_sysmobts2100 += "--enable-litecell15"
|
2012-04-27 15:44:27 +00:00
|
|
|
|
2014-09-26 09:24:49 +00:00
|
|
|
inherit autotools update-rc.d pkgconfig
|
|
|
|
|
2012-04-27 15:44:27 +00:00
|
|
|
|
|
|
|
# Select the API version
|
|
|
|
inherit femtobts_api
|
2017-06-11 08:19:21 +00:00
|
|
|
CPPFLAGS_append_sysmobts-v2 = " ${BTS_HW_VERSION} "
|
2012-04-27 15:44:27 +00:00
|
|
|
|
|
|
|
do_configure_prepend() {
|
2015-02-16 22:15:54 +00:00
|
|
|
ln -sf ../openbsc openbsc || true
|
2012-04-27 15:44:27 +00:00
|
|
|
}
|
|
|
|
|
2012-11-18 10:31:38 +00:00
|
|
|
do_compile_append_sysmobts-v2() {
|
2012-07-09 22:17:15 +00:00
|
|
|
cd ${S}/contrib/sysmobts-calib/
|
|
|
|
oe_runmake
|
|
|
|
}
|
|
|
|
|
2012-04-27 15:44:27 +00:00
|
|
|
do_install_append() {
|
|
|
|
install -d ${D}${sysconfdir}/osmocom
|
2017-06-11 08:19:21 +00:00
|
|
|
|
|
|
|
# Future sysmobts-mgr handling
|
|
|
|
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
|
|
|
install -m 0660 ${S}/doc/examples/sysmobts-mgr.cfg ${D}${sysconfdir}/osmocom
|
|
|
|
install -m 0644 ${S}/contrib/sysmobts-mgr.service ${D}${systemd_unitdir}/system/
|
|
|
|
ln -sf ../sysmobts-mgr.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install_append_sysmobts-v2() {
|
|
|
|
install -m 0755 ${S}/contrib/sysmobts-calib/sysmobts-calib ${D}${bindir}/
|
|
|
|
|
|
|
|
install -m 0660 ${S}/doc/examples/sysmo/osmo-bts.cfg ${D}${sysconfdir}/osmocom
|
|
|
|
|
|
|
|
# old sysv init
|
2012-04-27 15:44:27 +00:00
|
|
|
install -m 0755 ${S}/contrib/respawn.sh ${D}${sysconfdir}/osmocom/
|
2013-01-11 16:45:18 +00:00
|
|
|
install -m 0755 ${S}/contrib/respawn-only.sh ${D}${sysconfdir}/osmocom/
|
2012-04-27 15:44:27 +00:00
|
|
|
install -m 0644 ${S}/contrib/screenrc-sysmobts ${D}${sysconfdir}/osmocom/
|
|
|
|
install -d ${D}${sysconfdir}/init.d
|
|
|
|
install -m 0755 ${S}/contrib/sysmobts.init ${D}${sysconfdir}/init.d/sysmobts
|
2012-07-09 22:17:15 +00:00
|
|
|
|
2013-02-09 15:58:56 +00:00
|
|
|
# Install systemd and enable on sysinit
|
|
|
|
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
|
|
|
install -m 0644 ${S}/contrib/sysmobts.service ${D}${systemd_unitdir}/system/
|
|
|
|
ln -sf ../sysmobts.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
2012-11-18 10:31:38 +00:00
|
|
|
}
|
|
|
|
|
2017-06-11 08:19:21 +00:00
|
|
|
do_install_append_sysmobts2100() {
|
|
|
|
install -m 0660 ${S}/doc/examples/litecell15/osmo-bts.cfg ${D}${sysconfdir}/osmocom
|
|
|
|
|
|
|
|
# ensure consistent naming
|
|
|
|
mv ${D}/${bindir}/lc15bts-util ${D}/${bindir}/sysmobts-util
|
|
|
|
mv ${D}/${bindir}/lc15bts-mgr ${D}/${bindir}/sysmobts-mgr
|
|
|
|
|
|
|
|
# Install systemd and enable on sysinit
|
|
|
|
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
|
|
|
install -m 0644 ${WORKDIR}/osmo-bts-lc15.service ${D}${systemd_unitdir}/system/
|
|
|
|
ln -sf ../osmo-bts-lc15.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
|
2012-04-27 15:44:27 +00:00
|
|
|
}
|
|
|
|
|
2017-06-11 08:19:21 +00:00
|
|
|
|
2012-04-27 15:44:27 +00:00
|
|
|
CONFFILES_${PN} = "${sysconfdir}/osmocom/osmo-bts.cfg"
|
2017-06-11 08:19:21 +00:00
|
|
|
CONFFILES_${PN}_append_sysmobts-v2 = " ${sysconfdir}/osmocom/sysmobts-mgr.cfg"
|
2012-04-27 15:44:27 +00:00
|
|
|
INITSCRIPT_PACKAGES = "${PN}"
|
2017-06-11 08:19:21 +00:00
|
|
|
INITSCRIPT_NAME_${PN}_sysmobts-2 = "sysmobts"
|
|
|
|
INITSCRIPT_PARAMS_${PN}_sysmobts-v2 = "defaults 30 30"
|
2012-04-27 15:44:27 +00:00
|
|
|
|
2017-06-11 08:19:21 +00:00
|
|
|
# somehow it seems not posible to use _append constructs on PACKAGES
|
|
|
|
#PACKAGES_append_sysmobts-v2 = " osmo-bts-remote sysmobts-calib sysmobts-util"
|
2013-10-04 19:40:30 +00:00
|
|
|
PACKAGES =+ "osmo-bts-remote sysmobts-calib sysmobts-util"
|
2012-04-27 15:44:27 +00:00
|
|
|
|
2013-02-09 15:58:56 +00:00
|
|
|
FILES_${PN} += "${systemd_unitdir}"
|
2017-06-11 08:19:21 +00:00
|
|
|
FILES_osmo-bts-remote_sysmobts-v2 = " ${bindir}/osmo-bts-sysmo-remote "
|
|
|
|
FILES_sysmobts-calib_sysmobts-v2 = " ${bindir}/sysmobts-calib "
|
2013-10-04 19:40:30 +00:00
|
|
|
FILES_sysmobts-util = " ${bindir}/sysmobts-util "
|