tools/lthor.git
8 years agoImprove colors handling in terminal 73/69773/4
Krzysztof Opasiak [Fri, 13 May 2016 12:12:05 +0000 (14:12 +0200)]
Improve colors handling in terminal

Instead of repeating magick strings in many places
let's use a suitable defines for them to make the code
more readable.

Change-Id: I7b4935bd459e375be39d1dd223d20c71635670cc
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
8 years agoUse asynchronous API to improve performance 72/69772/4
Krzysztof Opasiak [Fri, 13 May 2016 08:28:28 +0000 (10:28 +0200)]
Use asynchronous API to improve performance

Change-Id: I18f0aa14778d06751e7005e4b555c6c68f2839d4
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
8 years agoStart using new implementation of thor protocol 76/68776/5
Krzysztof Opasiak [Thu, 2 Jun 2016 09:43:22 +0000 (11:43 +0200)]
Start using new implementation of thor protocol

Drop all legacy stuff which used cdc-acm kernel driver
and start using new implementation provided by libthor.

Change-Id: If3ee224b4905778d39c8b049f38353f499cd9f9f
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
8 years agoAdd core file with thor communication protocol 75/68775/5
Krzysztof Opasiak [Mon, 9 May 2016 11:22:45 +0000 (13:22 +0200)]
Add core file with thor communication protocol

Add main file of libthor with implementation of API and thor
communication protocol.

Change-Id: Ic6e4c13ad89eef8080f955af5a71c11cd201ad78
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
8 years agoAdd cdc-acm related implementation of thor protocol 74/68774/5
Krzysztof Opasiak [Fri, 13 May 2016 08:39:43 +0000 (10:39 +0200)]
Add cdc-acm related implementation of thor protocol

Thor protocol "emulates" cdc-acm class. This commit adds
some helper functions which are required to properly
setup communication on cdc-acm protocol level.

Change-Id: Iffb79c813f97bc3f3c4260f6fd713d0ea4d99353
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
8 years agoAdd libusb backend for thor protocol 73/68773/5
Krzysztof Opasiak [Fri, 13 May 2016 08:27:23 +0000 (10:27 +0200)]
Add libusb backend for thor protocol

Add implementation of functions used for communication
with tharget on USB level via libusb.

Change-Id: I59603b3bb05570e8f13c8ca3e4f48fabf2fc03c0
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
9 years agoAdd code for accessing tar archives 72/68772/3
Krzysztof Opasiak [Mon, 9 May 2016 11:20:25 +0000 (13:20 +0200)]
Add code for accessing tar archives

Add implementation of data source for accessing tar files.
This is needed to flash tar.gz file using lthor.

Change-Id: Id5abbf258d41f37c569c65753bb8866bb9a84b6a
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
9 years agoAdd code for accessing raw file by liblthor 71/68771/3
Krzysztof Opasiak [Fri, 13 May 2016 08:27:03 +0000 (10:27 +0200)]
Add code for accessing raw file by liblthor

Implement a data source for accessing standard file.
This type of access is used for reading PIT file.

Change-Id: Icc9de3718e1234e0758c27f4721f3072d3d538f9
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
9 years agoAdd headers with API for new implementation of thor protocol 70/68770/2
Krzysztof Opasiak [Mon, 9 May 2016 11:19:28 +0000 (13:19 +0200)]
Add headers with API for new implementation of thor protocol

Add new headers with:
- API for accessing new implementation of thor protocol
- Internal data structure which will be used by libthor

Copy also header with definitions of messages used by thor
protocol.

Change-Id: I0e6901a45737e3711f9328f757f76de96b88bdd3
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
9 years agoUse getopt_long() to parse cmd line 69/68769/1
Krzysztof Opasiak [Fri, 18 Mar 2016 16:35:19 +0000 (17:35 +0100)]
Use getopt_long() to parse cmd line

Use a standard linux way of parsing cmd line arguments
to avoid unnecessary code.

Change-Id: I64325e7804048c1abce013f78df5163ee4af85c8
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
9 years agoAdd gitignore 68/68768/1
Krzysztof Opasiak [Tue, 22 Mar 2016 09:15:08 +0000 (10:15 +0100)]
Add gitignore

Change-Id: I4126d7a25a29414dc92f776da7c2d34c731e2fa9
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
10 years agoUpdate lthor version 63/29663/1
Jaewon Kim [Fri, 31 Oct 2014 09:17:52 +0000 (18:17 +0900)]
Update lthor version

This patch update lthor version to 1.5

Change-Id: Ie25e95b6fd5e4a601c64bdf8c4a3d66f0ed64005
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
10 years agoAdd to pass abnormal file 62/29662/1
Jaewon Kim [Fri, 31 Oct 2014 05:29:02 +0000 (14:29 +0900)]
Add to pass abnormal file

When trying abnormal file(not matched with pit) download,
lthor pass this file.

Change-Id: Ib3c46fdd2f82a4299dfbfcaa9ad64f4b30accb56
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
10 years agoAdd ttyACM check for lthor 61/29661/1
Jaewon Kim [Fri, 12 Sep 2014 10:27:52 +0000 (19:27 +0900)]
Add ttyACM check for lthor

This patch add ttyACM check to find correct port for lthor
even if there are several ttyACM port.

Change-Id: Icb87a9ebbabec2e5fa7c3312efff972488dbc3d1
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
10 years agoRemove vendor and product match code 37/27337/2
Jaewon Kim [Thu, 11 Sep 2014 08:59:32 +0000 (17:59 +0900)]
Remove vendor and product match code

This patch remove vendor and product ID checking code
to support various boards

Change-Id: I6e1bca14e504a072f93d661666a9c623802ef472
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
11 years agoUpdate URL in spec file accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_3.0.m2 tizen_3.0_ivi accepted/tizen/3.0/common/20161114.112423 accepted/tizen/common/20140520.095850 accepted/tizen/ivi/20140604.064621 submit/tizen/20140520.040414 submit/tizen_3.0_common/20161104.104000 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release tizen_3.0_ivi_release
Gaurav Kalra [Sun, 16 Jun 2013 12:05:04 +0000 (17:35 +0530)]
Update URL in spec file

Change-Id: I6913146ba412e2514b0e99c50908a2441f4c9fd0

11 years agoCorrecting usage help for check protocol
Gaurav Kalra [Wed, 19 Jun 2013 16:41:13 +0000 (22:11 +0530)]
Correcting usage help for check protocol

Change-Id: If17ad57e29b50f01011c3435c81fb8f522eaa0b4

11 years agoIncreased version in debian/changelog 93/13493/1
Ed Bartosh [Sun, 8 Dec 2013 17:01:39 +0000 (19:01 +0200)]
Increased version in debian/changelog

Change-Id: Ic49555ddc4d72ed837e78b6a053293c412394a34
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoSupport MAC OS X 10.7,10.8 accepted/tizen/ivi accepted/tizen_ivi_panda tizen_ivi_panda accepted/tizen/20131029.080332 accepted/tizen/20131029.175713 accepted/tizen/20131112.015138 accepted/tizen/ivi/panda/20140403.000127 submit/tizen/20131029.071705 submit/tizen_ivi_panda/20140403.000543
jaehoon.you [Fri, 11 Oct 2013 09:07:57 +0000 (18:07 +0900)]
Support MAC OS X 10.7,10.8

On OS X the serial device must be opened with O_NONBLOCK flag.
Later this flag must be cleared before write operations otherwise
only small chunks data can be written at once.
Tested on OS X (10.8.4).

Author : Piotr Wilczek <p.wilczek@samsung.com>

Change-Id: I2b77cf16aacd491af9c94203fe7dfc49ce361516
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
11 years agoFixed OpenSUSE 1.23 build tizen_2.2 2.2.1_release 2.2_release submit/tizen_2.2/20130714.151824
Ed Bartosh [Thu, 25 Apr 2013 13:53:54 +0000 (16:53 +0300)]
Fixed OpenSUSE 1.23 build

Change-Id: I462628a57597e2cc8892bd705fdbf426361cf024
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
11 years agoFixed deb packaging issues found by lintian
Ed Bartosh [Thu, 25 Apr 2013 13:27:00 +0000 (16:27 +0300)]
Fixed deb packaging issues found by lintian

The following changes have been made:
- removed libc6-dev from the list of build dependencies as it is
  build essential
- Used real Standard-Version
- Used misc:Depends macro
- Updated short description
- Added long description
- Updated package version

Change-Id: Ifa1a52d4e2f109255aa4d1ecb68dc166b57ffa42
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agomodify pkg-confg to pkgconfig
Jinkun Jang [Sat, 15 Jun 2013 14:03:38 +0000 (23:03 +0900)]
modify pkg-confg to pkgconfig

12 years agoMerge branch 'master' into tizen_2.1 2.1b_release accepted/tizen_2.1/20130425.021205 submit/tizen_2.1/20130425.000057
jaehoon.you [Fri, 5 Apr 2013 08:35:52 +0000 (17:35 +0900)]
Merge branch 'master' into tizen_2.1

Conflicts:
AUTHORS
CMakeLists.txt
debian/control
lthor.c
packaging/lthor.spec

Change-Id: Ic566170d83b2319cbcfd3db5813bd9f09e9b2534
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
12 years agoRevert "merge with master"
jaehoon.you [Tue, 2 Apr 2013 12:25:35 +0000 (21:25 +0900)]
Revert "merge with master"

"merge with master" commit changed corrected code. (Prevent 35853)
So, I revert to the original state.

Reference commit : 6ea6a360fa75766b6e56545486e685ccd552ebab

--------------------------------------------------------------------
@@ -1100,7 +1100,7 @@ int test_tar_entry(struct data_src *tardata)
  return -1;
}

- if (!(chunksize <= trans_unit_size && chunksize > 0)) {
+ if ((!chunksize > 0 && chunksize <= trans_unit_size)) {
  free(chunk);
  return -1;
  }
-------------------------------------------------------------------

This reverts commit b90e7745cb6da85cbb7958ef9911bfb6c6d7fef6.

Change-Id: I1a5d0b11d7ddd73288e4dbf528331c623c99d03a

12 years agoChange AUTHORS
jaehoon.you [Tue, 2 Apr 2013 12:08:30 +0000 (21:08 +0900)]
Change AUTHORS

Change-Id: Ib2991a1a6844e5a1827268f0fb4a8303c18f8269
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
12 years agoFix and Add some error message
jaehoon.you [Tue, 2 Apr 2013 11:55:28 +0000 (20:55 +0900)]
Fix and Add some error message

1. In some cases, lthor needs enough memory
(Reported by Vyacheslav Barinov in SRR)
So, notify message added.
2. fix print format about error message.

Change-Id: I42fcea8c21d4183e8909293d2101cebd19ef9dc5
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
12 years agoAdd udev rules for supporting Ubuntu 12.10
jaehoon.you [Tue, 2 Apr 2013 11:43:07 +0000 (20:43 +0900)]
Add udev rules for supporting Ubuntu 12.10

In Ubuntu 12.10, modem-manager interrupt and close Tizen device.
so, add exceptional udev rules for ttyACM connection.

lthor Version 1.2 -> 1.3

Change-Id: I0c88084a8ff0f2e2f39d2b76e6568a81cf1a3e87
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
12 years agomerge with master
Jinkun Jang [Fri, 15 Mar 2013 16:26:09 +0000 (01:26 +0900)]
merge with master

12 years agoTizen 2.1 base
Jinkun Jang [Tue, 12 Mar 2013 17:22:03 +0000 (02:22 +0900)]
Tizen 2.1 base

12 years agoIncluded udev rules into packages
Ed Bartosh [Mon, 28 Jan 2013 08:31:26 +0000 (10:31 +0200)]
Included udev rules into packages

Udev rules set device mode to 0666 in order to give flashing
permissions to everyone. This is handy for developers to being able to
flash devices from user account.

Change-Id: Ibb3ccb6b54c3f3c56df66ad0d17772806f622129
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agoUpdated licence information
Ed Bartosh [Mon, 3 Dec 2012 14:12:07 +0000 (16:12 +0200)]
Updated licence information

Used Apache 2.0 licence for deb and rpm packaging.

Change-Id: I1b54726fa3a13c6752ae76eb3c9f9407708f58f4
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years ago[Prevent] fix Tizen 35853, and update authors list
jaehoon.you [Wed, 9 Jan 2013 06:54:42 +0000 (15:54 +0900)]
[Prevent] fix Tizen 35853, and update authors list

Tizen 35853 : DEADCODE
original code is "assert(chunksize > 0 && chunksize <= trans_unit_size);"
(reference send_chunks() : line 125)
but chunksize already checked before line:1086 (chunksize <= 0)
then, chunksize always bigger than 0 .
so, exclamation mark is moved to another location
and conditional sentence is switched.

Change-Id: I9e5a2f998fb506fd152da856f4c9455f027207a6
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
12 years agochange license file name
Chanho Park [Wed, 23 Jan 2013 07:04:39 +0000 (16:04 +0900)]
change license file name

This patch changes license file name which has meaning of license.

Change-Id: I832a1bfddf65aad2e1765d1b5ba5685f21e39241
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
12 years agoadd license/author informations
Chanho Park [Tue, 15 Jan 2013 01:29:55 +0000 (10:29 +0900)]
add license/author informations

This commit adds license files based on APLv2 license.

Change-Id: Ie80e337479f31660cf6298f7f3ed25fcee985356
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
12 years ago[Prevent] fix Tizen 36515,36516,37705 - STRING_OVERFLOW, RESOURCE_LEAK
jaehoon.you [Tue, 8 Jan 2013 11:37:24 +0000 (20:37 +0900)]
[Prevent] fix Tizen 36515,36516,37705 - STRING_OVERFLOW, RESOURCE_LEAK

Change-Id: I184458fd8419d4e32a9a493f2258dbbdd2637980
Signed-off-by: jaehoon.you <jaehoon.you@samsung.com>
12 years agoMerge "Added option to check protocol availability"
YoungJin Lee [Tue, 20 Nov 2012 23:54:00 +0000 (08:54 +0900)]
Merge "Added option to check protocol availability"

12 years agoPackaged for Debian and Ubuntu
Ed Bartosh [Mon, 12 Nov 2012 17:11:46 +0000 (19:11 +0200)]
Packaged for Debian and Ubuntu

Change-Id: I5f99117eb0bd506dd1d83d691a0b0e9c5f08c944
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agoPackaged for rpm distros
Ed Bartosh [Tue, 6 Nov 2012 16:37:48 +0000 (18:37 +0200)]
Packaged for rpm distros

This is a first commit regarding packaging. It implements packaging for
RPM. Debian packaging will follow.

Change-Id: Ibe45191cd3d06c387c6000c45c1b56ff820d0a87
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agoAdded option to check protocol availability
Ed Bartosh [Tue, 6 Nov 2012 12:51:02 +0000 (14:51 +0200)]
Added option to check protocol availability

This is a first draft(not working yet) to implement a check for LTHOR protocol.
It's needed by our testing software. It should be able to first check if device
is in flashable mode and then perform flashing by running lthor <image.tar>.

To implement this feature correctly I need your help. Is there any way
in THOR protocol to inform the device that it should again wait for
handshake? If I just perform handshake and get information from the
device it will not be possible to flash it after that, because it will
be in active mode, waiting for the commands, not for the handshake.

Is it possible to contact you by email or this is the only communication
channel I can use?

Thank you,
Ed

Change-Id: Ic4cfa954885408343b5aad20fa805b2788c49ee7
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agoinitial commit of lthor
YoungJin Lee [Fri, 2 Nov 2012 10:55:18 +0000 (19:55 +0900)]
initial commit of lthor

Change-Id: Ifd62a81919f2a88a22b38627dd467d53c5408823

12 years agoInitial empty repository
Jung Minsun [Wed, 31 Oct 2012 02:13:51 +0000 (11:13 +0900)]
Initial empty repository