From a2c3e3fd0dee8ba65e0bb1bd3216fb5df9efcb74 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 9 Jun 2013 17:32:30 +0200 Subject: Add note to AMS bootloader installation about OF file. Some devices contain a bin file in the root folder of the player. This caused confusion a couple of times, since the installer asks for a bin file. Add a note that the required file is not present on the player and will get removed automatically. Change-Id: I6cd5c25b319770555c3939377a3ed86ed3181dad --- rbutil/rbutilqt/base/bootloaderinstallams.cpp | 36 ++++++++++++++------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'rbutil/rbutilqt/base') diff --git a/rbutil/rbutilqt/base/bootloaderinstallams.cpp b/rbutil/rbutilqt/base/bootloaderinstallams.cpp index 132578bee7..051093eccc 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallams.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallams.cpp @@ -40,6 +40,8 @@ QString BootloaderInstallAms::ofHint() "manual and " "the SansaAMS " "wiki page on how to obtain this file.
" + "Note: This file is not present on your player and will " + "disappear automatically after installing it.

" "Press Ok to continue and browse your computer for the firmware " "file."); } @@ -48,22 +50,22 @@ 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); - + connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2())); downloadBlStart(m_blurl); - + return true; } void BootloaderInstallAms::installStage2(void) -{ +{ qDebug() << "[BootloaderInstallAms] installStage2"; - + unsigned char* buf; unsigned char* of_packed; int of_packedsize; @@ -79,9 +81,9 @@ void BootloaderInstallAms::installStage2(void) int patchable; int totalsize; char errstr[200]; - - sum.md5 = md5sum; - + + sum.md5 = md5sum; + m_tempfile.open(); QString bootfile = m_tempfile.fileName(); m_tempfile.close(); @@ -91,14 +93,14 @@ void BootloaderInstallAms::installStage2(void) &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); emit done(true); return; } - + /* Load original firmware file */ buf = load_of_file(m_offile.toLocal8Bit().data(), model, &len, &sum, &firmware_size, &of_packed ,&of_packedsize, @@ -129,16 +131,16 @@ void BootloaderInstallAms::installStage2(void) emit done(true); return; } - + /* patch the firmware */ emit logItem(tr("Patching Firmware..."), LOGINFO); - + patch_firmware(sum.model,firmware_revision(sum.model),firmware_size,buf, len,of_packed,of_packedsize,rb_packed,rb_packedsize); /* write out file */ QFile out(m_blfile); - + if(!out.open(QIODevice::WriteOnly | QIODevice::Truncate)) { qDebug() << "[BootloaderInstallAms] Could not open" << m_blfile << "for writing"; @@ -149,7 +151,7 @@ void BootloaderInstallAms::installStage2(void) emit done(true); return; } - + n = out.write((char*)buf, len); if (n != len) @@ -164,11 +166,11 @@ void BootloaderInstallAms::installStage2(void) } out.close(); - + free(buf); free(of_packed); free(rb_packed); - + //end of install qDebug() << "[BootloaderInstallAms] install successfull"; emit logItem(tr("Success: modified firmware file created"), LOGINFO); -- cgit v1.2.3