summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOla Borgelin <ola.borgelin@stericsson.com>2011-06-09 11:36:08 +0200
committerOla Borgelin <ola.borgelin@stericsson.com>2011-06-09 11:36:08 +0200
commit6afe5426242576e5af531365cafef0098b149b6d (patch)
tree6e98e119271e54fb8bf886a846b6e97fac102a8d
parentb76c2437f1017bda4879a3a8ee6ddd00fdb5c281 (diff)
Riff stabilty fixes
Add support for files larger than 4 GB and improve stability.
-rwxr-xr-xCDAL/CDAL.cpp2
-rwxr-xr-x[-rw-r--r--]LICENSE0
-rwxr-xr-xREADME5
-rwxr-xr-xpackages/control6
-rwxr-xr-xriff/ProcessRawImage.cpp13
-rwxr-xr-xriff/ProcessRawImage.h2
-rwxr-xr-xriff/main.cpp4
7 files changed, 18 insertions, 14 deletions
diff --git a/CDAL/CDAL.cpp b/CDAL/CDAL.cpp
index 24ded12..99cadf7 100755
--- a/CDAL/CDAL.cpp
+++ b/CDAL/CDAL.cpp
@@ -29,7 +29,7 @@ static int DUT_PRODUCT_ID = 0x8500;
static libusb_context* context;
static Thread* workerThread;
static void* LibusbWorker(void* arg);
-bool shutdown = false;
+volatile bool shutdown = false;
int error = 0;
static EventCallback_t OnDeviceCallback = NULL;
diff --git a/LICENSE b/LICENSE
index f7a800f..f7a800f 100644..100755
--- a/LICENSE
+++ b/LICENSE
diff --git a/README b/README
index 3963a4d..0a8bece 100755
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-riff - Raw Image File Flasher version 0.4.0
+riff - Raw Image File Flasher version 0.4.2
=================================================================================
Description:
@@ -102,7 +102,8 @@ Version history and changelog:
=================================================================================
0.3.0 Initial version.
0.4.0 Dump functionality added.
-0.4.1 Packaging and README updated
+0.4.1 Packaging and README updated.
+0.4.2 Larger image file support.
=================================================================================
Contact and support
diff --git a/packages/control b/packages/control
index 07c35bb..8e933d5 100755
--- a/packages/control
+++ b/packages/control
@@ -1,9 +1,9 @@
Package: riff
-Version: 0.4.0
+Version: 0.4.2
Priority: optional
Architecture: all
-Depends: libusb-1.0-0, riff-configpack (>= 0.4.0), riff-loadercomm (>= 0.4.0)
+Depends: libusb-1.0-0, riff-configpack (>= 0.4.2), riff-loadercomm (>= 0.4.2)
Installed-Size:
-Maintainer: igloocommunity
+Maintainer: packages@igloocommunity.org
Section: devel
Description: A flashing tool initially developed for igloocommunity.org and snowball devices.
diff --git a/riff/ProcessRawImage.cpp b/riff/ProcessRawImage.cpp
index a46337b..77f9715 100755
--- a/riff/ProcessRawImage.cpp
+++ b/riff/ProcessRawImage.cpp
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <sys/stat.h>
#include "LCDriver.h"
+
using namespace flash;
ProcessRawImage::ProcessRawImage(const char* path, uint64 start, int useBulk, int deleteBuffers):
@@ -36,8 +37,9 @@ ProcessRawImage::ProcessRawImage(const char* path, uint64 start, int useBulk, in
int ProcessRawImage::run(DUT* dut)
{
- logger_.log(Logger::PROGRESS, "Flashing raw image...");
+ logger_.log(Logger::PROGRESS, "Flashing raw image...");
uint64 length = filesize(pchPath);
+ logger_.log(Logger::PROGRESS, "Filesize: %lld", length);
int error = 0;
if (length != 0) {
@@ -60,13 +62,14 @@ int ProcessRawImage::run(DUT* dut)
return error;
}
-size_t ProcessRawImage::filesize(const char* filename)
+uint64 ProcessRawImage::filesize(const char* filename)
{
- struct stat st;
+ struct stat64 st;
- if (stat(filename, &st) == 0)
+ if (stat64(filename, &st) == 0)
+ {
return st.st_size;
-
+ }
return 0;
}
diff --git a/riff/ProcessRawImage.h b/riff/ProcessRawImage.h
index b429b88..7042e17 100755
--- a/riff/ProcessRawImage.h
+++ b/riff/ProcessRawImage.h
@@ -49,7 +49,7 @@ public:
private:
Logger logger_;
- size_t filesize(const char* filename);
+ uint64 filesize(const char* filename);
const char* pchPath;
uint64 uiStart;
uint32 uiDevice;
diff --git a/riff/main.cpp b/riff/main.cpp
index 076a65f..5ce8e65 100755
--- a/riff/main.cpp
+++ b/riff/main.cpp
@@ -26,11 +26,11 @@
#include <cstdio>
using namespace std;
-bool isDone = false;
+volatile bool isDone = false;
const string info = \
"\n \
----------------------- riff - Raw Image File Flasher -------------------------\n \
-Version: 0.4.1\n \
+Version: 0.4.2\n \
"
"Flash a device. Try `riff --help' for more information. \n \
"