summaryrefslogtreecommitdiffstats
path: root/src/host/osmocon/osmocon.c
AgeCommit message (Collapse)AuthorFilesLines
2018-05-28osmocon: Reset DTR pin at device open timepespin/dtr-rstPau Espin Pedrol1-0/+10
Change-Id: I6456cd5f48bde2b0c788b8c33548b2a2ec2ffba1
2017-05-24osmocon.c: strip unused variableVadim Yanitskiy1-3/+2
Change-Id: I295785295c108798e0c235e78bd8fd8f3c585d16
2013-06-19osmocon: Improve performance by handling several serial bytes at a timeAndreas Eversberg1-8/+19
2013-05-23host/osmocon: fix some printf format specifier in handle_write_dnloadBhaskar1-1/+1
From: Bhaskar <niceguy108@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-04-07osmocon: embed chainloaderSteve Markgraf1-44/+65
This allows to directly load highram-images on compal phones with the commandline-switch -c. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05osmocon: make romloader output much less verboseSteve Markgraf1-20/+5
Most of the output was only for debug purposes anyway. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-08host/osmocon: allow uploading of files > 64kb in romload-modeSteve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-12-14host/osmocon: correct parsing of -mAlexander Huemer1-2/+3
Written-by: Alexander Huemer <alexander.huemer@xx.vu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-06osmocom: Address warning about aliasingHolger Hans Peter Freyther1-1/+2
We alias the uint8_t buf[..] to a uint16_t* which is violating the aliases rule of C. Use an explicit memcpy to copy the first two byte of the buffer. GCC 4.6.2 (debian) is clever enough to use a normal load does not generate a memcpy call. osmocon.c: In function ‘un_tool_read’: osmocon.c:1239:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2011-09-05host/osmocon: make auto-reload/reboot feature work in chainloading-modeSteve Markgraf1-2/+17
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-02host/osmocon: Make use of the libosmcore serial helpersSylvain Munaut1-72/+10
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-16osmocon: if we ignore a return value, we don't need to assign it to a variableHarald Welte1-3/+1
2011-07-16osmocon: get rid of some Smash warningsHarald Welte1-6/+6
2011-05-15src: use namespace prefix osmo_* for utilsPablo Neira Ayuso1-4/+4
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-15src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-12/+12
Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
2011-05-15src: use namespace prefix osmo_timer*Pablo Neira Ayuso1-9/+9
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-04-26src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso1-8/+8
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>
2010-11-17osmocon: make beacon interval configurable via cmdlineAlex Badea1-10/+16
Beacons with the default 50 mS interval are too far apart to be picked up by the OpenMoko gta0x Calypso chip. Make them configurable via a -i commandline argument. As recommended in the OpenMoko wiki[1], an interval of 13 mS works. [1] http://wiki.openmoko.org/wiki/GSM/Flashing (-od fluid argument) Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
2010-10-03osmocom.c: rc is not assigned and contains garbage, return 0.Holger Hans Peter Freyther1-2/+2
2010-10-03osmocon.c: Use C99 inttypes instead of u_intX_t.Holger Hans Peter Freyther1-5/+5
2010-07-20[osmocon] add a chainloading mode for the compal ramloaderSteve Markgraf1-6/+27
The idea is to load a small application to the phone, which activates and executes the Calypso romloader. The payload itself then is loaded with the romloader, bypassing the magic and the resulting size limit on the C139/C140 and J100i. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-07-20osmocon: new debug option, allows selective dumping of rx and/or tx.Ingo Albrecht1-24/+49
2010-07-20osmoload: allow running without firmware imageIngo Albrecht1-12/+13
2010-07-15osmocon.c: enable hdlc console for mtk romloader targetsSteve Markgraf1-5/+5
Since the mt622x uart driver is now in a working state, we can actually use the sercomm console. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-19osmocon: extend hexdump to show all printable charactersJan Luebbe1-3/+9
2010-05-19osmocon: change mtk load address for MT6223 romloaderSteve Markgraf1-1/+1
The romloader of the MT6223 uses more of the internal SRAM than the loader of the MT6227, thus we need to change the load address. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17osmocon: Add experimental support for the MTK romloaderSteve Markgraf1-10/+291
Currently the switch to a higher baudrate is missing, which has to be done by a direct UART autobaud register write, plus sending an autobaud sample. As a result, the maximum download speed is currently 19.200 Baud. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17osmocon: use a global load addressSteve Markgraf1-9/+11
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17osmocon: cosmetic cleanupSteve Markgraf1-19/+22
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17osmocon: use osmocore timers, minor fixesSteve Markgraf1-42/+15
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17osmocon.c: Fix serial_set_baudrate functionDaniel Willmann1-0/+5
We have to call tcgetattr prior to changing the baudrate and writing the struct again.
2010-04-21osmocom: Fix serial init (CSIZE field)Sylvain Munaut1-1/+1
Since we clear the whole CSIZE, we need to set CS8 _after_ the clearing or it'll just get erased ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-07osmocon: fix c140xor, fix compiler warnings due to unhandled cases, cleanupSteve Markgraf1-15/+20
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-04-06osmocon: use git-version-gen and PACKAGE_VERSION for 'osmocon -v'Harald Welte1-3/+1
2010-04-06osmocon: cosmetic cleanup (mostly 80character line length)osmocon_v0.0.0Harald Welte1-80/+128
2010-04-06osmocon: * introduce support for "non-secure" romloader inside ↵Steve Markgraf1-31/+464
Calypso/Calypso lite, "-m romload", tested on the BenQ Siemens A38 * automatically add the required 1003 magic for the C139, C140 and J100i "-m c140/c140xor", intended for loading loader.ramload.bin, and loading the application itself with "osmoload memload" on these targets * replace null-terminated string "ftmtool" with uint8_t (length was 8, so the ftmtool message was only recognized when the byte following to our allocated buffer memory was 0x00) * fix minor compiler warnings * add copyright message Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-03-30osmocon: use serial port initialization code from openbsc/src/rs232.cHarald Welte1-43/+38
Both have the same goal: put the RS232 port into a completely raw, binary-transparent mode. So there's no point in keeping two completely different functions for this.
2010-03-30osmocon: calcluate unix domain socket length in a portable wayHarald Welte1-2/+15
Let's hope this concept (as seen in Xorg sources) is portable enough to calculate the length of the sockaddr_un properly on all architectures.
2010-03-22misc compiler warning fixesHarald Welte1-3/+3
* added missing param in call to gsm48_rx_bcch * added 'extern' to declarations of rsl_rlm_cause_strs and target_board * added several 'const' for strings * removed useless 'bufptr,' from hexdump (From: itsme <itsme@xs4all.nl>)
2010-03-19Two more small patchesErik Ekman1-2/+2
Hi Found a spelling error while testing my C139, and also fixed the warning discussed in my earlier patch. /Erik From 9d8a7454367f3d095e6d4c046e84a22126ff887a Mon Sep 17 00:00:00 2001 From: Erik Ekman <yarrick@kryo.se> Date: Wed, 17 Mar 2010 22:48:57 +0100 Subject: [PATCH 1/2] Remove operand which has no effect Signed-off-by: Ingo Albrecht <prom@berlin.ccc.de>
2010-03-07Handle EAGAIN. Print errors properly.Ingo Albrecht1-2/+8
2010-03-07Fixed transmit path of osmocon in various ways.Ingo Albrecht1-16/+28
2010-03-07Loader communications support in osmocon. Generalized tool connections.Ingo Albrecht1-48/+89
2010-03-07Renamed layer2_connection -> tool_connection.Ingo Albrecht1-7/+7
2010-03-07osmocon: drain the hdlc sercomm queue through selectHarald Welte1-5/+23
2010-03-07osmocon: we don't want to write to serial FD after download completedHarald Welte1-0/+1
2010-03-01Fix three more warningsErik Ekman1-1/+3
2010-03-01Fix some warnings in osmoconErik Ekman1-1/+3
2010-02-23add osmocon TPU debugger supportHarald Welte1-0/+3
Receives TPU RAM from target and prints it to console
2010-02-20convert osmocon to autotoolsHarald Welte1-2/+2
this needs to temporarily disable the version magic, as I don't know how to integrate that into automake...