diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-04-26 02:55:30 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-04-26 02:55:30 +0200 |
commit | ade79a00838801dbcd95efd026d18b15eb1e1e3c (patch) | |
tree | 6b08d76dcee3abe022770fee6fd52b16d322c79e /src/host/osmocon | |
parent | f0059596a20bfa406a500ca5d6b34bf88d333ed3 (diff) |
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>
Diffstat (limited to 'src/host/osmocon')
-rw-r--r-- | src/host/osmocon/osmocon.c | 16 | ||||
-rw-r--r-- | src/host/osmocon/osmoload.c | 18 | ||||
-rw-r--r-- | src/host/osmocon/tpu_debug.c | 2 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index 6f6f5669..2c42799c 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 b0754637..6663a1e1 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 f54bd40f..c9dac903 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 */ |