forked from len0rd/rockbox
Fix bootloader uninstallation on Gigabeat F / X.
The "file" bootloader installation method usually can uninstall the bootloader. Some upgrade methods (like the Iaudio players) remove the bootloader file placed on the player after upgrading so those can't uninstall the bootloader. Instead of rejecting uninstallation for all players using this method check the current bootloader and only display an error if no suitable bootloader is found (which would happen in the Iaudio case). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30070 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c891ddb506
commit
dfd4183a7d
2 changed files with 13 additions and 10 deletions
|
@ -141,6 +141,6 @@ BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void)
|
|||
BootloaderInstallBase::Capabilities BootloaderInstallFile::capabilities(void)
|
||||
{
|
||||
qDebug() << "[BootloaderInstallFile] getting capabilities";
|
||||
return Install | IsFile | CanCheckInstalled | Backup;
|
||||
return Install | Uninstall | IsFile | CanCheckInstalled | Backup;
|
||||
}
|
||||
|
||||
|
|
|
@ -1045,15 +1045,6 @@ void RbUtilQt::uninstallBootloader(void)
|
|||
logger->setFinished();
|
||||
return;
|
||||
}
|
||||
if( (bl->capabilities() & BootloaderInstallBase::Uninstall) == 0)
|
||||
{
|
||||
logger->addItem(tr("Rockbox Utility can not uninstall the bootloader on this target. "
|
||||
"Try a normal firmware update to remove the booloader."), LOGERROR);
|
||||
logger->setFinished();
|
||||
delete bl;
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList blfile = SystemInfo::value(SystemInfo::CurBootloaderFile).toStringList();
|
||||
QStringList blfilepath;
|
||||
for(int a = 0; a < blfile.size(); a++) {
|
||||
|
@ -1062,6 +1053,18 @@ void RbUtilQt::uninstallBootloader(void)
|
|||
}
|
||||
bl->setBlFile(blfilepath);
|
||||
|
||||
BootloaderInstallBase::BootloaderType currentbl = bl->installed();
|
||||
if((bl->capabilities() & BootloaderInstallBase::Uninstall) == 0
|
||||
|| currentbl == BootloaderInstallBase::BootloaderUnknown
|
||||
|| currentbl == BootloaderInstallBase::BootloaderOther)
|
||||
{
|
||||
logger->addItem(tr("Rockbox Utility can not uninstall the bootloader on this target. "
|
||||
"Try a normal firmware update to remove the booloader."), LOGERROR);
|
||||
logger->setFinished();
|
||||
delete bl;
|
||||
return;
|
||||
}
|
||||
|
||||
connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
|
||||
connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue