src: use new libosmogsm and include/osmocom/[gsm|core] path to headers

This patch changes include paths to get osmocom-bb working with
the current libosmocore tree.

Among all these renames, you can notice several tweaks that I
added on purpose, and that require some explanation, they are:

* hexdump() in osmocon.c and osmoload.c has been renamed to avoid
clashing with hexdump() defined in libosmocore.

* gsmmap now depends on libosmogsm. Actually I had to cleanup
Makefile.am because I was experiencing weird linking problems,
probably due to a bug in the autotools. With the change included
in this patch, I got it compiled and linked here correctly.

This patch has been tested with the phone Motorola C123 and the
following images files:

* firmware/board/compal_e88/hello_world.compalram.bin
* firmware/board/compal_e88/layer1.compalram.bin

Using the osmocon, bcch_scan and mobile tools.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
This commit is contained in:
Pablo Neira Ayuso 2011-04-26 02:55:30 +02:00
parent f0059596a2
commit ade79a0083
89 changed files with 212 additions and 210 deletions

View File

@ -2,8 +2,8 @@
#define _OSMOCORE_RSL_H
#include <stdint.h>
#include <osmocore/utils.h>
#include <osmocore/protocol/gsm_08_58.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
void rsl_init_rll_hdr(struct abis_rsl_rll_hdr *dh, uint8_t msg_type);

View File

@ -12,8 +12,10 @@ CROSS_TOOL_PREFIX=$(CROSS_HOST)-
TOPDIR=$(shell pwd)
OSMOCORE_CONFIGURE_ENV= LIBOSMOCORE_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/.libs/libosmocore.a \
LIBOSMOVTY_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/vty/.libs/libosmovty.a \
LIBOSMOGSM_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/gsm/.libs/libosmogsm.a \
LIBOSMOCORE_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include \
LIBOSMOVTY_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include
LIBOSMOVTY_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include \
LIBOSMOGSM_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include
all: libosmocore-target nofirmware firmware
nofirmware: libosmocore-host layer23 osmocon gsmmap

View File

@ -7,12 +7,11 @@ $(top_srcdir)/.version:
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
INCLUDES = $(all_includes) -I$(top_srcdir)/include
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
INCLUDES = $(all_includes) -I../layer23/include -DHOST_BUILD
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
sbin_PROGRAMS = gsmmap
INCLUDES += -I../layer23/include -DHOST_BUILD
gsmmap_SOURCES = gsmmap.c geo.c locate.c log.c ../layer23/src/common/sysinfo.c ../layer23/src/common/networks.c
gsmmap_LDADD = $(LIBOSMOCORE_LIBS) -lm
gsmmap_LDADD = $(LIBOSMOGSM_LIBS) $(LIBOSMOCORE_LIBS) -lm

View File

@ -15,6 +15,7 @@ AC_PROG_INSTALL
dnl checks for libraries
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm)
dnl checks for header files
AC_HEADER_STDC

View File

@ -15,6 +15,7 @@ AC_PROG_RANLIB
dnl checks for libraries
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm)
AC_CHECK_LIB(gps, gps_waiting, CFLAGS+=" -D_HAVE_GPSD" LDFLAGS+=" -lgps",,)
dnl checks for header files

View File

@ -1,7 +1,7 @@
#ifndef osmocom_l1ctl_h
#define osmocom_l1ctl_h
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
struct osmocom_ms;

View File

@ -3,8 +3,8 @@
#include <stdint.h>
#include <osmocore/timer.h>
#include <osmocore/msgb.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/msgb.h>
#include <l1ctl_proto.h>

View File

@ -2,7 +2,7 @@
#define _LOGGING_H
#define DEBUG
#include <osmocore/logging.h>
#include <osmocom/core/logging.h>
enum {
DRSL,

View File

@ -1,9 +1,9 @@
#ifndef osmocom_data_h
#define osmocom_data_h
#include <osmocore/select.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/write_queue.h>
#include <osmocom/core/select.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/write_queue.h>
struct osmocom_ms;

View File

@ -1,7 +1,7 @@
#ifndef _SYSINFO_H
#define _SYSINFO_H
#include <osmocore/gsm48_ie.h>
#include <osmocom/gsm/gsm48_ie.h>
/* collection of system information of the current cell */

View File

@ -1,7 +1,7 @@
#ifndef _OSMOCOM_L3_H
#define _OSMOCOM_L3_H
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
int gsm48_rx_ccch(struct msgb *msg, struct osmocom_ms *ms);

View File

@ -1,7 +1,7 @@
#ifndef _OSMOCOM_RSLMS_H
#define _OSMOCOM_RSLMS_H
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
/* From L3 into RSLMS (direction -> L2) */

View File

@ -1,7 +1,7 @@
#ifndef _GSM48_RR_H
#define _GSM48_RR_H
#include "osmocore/protocol/gsm_04_08.h"
#include <osmocom/gsm/protocol/gsm_04_08.h>
#define GSM_TA_CM 55385

View File

@ -26,8 +26,8 @@
#ifndef _MNCC_H
#define _MNCC_H
#include <osmocore/linuxlist.h>
#include <osmocore/mncc.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/gsm/mncc.h>
struct gsm_call {
struct llist_head entry;

View File

@ -1,7 +1,7 @@
#ifndef _TRANSACT_H
#define _TRANSACT_H
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
/* One transaction */
struct gsm_trans {

View File

@ -1,5 +1,5 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
noinst_LIBRARIES = liblayer23.a
liblayer23_a_SOURCES = l1ctl.c l1l2_interface.c sap_interface.c lapdm.c \

View File

@ -32,7 +32,7 @@
#include <gps.h>
#endif
#include <osmocore/utils.h>
#include <osmocom/core/utils.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/logging.h>

View File

@ -30,16 +30,16 @@
#include <l1ctl_proto.h>
#include <osmocore/signal.h>
#include <osmocore/logging.h>
#include <osmocore/timer.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/gsmtap_util.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocore/protocol/gsm_08_58.h>
#include <osmocore/rsl.h>
#include <osmocom/core/signal.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/gsmtap_util.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/bb/common/l1ctl.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -26,7 +26,7 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/l1l2_interface.h>
#include <osmocore/utils.h>
#include <osmocom/core/utils.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -56,14 +56,14 @@
#include <errno.h>
#include <arpa/inet.h>
#include <osmocore/logging.h>
#include <osmocore/timer.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <osmocore/utils.h>
#include <osmocore/rsl.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocore/protocol/gsm_08_58.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/l1ctl.h>

View File

@ -21,8 +21,8 @@
*/
#include <osmocore/utils.h>
#include <osmocore/logging.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/logging.h>
#include <osmocom/bb/common/logging.h>
static const struct log_info_cat default_categories[] = {

View File

@ -30,12 +30,12 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/l23_app.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <osmocore/select.h>
#include <osmocore/linuxlist.h>
#include <osmocore/gsmtap_util.h>
#include <osmocore/utils.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/select.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/gsmtap_util.h>
#include <osmocom/core/utils.h>
#include <arpa/inet.h>

View File

@ -26,7 +26,7 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/sap_interface.h>
#include <osmocore/utils.h>
#include <osmocom/core/utils.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -22,8 +22,8 @@
#include <stdint.h>
#include <errno.h>
#include <arpa/inet.h>
#include <osmocore/talloc.h>
#include <osmocore/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/utils.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <arpa/inet.h>
#include <osmocore/bitvec.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/networks.h>

View File

@ -1,6 +1,6 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS)
LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
bin_PROGRAMS = bcch_scan ccch_scan echo_test cell_log cbch_sniff

View File

@ -28,10 +28,10 @@
#include <osmocom/bb/common/l23_app.h>
#include <osmocom/bb/misc/layer3.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <osmocore/select.h>
#include <osmocore/signal.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/select.h>
#include <osmocom/core/signal.h>
static int signal_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)

View File

@ -29,11 +29,11 @@
#include <osmocom/bb/common/l23_app.h>
#include <osmocom/bb/misc/layer3.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <osmocore/select.h>
#include <osmocore/signal.h>
#include <osmocore/rsl.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/select.h>
#include <osmocom/core/signal.h>
#include <osmocom/gsm/rsl.h>
struct osmocom_ms *g_ms;
struct gsm48_sysinfo g_sysinfo = {};

View File

@ -24,13 +24,13 @@
#include <errno.h>
#include <stdio.h>
#include <osmocore/msgb.h>
#include <osmocore/rsl.h>
#include <osmocore/tlv.h>
#include <osmocore/gsm48_ie.h>
#include <osmocore/gsm48.h>
#include <osmocore/signal.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/gsm48_ie.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/signal.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/lapdm.h>

View File

@ -32,8 +32,8 @@
#include <osmocom/bb/common/gps.h>
#include <osmocom/bb/misc/cell_log.h>
#include <osmocore/talloc.h>
#include <osmocore/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/utils.h>
extern struct log_target *stderr_target;
extern void *l23_ctx;

View File

@ -28,9 +28,9 @@
#include <osmocom/bb/common/l23_app.h>
#include <osmocom/bb/misc/layer3.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <osmocore/select.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/select.h>
static struct {

View File

@ -27,16 +27,16 @@
#include <l1ctl_proto.h>
#include <osmocore/logging.h>
#include <osmocore/talloc.h>
#include <osmocore/signal.h>
#include <osmocore/timer.h>
#include <osmocore/msgb.h>
#include <osmocore/tlv.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocore/protocol/gsm_08_58.h>
#include <osmocore/rsl.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/signal.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/bb/common/l1ctl.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -29,13 +29,13 @@
#include <l1ctl_proto.h>
#include <osmocore/logging.h>
#include <osmocore/timer.h>
#include <osmocore/signal.h>
#include <osmocore/msgb.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocore/rsl.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/signal.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/bb/common/l1ctl.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -24,10 +24,10 @@
#include <errno.h>
#include <stdio.h>
#include <osmocore/msgb.h>
#include <osmocore/rsl.h>
#include <osmocore/tlv.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/lapdm.h>

View File

@ -1,6 +1,6 @@
INCLUDES = $(all_includes) -I$(top_srcdir)/include
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS)
LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS)
noinst_LIBRARIES = libmobile.a
libmobile_a_SOURCES = gsm322.c gsm48_cc.c gsm48_mm.c gsm48_rr.c \

View File

@ -37,10 +37,10 @@
#include <osmocom/bb/mobile/mncc.h>
#include <osmocom/vty/telnet_interface.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <osmocore/select.h>
#include <osmocore/signal.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/select.h>
#include <osmocom/core/signal.h>
extern void *l23_ctx;
extern struct llist_head ms_list;

View File

@ -26,11 +26,11 @@
#include <stdlib.h>
#include <limits.h>
#include <osmocore/msgb.h>
#include <osmocore/talloc.h>
#include <osmocore/utils.h>
#include <osmocore/gsm48.h>
#include <osmocore/signal.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/signal.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/l1ctl.h>

View File

@ -25,10 +25,10 @@
#include <string.h>
#include <stdlib.h>
#include <osmocore/msgb.h>
#include <osmocore/utils.h>
#include <osmocore/gsm48.h>
#include <osmocore/talloc.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -26,10 +26,10 @@
#include <stdlib.h>
#include <arpa/inet.h>
#include <osmocore/msgb.h>
#include <osmocore/utils.h>
#include <osmocore/gsm48.h>
#include <osmocore/talloc.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -66,11 +66,11 @@
#include <stdlib.h>
#include <arpa/inet.h>
#include <osmocore/msgb.h>
#include <osmocore/utils.h>
#include <osmocore/rsl.h>
#include <osmocore/gsm48.h>
#include <osmocore/bitvec.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/l1l2_interface.h>

View File

@ -25,10 +25,10 @@
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/mobile/app_mobile.h>
#include <osmocore/talloc.h>
#include <osmocore/linuxlist.h>
#include <osmocore/gsmtap_util.h>
#include <osmocore/signal.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/gsmtap_util.h>
#include <osmocom/core/signal.h>
#include <arpa/inet.h>

View File

@ -25,7 +25,7 @@
#include <string.h>
#include <stdlib.h>
#include <osmocore/talloc.h>
#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -22,7 +22,7 @@
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <osmocore/talloc.h>
#include <osmocom/core/talloc.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -23,8 +23,8 @@
#include <errno.h>
#include <string.h>
#include <arpa/inet.h>
#include <osmocore/talloc.h>
#include <osmocore/comp128.h>
#include <osmocom/core/talloc.h>
#include <osmocom/gsm/comp128.h>
#include <osmocom/bb/common/logging.h>
#include <osmocom/bb/common/osmocom_data.h>

View File

@ -21,9 +21,9 @@
#include <stdint.h>
#include <osmocore/talloc.h>
#include <osmocore/timer.h>
#include <osmocore/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/msgb.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/logging.h>

View File

@ -25,10 +25,10 @@
#include <unistd.h>
#include <sys/types.h>
#include <osmocore/utils.h>
#include <osmocore/gsm48.h>
#include <osmocore/talloc.h>
#include <osmocore/signal.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm48.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/signal.h>
#include <osmocom/bb/common/osmocom_data.h>
#include <osmocom/bb/common/networks.h>

View File

@ -39,10 +39,10 @@
#include <sercomm.h>
#include <osmocore/linuxlist.h>
#include <osmocore/select.h>
#include <osmocore/talloc.h>
#include <osmocore/timer.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/select.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <arpa/inet.h>
@ -447,7 +447,7 @@ int read_file(const char *filename)
return 0;
}
static void hexdump(const uint8_t *data, unsigned int len)
static void osmocon_hexdump(const uint8_t *data, unsigned int len)
{
int n;
@ -754,7 +754,7 @@ static void hdlc_send_to_phone(uint8_t dlci, uint8_t *data, int len)
if(dnload.dump_tx) {
printf("hdlc_send(dlci=%u): ", dlci);
hexdump(data, len);
osmocon_hexdump(data, len);
}
if (len > 512) {
@ -792,7 +792,7 @@ static void hdlc_tool_cb(uint8_t dlci, struct msgb *msg)
if(dnload.dump_rx) {
printf("hdlc_recv(dlci=%u): ", dlci);
hexdump(msg->data, msg->len);
osmocon_hexdump(msg->data, msg->len);
}
if(srv) {
@ -832,7 +832,7 @@ static int handle_buffer(int buf_used_len)
if (!dnload.expect_hdlc) {
printf("got %i bytes from modem, ", nbytes);
printf("data looks like: ");
hexdump(bufptr, nbytes);
osmocon_hexdump(bufptr, nbytes);
} else {
for (i = 0; i < nbytes; ++i)
if (sercomm_drv_rx_char(bufptr[i]) == 0)

View File

@ -35,10 +35,10 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <osmocore/msgb.h>
#include <osmocore/select.h>
#include <osmocore/timer.h>
#include <osmocore/crc16.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/select.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/crc16.h>
#include <loader/protocol.h>
@ -146,7 +146,7 @@ static int version(const char *name)
exit(2);
}
static void hexdump(const uint8_t *data, unsigned int len)
static void osmoload_hexdump(const uint8_t *data, unsigned int len)
{
const uint8_t *bufptr = data;
const uint8_t const *endptr = bufptr + len;
@ -190,7 +190,7 @@ loader_send_request(struct msgb *msg) {
if(osmoload.print_requests) {
printf("Sending %d bytes:\n", msg->len);
hexdump(msg->data, msg->len);
osmoload_hexdump(msg->data, msg->len);
}
rc = write(connection.fd, &len, sizeof(len));
@ -277,7 +277,7 @@ static void
loader_handle_reply(struct msgb *msg) {
if(osmoload.print_replies) {
printf("Received %d bytes:\n", msg->len);
hexdump(msg->data, msg->len);
osmoload_hexdump(msg->data, msg->len);
}
uint8_t cmd = msgb_get_u8(msg);
@ -338,7 +338,7 @@ loader_handle_reply(struct msgb *msg) {
break;
default:
printf("Received unknown reply %d:\n", cmd);
hexdump(msg->data, msg->len);
osmoload_hexdump(msg->data, msg->len);
osmoload.quit = 1;
return;
}
@ -364,7 +364,7 @@ loader_handle_reply(struct msgb *msg) {
break;
case LOADER_MEM_READ:
printf("Received memory dump of %d bytes at 0x%x:\n", length, address);
hexdump(data, length);
osmoload_hexdump(data, length);
break;
case LOADER_MEM_WRITE:
printf("Confirmed memory write of %d bytes at 0x%x.\n", length, address);

View File

@ -24,7 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
/* TPU disassembler begin */

View File

@ -68,8 +68,7 @@ RF_OBJS=rf/trf6151.o
# Objects that go in all applications
ANY_APP_OBJS+=$(ABB_OBJS) $(RF_OBJS) $(DISPLAY_OBJS) $(FLASH_OBJS)
ANY_APP_LIBS+=calypso/libcalypso.a layer1/liblayer1.a lib/libmini.a comm/libcomm.a ../../shared/libosmocore/build-target/src/.libs/libosmocore.a
ANY_APP_LIBS+=calypso/libcalypso.a layer1/liblayer1.a lib/libmini.a comm/libcomm.a ../../shared/libosmocore/build-target/src/.libs/libosmocore.a ../../shared/libosmocore/build-target/src/gsm/.libs/libosmogsm.a
# Libraries are defined in subdirectories
-include calypso/Makefile

View File

@ -33,7 +33,7 @@
#include <console.h>
#include <manifest.h>
#include <osmocore/crc16.h>
#include <osmocom/core/crc16.h>
#include <abb/twl3025.h>
#include <rf/trf6151.h>

View File

@ -21,7 +21,7 @@
*/
#include <stdint.h>
#include <osmocore/utils.h>
#include <osmocom/core/utils.h>
/* GSM900 ARFCN 33, Measurements by Steve Markgraf / May 2010 */
const int16_t dbm2apc_gsm900[] = {

View File

@ -21,7 +21,7 @@
*/
#include <stdint.h>
#include <osmocore/utils.h>
#include <osmocom/core/utils.h>
/* GSM900 ARFCN 33, Measurements by Steve Markgraf / May 2010 */
/* FIXME those are from compal ... need real GTA calibration */

View File

@ -21,7 +21,7 @@
*/
#include <stdint.h>
#include <osmocore/utils.h>
#include <osmocom/core/utils.h>
/* GSM900 ARFCN 33, Measurements by Steve Markgraf / May 2010 */
/* FIXME those are from the Compal phones, do measurements with the DP-L10 */

View File

@ -34,7 +34,7 @@
#include <abb/twl3025.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#define REG_API_CONTROL 0xfffe0000

View File

@ -26,7 +26,7 @@
#include <debug.h>
#include <delay.h>
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <calypso/backlight.h>

View File

@ -24,7 +24,7 @@
#include <stdio.h>
#include <errno.h>
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#ifdef HOST_BUILD
#define SERCOMM_RX_MSG_SIZE 2048
@ -39,7 +39,7 @@
#else
#define SERCOMM_RX_MSG_SIZE 256
#include <debug.h>
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
#include <asm/system.h>
#include <comm/sercomm.h>

View File

@ -29,7 +29,7 @@
#include <calypso/uart.h>
#include <console.h>
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <comm/sercomm.h>
#include <comm/sercomm_cons.h>

View File

@ -20,7 +20,7 @@
#include <stdint.h>
#include <debug.h>
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
#include <comm/timer.h>

View File

@ -20,7 +20,7 @@
*
*/
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
#include <console.h>
struct msgb {

View File

@ -3,7 +3,7 @@
/* SERCOMM layer on UART1 (modem UART) */
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#define SERCOMM_UART_NR 1

View File

@ -23,7 +23,7 @@
#include <sys/time.h>
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
/**
* Timer management:

View File

@ -1,7 +1,7 @@
#ifndef _L1_ASYNC_H
#define _L1_ASYNC_H
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <layer1/mframe_sched.h>

View File

@ -2,7 +2,7 @@
#define _L1_L23_API_H
#include <stdint.h>
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <l1ctl_proto.h>
void l1a_l23api_init(void);

View File

@ -2,7 +2,7 @@
#define _L1_SCHED_GSMTIME_H
#include <stdint.h>
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
struct sched_gsmtime_event {
struct llist_head list;

View File

@ -1,8 +1,8 @@
#ifndef _L1_SYNC_H
#define _L1_SYNC_H
#include <osmocore/linuxlist.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/tdma_sched.h>
#include <layer1/mframe_sched.h>
#include <l1ctl_proto.h>

View File

@ -1,7 +1,7 @@
#ifndef _TRF6151_H
#define _TRF6151_H
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
/* initialize (reset + power up) */
void trf6151_init(uint8_t tsp_uid, uint16_t tsp_reset_id);

View File

@ -1,7 +1,7 @@
#ifndef _RFFE_H
#define _RFFE_H
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
extern const uint8_t system_inherent_gain;

View File

@ -24,7 +24,7 @@
#include <stdio.h>
#include <debug.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/afc.h>
#include <layer1/avg.h>

View File

@ -23,7 +23,7 @@
#include <stdint.h>
#include <stdio.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <debug.h>
#include <rffe.h>

View File

@ -22,8 +22,8 @@
#include <errno.h>
#include <osmocore/utils.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/apc.h>

View File

@ -26,8 +26,8 @@
#include <arm.h>
#include <asm/system.h>
#include <osmocore/msgb.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <layer1/sync.h>
#include <layer1/async.h>

View File

@ -29,8 +29,8 @@
#include <debug.h>
#include <byteorder.h>
#include <osmocore/msgb.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <comm/sercomm.h>
#include <layer1/sync.h>

View File

@ -26,7 +26,7 @@
#include <debug.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/prim.h>
#include <layer1/sync.h>

View File

@ -30,8 +30,8 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -29,8 +29,8 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -29,8 +29,8 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -30,8 +30,8 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -29,8 +29,8 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -30,9 +30,9 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -30,8 +30,8 @@
#include <debug.h>
#include <memory.h>
#include <byteorder.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -22,7 +22,7 @@
#include <stdint.h>
#include <osmocore/msgb.h>
#include <osmocom/core/msgb.h>
#include <layer1/sync.h>

View File

@ -22,7 +22,7 @@
#include <stdint.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/sync.h>

View File

@ -24,7 +24,7 @@
#include <errno.h>
#include <debug.h>
#include <osmocore/linuxlist.h>
#include <osmocom/core/linuxlist.h>
#include <layer1/tdma_sched.h>
#include <layer1/sched_gsmtime.h>

View File

@ -33,8 +33,8 @@
#include <byteorder.h>
#include <asm/system.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/msgb.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/core/msgb.h>
#include <calypso/dsp_api.h>
#include <calypso/irq.h>
#include <calypso/tpu.h>

View File

@ -26,7 +26,7 @@
#include <defines.h>
#include <debug.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/tdma_sched.h>
#include <layer1/sync.h>

View File

@ -25,7 +25,7 @@
#include <stdio.h>
#include <debug.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/toa.h>
#include <layer1/avg.h>

View File

@ -26,7 +26,7 @@
#include <debug.h>
#include <memory.h>
#include <keypad.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <layer1/agc.h>
#include <rffe.h>

View File

@ -26,7 +26,7 @@
#include <debug.h>
#include <memory.h>
#include <keypad.h>
#include <osmocore/gsm_utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <calypso/tpu.h>
#include <calypso/tsp.h>