From: Pablo Neira Ayuso pablo@gnumonks.org
This patch gets osmocom-bb in sync with libosmocore 0.2.0.
Basically, I invoked git-subtree to get a fresh libosmocore tree (currently 0.2.0) and change all the include paths to point to the new osmocom/[core|gsm] directories.
You can get these changes from the pablo/libosmocore-updates branch.
Please, merge it!
Pablo Neira Ayuso (1): src: use new libosmogsm and include/osmocom/[gsm|core] path to headers
From: Pablo Neira Ayuso pablo@gnumonks.org
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 --- include/osmocore/rsl.h | 4 ++-- src/Makefile | 4 +++- src/host/gsmmap/Makefile.am | 7 +++---- src/host/gsmmap/configure.ac | 1 + src/host/layer23/configure.ac | 1 + src/host/layer23/include/osmocom/bb/common/l1ctl.h | 2 +- src/host/layer23/include/osmocom/bb/common/lapdm.h | 4 ++-- .../layer23/include/osmocom/bb/common/logging.h | 2 +- .../include/osmocom/bb/common/osmocom_data.h | 6 +++--- .../layer23/include/osmocom/bb/common/sysinfo.h | 2 +- src/host/layer23/include/osmocom/bb/misc/layer3.h | 2 +- src/host/layer23/include/osmocom/bb/misc/rslms.h | 2 +- .../layer23/include/osmocom/bb/mobile/gsm48_rr.h | 2 +- src/host/layer23/include/osmocom/bb/mobile/mncc.h | 4 ++-- .../include/osmocom/bb/mobile/transaction.h | 2 +- src/host/layer23/src/common/Makefile.am | 2 +- src/host/layer23/src/common/gps.c | 2 +- src/host/layer23/src/common/l1ctl.c | 20 ++++++++++---------- src/host/layer23/src/common/l1l2_interface.c | 2 +- src/host/layer23/src/common/lapdm.c | 16 ++++++++-------- src/host/layer23/src/common/logging.c | 4 ++-- src/host/layer23/src/common/main.c | 12 ++++++------ src/host/layer23/src/common/sap_interface.c | 2 +- src/host/layer23/src/common/sim.c | 4 ++-- src/host/layer23/src/common/sysinfo.c | 2 +- src/host/layer23/src/misc/Makefile.am | 4 ++-- src/host/layer23/src/misc/app_bcch_scan.c | 8 ++++---- src/host/layer23/src/misc/app_cbch_sniff.c | 10 +++++----- src/host/layer23/src/misc/app_ccch_scan.c | 14 +++++++------- src/host/layer23/src/misc/app_cell_log.c | 4 ++-- src/host/layer23/src/misc/app_echo_test.c | 6 +++--- src/host/layer23/src/misc/bcch_scan.c | 20 ++++++++++---------- src/host/layer23/src/misc/cell_log.c | 14 +++++++------- src/host/layer23/src/misc/rslms.c | 8 ++++---- src/host/layer23/src/mobile/Makefile.am | 4 ++-- src/host/layer23/src/mobile/app_mobile.c | 8 ++++---- src/host/layer23/src/mobile/gsm322.c | 10 +++++----- src/host/layer23/src/mobile/gsm48_cc.c | 8 ++++---- src/host/layer23/src/mobile/gsm48_mm.c | 8 ++++---- src/host/layer23/src/mobile/gsm48_rr.c | 10 +++++----- src/host/layer23/src/mobile/main.c | 8 ++++---- src/host/layer23/src/mobile/mnccms.c | 2 +- src/host/layer23/src/mobile/settings.c | 2 +- src/host/layer23/src/mobile/subscriber.c | 4 ++-- src/host/layer23/src/mobile/transaction.c | 6 +++--- src/host/layer23/src/mobile/vty_interface.c | 8 ++++---- src/host/osmocon/osmocon.c | 16 ++++++++-------- src/host/osmocon/osmoload.c | 18 +++++++++--------- src/host/osmocon/tpu_debug.c | 2 +- src/target/firmware/Makefile | 3 +-- src/target/firmware/apps/loader/main.c | 2 +- src/target/firmware/board/compal/rf_power.c | 2 +- src/target/firmware/board/gta0x/rf_power.c | 2 +- src/target/firmware/board/pirelli_dpl10/rf_power.c | 2 +- src/target/firmware/calypso/dsp.c | 2 +- src/target/firmware/comm/msgb.c | 2 +- src/target/firmware/comm/sercomm.c | 4 ++-- src/target/firmware/comm/sercomm_cons.c | 2 +- src/target/firmware/comm/timer.c | 2 +- src/target/firmware/include/comm/msgb.h | 2 +- src/target/firmware/include/comm/sercomm.h | 2 +- src/target/firmware/include/comm/timer.h | 2 +- src/target/firmware/include/layer1/async.h | 2 +- src/target/firmware/include/layer1/l23_api.h | 2 +- src/target/firmware/include/layer1/sched_gsmtime.h | 2 +- src/target/firmware/include/layer1/sync.h | 4 ++-- src/target/firmware/include/rf/trf6151.h | 2 +- src/target/firmware/include/rffe.h | 2 +- src/target/firmware/layer1/afc.c | 2 +- src/target/firmware/layer1/agc.c | 2 +- src/target/firmware/layer1/apc.c | 4 ++-- src/target/firmware/layer1/async.c | 4 ++-- src/target/firmware/layer1/l23_api.c | 4 ++-- src/target/firmware/layer1/mframe_sched.c | 2 +- src/target/firmware/layer1/prim_fbsb.c | 4 ++-- src/target/firmware/layer1/prim_freq.c | 4 ++-- src/target/firmware/layer1/prim_pm.c | 4 ++-- src/target/firmware/layer1/prim_rach.c | 4 ++-- src/target/firmware/layer1/prim_rx_nb.c | 4 ++-- src/target/firmware/layer1/prim_tch.c | 6 +++--- src/target/firmware/layer1/prim_tx_nb.c | 4 ++-- src/target/firmware/layer1/prim_utils.c | 2 +- src/target/firmware/layer1/rfch.c | 2 +- src/target/firmware/layer1/sched_gsmtime.c | 2 +- src/target/firmware/layer1/sync.c | 4 ++-- src/target/firmware/layer1/tdma_sched.c | 2 +- src/target/firmware/layer1/toa.c | 2 +- src/target/firmware/rf/mt6139.c | 2 +- src/target/firmware/rf/trf6151.c | 2 +- 89 files changed, 212 insertions(+), 210 deletions(-)
diff --git a/include/osmocore/rsl.h b/include/osmocore/rsl.h index 3a2b04d..c9375a7 100644 --- a/include/osmocore/rsl.h +++ b/include/osmocore/rsl.h @@ -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);
diff --git a/src/Makefile b/src/Makefile index 27281de..1b6f2f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/host/gsmmap/Makefile.am b/src/host/gsmmap/Makefile.am index d866d02..e71b887 100644 --- a/src/host/gsmmap/Makefile.am +++ b/src/host/gsmmap/Makefile.am @@ -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
diff --git a/src/host/gsmmap/configure.ac b/src/host/gsmmap/configure.ac index 45a00e2..3a42d4c 100644 --- a/src/host/gsmmap/configure.ac +++ b/src/host/gsmmap/configure.ac @@ -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 diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac index 05c6d24..0a67fab 100644 --- a/src/host/layer23/configure.ac +++ b/src/host/layer23/configure.ac @@ -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 diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h b/src/host/layer23/include/osmocom/bb/common/l1ctl.h index 64abf9c..7eb0c8c 100644 --- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h +++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h @@ -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; diff --git a/src/host/layer23/include/osmocom/bb/common/lapdm.h b/src/host/layer23/include/osmocom/bb/common/lapdm.h index de954fb..2d0e2fd 100644 --- a/src/host/layer23/include/osmocom/bb/common/lapdm.h +++ b/src/host/layer23/include/osmocom/bb/common/lapdm.h @@ -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>
diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index eb9f482..9205fec 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -2,7 +2,7 @@ #define _LOGGING_H
#define DEBUG -#include <osmocore/logging.h> +#include <osmocom/core/logging.h>
enum { DRSL, diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 749c144..9d8a030 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -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;
diff --git a/src/host/layer23/include/osmocom/bb/common/sysinfo.h b/src/host/layer23/include/osmocom/bb/common/sysinfo.h index 07daafa..e5db54f 100644 --- a/src/host/layer23/include/osmocom/bb/common/sysinfo.h +++ b/src/host/layer23/include/osmocom/bb/common/sysinfo.h @@ -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 */
diff --git a/src/host/layer23/include/osmocom/bb/misc/layer3.h b/src/host/layer23/include/osmocom/bb/misc/layer3.h index 7d364e7..bbf242d 100644 --- a/src/host/layer23/include/osmocom/bb/misc/layer3.h +++ b/src/host/layer23/include/osmocom/bb/misc/layer3.h @@ -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); diff --git a/src/host/layer23/include/osmocom/bb/misc/rslms.h b/src/host/layer23/include/osmocom/bb/misc/rslms.h index 8b62ba9..94fe99c 100644 --- a/src/host/layer23/include/osmocom/bb/misc/rslms.h +++ b/src/host/layer23/include/osmocom/bb/misc/rslms.h @@ -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) */ diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h index 830c8cf..b140c18 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h @@ -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
diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc.h b/src/host/layer23/include/osmocom/bb/mobile/mncc.h index 151f0b4..e378ecc 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc.h @@ -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; diff --git a/src/host/layer23/include/osmocom/bb/mobile/transaction.h b/src/host/layer23/include/osmocom/bb/mobile/transaction.h index 4be82c1..6cbc25b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/transaction.h +++ b/src/host/layer23/include/osmocom/bb/mobile/transaction.h @@ -1,7 +1,7 @@ #ifndef _TRANSACT_H #define _TRANSACT_H
-#include <osmocore/linuxlist.h> +#include <osmocom/core/linuxlist.h>
/* One transaction */ struct gsm_trans { diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am index 4e2686c..f6e3f83 100644 --- a/src/host/layer23/src/common/Makefile.am +++ b/src/host/layer23/src/common/Makefile.am @@ -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 \ diff --git a/src/host/layer23/src/common/gps.c b/src/host/layer23/src/common/gps.c index 07bc460..dba93fb 100644 --- a/src/host/layer23/src/common/gps.c +++ b/src/host/layer23/src/common/gps.c @@ -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> diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index d47275a..f2714e6 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -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> diff --git a/src/host/layer23/src/common/l1l2_interface.c b/src/host/layer23/src/common/l1l2_interface.c index 74c8875..23e1ef2 100644 --- a/src/host/layer23/src/common/l1l2_interface.c +++ b/src/host/layer23/src/common/l1l2_interface.c @@ -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> diff --git a/src/host/layer23/src/common/lapdm.c b/src/host/layer23/src/common/lapdm.c index dc9c916..61e2287 100644 --- a/src/host/layer23/src/common/lapdm.c +++ b/src/host/layer23/src/common/lapdm.c @@ -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> diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index c2e4a5e..5283935 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -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[] = { diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c index cb9564a..61513ea 100644 --- a/src/host/layer23/src/common/main.c +++ b/src/host/layer23/src/common/main.c @@ -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>
diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c index d384c9e..54aa635 100644 --- a/src/host/layer23/src/common/sap_interface.c +++ b/src/host/layer23/src/common/sap_interface.c @@ -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> diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 3ef3cf8..b76de5c 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -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> diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c index 8f6b1b5..5827d75 100644 --- a/src/host/layer23/src/common/sysinfo.c +++ b/src/host/layer23/src/common/sysinfo.c @@ -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> diff --git a/src/host/layer23/src/misc/Makefile.am b/src/host/layer23/src/misc/Makefile.am index 8428511..15d46a8 100644 --- a/src/host/layer23/src/misc/Makefile.am +++ b/src/host/layer23/src/misc/Makefile.am @@ -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
diff --git a/src/host/layer23/src/misc/app_bcch_scan.c b/src/host/layer23/src/misc/app_bcch_scan.c index cce22b3..9a01694 100644 --- a/src/host/layer23/src/misc/app_bcch_scan.c +++ b/src/host/layer23/src/misc/app_bcch_scan.c @@ -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) diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c index 9e2d1a9..77427fa 100644 --- a/src/host/layer23/src/misc/app_cbch_sniff.c +++ b/src/host/layer23/src/misc/app_cbch_sniff.c @@ -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 = {}; diff --git a/src/host/layer23/src/misc/app_ccch_scan.c b/src/host/layer23/src/misc/app_ccch_scan.c index 4e45a42..913ceca 100644 --- a/src/host/layer23/src/misc/app_ccch_scan.c +++ b/src/host/layer23/src/misc/app_ccch_scan.c @@ -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> diff --git a/src/host/layer23/src/misc/app_cell_log.c b/src/host/layer23/src/misc/app_cell_log.c index fdecc63..22ed021 100644 --- a/src/host/layer23/src/misc/app_cell_log.c +++ b/src/host/layer23/src/misc/app_cell_log.c @@ -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; diff --git a/src/host/layer23/src/misc/app_echo_test.c b/src/host/layer23/src/misc/app_echo_test.c index c9b1895..0adab7f 100644 --- a/src/host/layer23/src/misc/app_echo_test.c +++ b/src/host/layer23/src/misc/app_echo_test.c @@ -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 { diff --git a/src/host/layer23/src/misc/bcch_scan.c b/src/host/layer23/src/misc/bcch_scan.c index dff4dc9..351da52 100644 --- a/src/host/layer23/src/misc/bcch_scan.c +++ b/src/host/layer23/src/misc/bcch_scan.c @@ -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> diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c index 7de2c40..7980082 100644 --- a/src/host/layer23/src/misc/cell_log.c +++ b/src/host/layer23/src/misc/cell_log.c @@ -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> diff --git a/src/host/layer23/src/misc/rslms.c b/src/host/layer23/src/misc/rslms.c index b2e0047..93d22fd 100644 --- a/src/host/layer23/src/misc/rslms.c +++ b/src/host/layer23/src/misc/rslms.c @@ -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> diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 12f0f76..fb0423e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -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 \ diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index a1b4731..33fdde6 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -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; diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 1996f93..c05469d 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -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> diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index d8976eb..b881205 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -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> diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 15bbd27..bf5bbc2 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -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> diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index dc2226a..b2ab2e1 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -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> diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index cd72d13..4765995 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -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>
diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index 6997993..4d47be4 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -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> diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index a5a91ce..db22fd9 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -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> diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index 3ba78f3..549345c 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -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> diff --git a/src/host/layer23/src/mobile/transaction.c b/src/host/layer23/src/mobile/transaction.c index abd3c2d..4b66050 100644 --- a/src/host/layer23/src/mobile/transaction.c +++ b/src/host/layer23/src/mobile/transaction.c @@ -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> diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index b93248d..418c3f6 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -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> diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index 6f6f566..2c42799 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -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) diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c index b075463..6663a1e 100644 --- a/src/host/osmocon/osmoload.c +++ b/src/host/osmocon/osmoload.c @@ -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); diff --git a/src/host/osmocon/tpu_debug.c b/src/host/osmocon/tpu_debug.c index f54bd40..c9dac90 100644 --- a/src/host/osmocon/tpu_debug.c +++ b/src/host/osmocon/tpu_debug.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <stdio.h>
-#include <osmocore/msgb.h> +#include <osmocom/core/msgb.h>
/* TPU disassembler begin */
diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile index ad46fb5..301bb31 100644 --- a/src/target/firmware/Makefile +++ b/src/target/firmware/Makefile @@ -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 diff --git a/src/target/firmware/apps/loader/main.c b/src/target/firmware/apps/loader/main.c index 04b337b..4e71d98 100644 --- a/src/target/firmware/apps/loader/main.c +++ b/src/target/firmware/apps/loader/main.c @@ -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> diff --git a/src/target/firmware/board/compal/rf_power.c b/src/target/firmware/board/compal/rf_power.c index 71033ae..fbbe65a 100644 --- a/src/target/firmware/board/compal/rf_power.c +++ b/src/target/firmware/board/compal/rf_power.c @@ -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[] = { diff --git a/src/target/firmware/board/gta0x/rf_power.c b/src/target/firmware/board/gta0x/rf_power.c index 645c8a3..1c896f7 100644 --- a/src/target/firmware/board/gta0x/rf_power.c +++ b/src/target/firmware/board/gta0x/rf_power.c @@ -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 */ diff --git a/src/target/firmware/board/pirelli_dpl10/rf_power.c b/src/target/firmware/board/pirelli_dpl10/rf_power.c index 34e7409..9b89847 100644 --- a/src/target/firmware/board/pirelli_dpl10/rf_power.c +++ b/src/target/firmware/board/pirelli_dpl10/rf_power.c @@ -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 */ diff --git a/src/target/firmware/calypso/dsp.c b/src/target/firmware/calypso/dsp.c index f22a7e0..5a17c5a 100644 --- a/src/target/firmware/calypso/dsp.c +++ b/src/target/firmware/calypso/dsp.c @@ -34,7 +34,7 @@
#include <abb/twl3025.h>
-#include <osmocore/gsm_utils.h> +#include <osmocom/gsm/gsm_utils.h>
#define REG_API_CONTROL 0xfffe0000 diff --git a/src/target/firmware/comm/msgb.c b/src/target/firmware/comm/msgb.c index d412844..ff18e65 100644 --- a/src/target/firmware/comm/msgb.c +++ b/src/target/firmware/comm/msgb.c @@ -26,7 +26,7 @@ #include <debug.h> #include <delay.h>
-#include <osmocore/msgb.h> +#include <osmocom/core/msgb.h>
#include <calypso/backlight.h>
diff --git a/src/target/firmware/comm/sercomm.c b/src/target/firmware/comm/sercomm.c index 0263f7d..d7f6036 100644 --- a/src/target/firmware/comm/sercomm.c +++ b/src/target/firmware/comm/sercomm.c @@ -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> diff --git a/src/target/firmware/comm/sercomm_cons.c b/src/target/firmware/comm/sercomm_cons.c index 5d7842f..987c992 100644 --- a/src/target/firmware/comm/sercomm_cons.c +++ b/src/target/firmware/comm/sercomm_cons.c @@ -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>
diff --git a/src/target/firmware/comm/timer.c b/src/target/firmware/comm/timer.c index 9799cfc..54abc79 100644 --- a/src/target/firmware/comm/timer.c +++ b/src/target/firmware/comm/timer.c @@ -20,7 +20,7 @@
#include <stdint.h> #include <debug.h> -#include <osmocore/linuxlist.h> +#include <osmocom/core/linuxlist.h>
#include <comm/timer.h>
diff --git a/src/target/firmware/include/comm/msgb.h b/src/target/firmware/include/comm/msgb.h index 3113fa2..10cff9b 100644 --- a/src/target/firmware/include/comm/msgb.h +++ b/src/target/firmware/include/comm/msgb.h @@ -20,7 +20,7 @@ * */
-#include <osmocore/linuxlist.h> +#include <osmocom/core/linuxlist.h> #include <console.h>
struct msgb { diff --git a/src/target/firmware/include/comm/sercomm.h b/src/target/firmware/include/comm/sercomm.h index 8fbbff9..54256b5 100644 --- a/src/target/firmware/include/comm/sercomm.h +++ b/src/target/firmware/include/comm/sercomm.h @@ -3,7 +3,7 @@
/* SERCOMM layer on UART1 (modem UART) */
-#include <osmocore/msgb.h> +#include <osmocom/core/msgb.h>
#define SERCOMM_UART_NR 1
diff --git a/src/target/firmware/include/comm/timer.h b/src/target/firmware/include/comm/timer.h index 814d2c6..42bf734 100644 --- a/src/target/firmware/include/comm/timer.h +++ b/src/target/firmware/include/comm/timer.h @@ -23,7 +23,7 @@
#include <sys/time.h>
-#include <osmocore/linuxlist.h> +#include <osmocom/core/linuxlist.h>
/** * Timer management: diff --git a/src/target/firmware/include/layer1/async.h b/src/target/firmware/include/layer1/async.h index f8d6b71..93c5077 100644 --- a/src/target/firmware/include/layer1/async.h +++ b/src/target/firmware/include/layer1/async.h @@ -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>
diff --git a/src/target/firmware/include/layer1/l23_api.h b/src/target/firmware/include/layer1/l23_api.h index b160270..9b10b62 100644 --- a/src/target/firmware/include/layer1/l23_api.h +++ b/src/target/firmware/include/layer1/l23_api.h @@ -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); diff --git a/src/target/firmware/include/layer1/sched_gsmtime.h b/src/target/firmware/include/layer1/sched_gsmtime.h index 630c616..c40359e 100644 --- a/src/target/firmware/include/layer1/sched_gsmtime.h +++ b/src/target/firmware/include/layer1/sched_gsmtime.h @@ -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; diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h index 879e4cf..0796205 100644 --- a/src/target/firmware/include/layer1/sync.h +++ b/src/target/firmware/include/layer1/sync.h @@ -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> diff --git a/src/target/firmware/include/rf/trf6151.h b/src/target/firmware/include/rf/trf6151.h index 1a90808..73ff8c0 100644 --- a/src/target/firmware/include/rf/trf6151.h +++ b/src/target/firmware/include/rf/trf6151.h @@ -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); diff --git a/src/target/firmware/include/rffe.h b/src/target/firmware/include/rffe.h index 950e597..a21d183 100644 --- a/src/target/firmware/include/rffe.h +++ b/src/target/firmware/include/rffe.h @@ -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;
diff --git a/src/target/firmware/layer1/afc.c b/src/target/firmware/layer1/afc.c index 92545a7..a51a107 100644 --- a/src/target/firmware/layer1/afc.c +++ b/src/target/firmware/layer1/afc.c @@ -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> diff --git a/src/target/firmware/layer1/agc.c b/src/target/firmware/layer1/agc.c index 780e260..b72a6e7 100644 --- a/src/target/firmware/layer1/agc.c +++ b/src/target/firmware/layer1/agc.c @@ -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>
diff --git a/src/target/firmware/layer1/apc.c b/src/target/firmware/layer1/apc.c index 5cff191..480c760 100644 --- a/src/target/firmware/layer1/apc.c +++ b/src/target/firmware/layer1/apc.c @@ -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>
diff --git a/src/target/firmware/layer1/async.c b/src/target/firmware/layer1/async.c index 76d0b72..e5c80c7 100644 --- a/src/target/firmware/layer1/async.c +++ b/src/target/firmware/layer1/async.c @@ -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> diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c index aef12a5..2e95160 100644 --- a/src/target/firmware/layer1/l23_api.c +++ b/src/target/firmware/layer1/l23_api.c @@ -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> diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c index 326f660..428102a 100644 --- a/src/target/firmware/layer1/mframe_sched.c +++ b/src/target/firmware/layer1/mframe_sched.c @@ -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> diff --git a/src/target/firmware/layer1/prim_fbsb.c b/src/target/firmware/layer1/prim_fbsb.c index d46e4a4..124a316 100644 --- a/src/target/firmware/layer1/prim_fbsb.c +++ b/src/target/firmware/layer1/prim_fbsb.c @@ -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> diff --git a/src/target/firmware/layer1/prim_freq.c b/src/target/firmware/layer1/prim_freq.c index 7878be6..88bc453 100644 --- a/src/target/firmware/layer1/prim_freq.c +++ b/src/target/firmware/layer1/prim_freq.c @@ -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> diff --git a/src/target/firmware/layer1/prim_pm.c b/src/target/firmware/layer1/prim_pm.c index 134bffd..5d2f413 100644 --- a/src/target/firmware/layer1/prim_pm.c +++ b/src/target/firmware/layer1/prim_pm.c @@ -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> diff --git a/src/target/firmware/layer1/prim_rach.c b/src/target/firmware/layer1/prim_rach.c index b0e7288..47f7424 100644 --- a/src/target/firmware/layer1/prim_rach.c +++ b/src/target/firmware/layer1/prim_rach.c @@ -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> diff --git a/src/target/firmware/layer1/prim_rx_nb.c b/src/target/firmware/layer1/prim_rx_nb.c index 8000288..ea90267 100644 --- a/src/target/firmware/layer1/prim_rx_nb.c +++ b/src/target/firmware/layer1/prim_rx_nb.c @@ -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> diff --git a/src/target/firmware/layer1/prim_tch.c b/src/target/firmware/layer1/prim_tch.c index d525ce1..013318d 100644 --- a/src/target/firmware/layer1/prim_tch.c +++ b/src/target/firmware/layer1/prim_tch.c @@ -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> diff --git a/src/target/firmware/layer1/prim_tx_nb.c b/src/target/firmware/layer1/prim_tx_nb.c index 4989bf5..3038178 100644 --- a/src/target/firmware/layer1/prim_tx_nb.c +++ b/src/target/firmware/layer1/prim_tx_nb.c @@ -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> diff --git a/src/target/firmware/layer1/prim_utils.c b/src/target/firmware/layer1/prim_utils.c index 5d6c71c..c85da71 100644 --- a/src/target/firmware/layer1/prim_utils.c +++ b/src/target/firmware/layer1/prim_utils.c @@ -22,7 +22,7 @@
#include <stdint.h>
-#include <osmocore/msgb.h> +#include <osmocom/core/msgb.h> #include <layer1/sync.h>
diff --git a/src/target/firmware/layer1/rfch.c b/src/target/firmware/layer1/rfch.c index 5627b7e..d0818d0 100644 --- a/src/target/firmware/layer1/rfch.c +++ b/src/target/firmware/layer1/rfch.c @@ -22,7 +22,7 @@
#include <stdint.h>
-#include <osmocore/gsm_utils.h> +#include <osmocom/gsm/gsm_utils.h>
#include <layer1/sync.h>
diff --git a/src/target/firmware/layer1/sched_gsmtime.c b/src/target/firmware/layer1/sched_gsmtime.c index ba3bac7..01e22ca 100644 --- a/src/target/firmware/layer1/sched_gsmtime.c +++ b/src/target/firmware/layer1/sched_gsmtime.c @@ -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> diff --git a/src/target/firmware/layer1/sync.c b/src/target/firmware/layer1/sync.c index 3397dc0..36f4297 100644 --- a/src/target/firmware/layer1/sync.c +++ b/src/target/firmware/layer1/sync.c @@ -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> diff --git a/src/target/firmware/layer1/tdma_sched.c b/src/target/firmware/layer1/tdma_sched.c index 013d305..8812992 100644 --- a/src/target/firmware/layer1/tdma_sched.c +++ b/src/target/firmware/layer1/tdma_sched.c @@ -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> diff --git a/src/target/firmware/layer1/toa.c b/src/target/firmware/layer1/toa.c index adb32f2..7d80d95 100644 --- a/src/target/firmware/layer1/toa.c +++ b/src/target/firmware/layer1/toa.c @@ -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> diff --git a/src/target/firmware/rf/mt6139.c b/src/target/firmware/rf/mt6139.c index 6103646..a9a6d32 100644 --- a/src/target/firmware/rf/mt6139.c +++ b/src/target/firmware/rf/mt6139.c @@ -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> diff --git a/src/target/firmware/rf/trf6151.c b/src/target/firmware/rf/trf6151.c index 0efe527..7391ef8 100644 --- a/src/target/firmware/rf/trf6151.c +++ b/src/target/firmware/rf/trf6151.c @@ -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>
Hi Pablo,
thanks a lot. I took the liberty of merging your patch, as it seemed to build+work fine here.
In a more general sense, I think the more stable the API of libosmocore becomes, the less need we have for copying libosmocore inside osmocom-bb.git by means of git-subtree.
This was mainly a hack early on, to decouple osmocom-bb from the API instabilities and build errors when cross-compiling for the target ARM.
If we'd start to make official libosmocore releases, we can simply base on that. The cross-compilation for the target could be handled by a script that will download the respective libosmocore snapshot (or latest git master), and then run configure + make.
Regards, Harald
On 26/04/11 14:34, Harald Welte wrote:
Hi Pablo,
thanks a lot. I took the liberty of merging your patch, as it seemed to build+work fine here.
Thanks Harald.
In a more general sense, I think the more stable the API of libosmocore becomes, the less need we have for copying libosmocore inside osmocom-bb.git by means of git-subtree.
This was mainly a hack early on, to decouple osmocom-bb from the API instabilities and build errors when cross-compiling for the target ARM.
If we'd start to make official libosmocore releases, we can simply base on that. The cross-compilation for the target could be handled by a script that will download the respective libosmocore snapshot (or latest git master), and then run configure + make.
Indeed, this makes sense.
BTW, I'll start with the patches that fix the namespace pollution (adding osmo_* to all functions and such). In order to reduce the clashes with other ongoing patches, I'll send this change in several series that include small chucks (ie. first all select.c functions and structures start by osmo_*, then signal.c, and so on). Let me know if you think this is excessive.
On Tue, Apr 26, 2011 at 05:43:14PM +0200, Pablo Neira Ayuso wrote:
BTW, I'll start with the patches that fix the namespace pollution (adding osmo_* to all functions and such). In order to reduce the clashes with other ongoing patches, I'll send this change in several series that include small chucks (ie. first all select.c functions and structures start by osmo_*, then signal.c, and so on). Let me know if you think this is excessive.
I think especially for the generic stuff like select.c and signal.c it is important to change.
Nonetheless, as you indicate, it is likely to create many clashes. What do the other developers on this list say? Should we first try to get rid of some of our branches in the various projects in order to reduce the fall-out from "osmo_" prefixing some of our core functions?
Regards, Harald.
Nonetheless, as you indicate, it is likely to create many clashes. What do the other developers on this list say? Should we first try to get rid of some of our branches in the various projects in order to reduce the fall-out from "osmo_" prefixing some of our core functions?
Coincidentally, I was just looking at moving g2-loader to master again :) (although this branch probably won't be affected by the above change).
Regards,
Wolfram
baseband-devel@lists.osmocom.org