summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2010-01-19 21:59:25 +0000
committerDominik Wenger <domonoky@googlemail.com>2010-01-19 21:59:25 +0000
commit8d29cadaa1b92561862f1514c2cca3962e486d80 (patch)
treebe13b7e128405f1a7449626c998140e1d6257fc0
parent82fa01e3911e1bf54e387e53cecd31409d64cc4f (diff)
downloadrockbox-8d29cadaa1b92561862f1514c2cca3962e486d80.tar.gz
rockbox-8d29cadaa1b92561862f1514c2cca3962e486d80.tar.bz2
rockbox-8d29cadaa1b92561862f1514c2cca3962e486d80.zip
rbutil: add a few qDebug outputs, to better track the install process in BootloaderInstallAms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24288 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallams.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallams.cpp b/rbutil/rbutilqt/base/bootloaderinstallams.cpp
index dfa5d9f2b6..24fb3eb490 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallams.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallams.cpp
@@ -45,6 +45,8 @@ bool BootloaderInstallAms::install(void)
{
if(m_offile.isEmpty())
return false;
+
+ qDebug() << "[BootloaderInstallAms] installing bootloader";
// download firmware from server
emit logItem(tr("Downloading bootloader file"), LOGINFO);
@@ -57,6 +59,8 @@ bool BootloaderInstallAms::install(void)
void BootloaderInstallAms::installStage2(void)
{
+ qDebug() << "[BootloaderInstallAms] installStage2";
+
unsigned char* buf;
unsigned char* of_packed;
int of_packedsize;
@@ -82,6 +86,7 @@ void BootloaderInstallAms::installStage2(void)
&of_packed,&of_packedsize,errstr,sizeof(errstr));
if (buf == NULL)
{
+ qDebug() << "[BootloaderInstallAms] could not load OF: " << m_offile;
emit logItem(errstr, LOGERROR);
emit logItem(tr("Could not load %1").arg(m_offile), LOGERROR);
emit done(true);
@@ -92,7 +97,8 @@ void BootloaderInstallAms::installStage2(void)
rb_packed = load_rockbox_file(bootfile.toLocal8Bit().data(), sum.model, &bootloader_size,&rb_packedsize,
errstr,sizeof(errstr));
if (rb_packed == NULL)
- {
+ {
+ qDebug() << "[BootloaderInstallAms] could not load bootloader: " << bootfile;
emit logItem(errstr, LOGERROR);
emit logItem(tr("Could not load %1").arg(bootfile), LOGERROR);
free(buf);
@@ -105,6 +111,7 @@ void BootloaderInstallAms::installStage2(void)
totalsize = total_size(sum.model,rb_packedsize,of_packedsize);
if (totalsize > firmware_size)
{
+ qDebug() << "[BootloaderInstallAms] No room to insert bootloader";
emit logItem("No room to insert bootloader, try another firmware version",LOGERROR);
free(buf);
free(of_packed);
@@ -123,6 +130,7 @@ void BootloaderInstallAms::installStage2(void)
if(!out.open(QIODevice::WriteOnly | QIODevice::Truncate))
{
+ qDebug() << "[BootloaderInstallAms] Could not open" << m_blfile "for writing";
emit logItem(tr("Could not open %1 for writing").arg(m_blfile),LOGERROR);
free(buf);
free(of_packed);
@@ -135,6 +143,7 @@ void BootloaderInstallAms::installStage2(void)
if (n != len)
{
+ qDebug() << "[BootloaderInstallAms] Could not write firmware file";
emit logItem(tr("Could not write firmware file"),LOGERROR);
free(buf);
free(of_packed);
@@ -150,6 +159,7 @@ void BootloaderInstallAms::installStage2(void)
free(rb_packed);
//end of install
+ qDebug() << "[BootloaderInstallAms] install successfull";
emit logItem(tr("Success: modified firmware file created"), LOGINFO);
logInstall(LogAdd);
emit done(false);