mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
rbutil: add m:robe100 support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16478 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c3e440882c
commit
3c7b060511
3 changed files with 179 additions and 1 deletions
|
|
@ -68,6 +68,12 @@ void BootloaderInstaller::install(ProgressloggerInterface* dp)
|
||||||
connect(this,SIGNAL(prepare()),this,SLOT(iriverPrepare()));
|
connect(this,SIGNAL(prepare()),this,SLOT(iriverPrepare()));
|
||||||
connect(this,SIGNAL(finish()),this,SLOT(iriverFinish()));
|
connect(this,SIGNAL(finish()),this,SLOT(iriverFinish()));
|
||||||
}
|
}
|
||||||
|
else if(m_bootloadermethod == "mrobe100")
|
||||||
|
{
|
||||||
|
// connect internal signal
|
||||||
|
connect(this,SIGNAL(prepare()),this,SLOT(mrobe100Prepare()));
|
||||||
|
connect(this,SIGNAL(finish()),this,SLOT(mrobe100Finish()));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_dp->addItem(tr("unsupported install Method"),LOGERROR);
|
m_dp->addItem(tr("unsupported install Method"),LOGERROR);
|
||||||
|
|
@ -111,6 +117,16 @@ void BootloaderInstaller::uninstall(ProgressloggerInterface* dp)
|
||||||
// connect internal signal
|
// connect internal signal
|
||||||
connect(this,SIGNAL(prepare()),this,SLOT(sansaPrepare()));
|
connect(this,SIGNAL(prepare()),this,SLOT(sansaPrepare()));
|
||||||
}
|
}
|
||||||
|
else if(m_bootloadermethod == "h10")
|
||||||
|
{
|
||||||
|
// connect internal signal
|
||||||
|
connect(this,SIGNAL(prepare()),this,SLOT(h10Prepare()));
|
||||||
|
}
|
||||||
|
else if(m_bootloadermethod == "mrobe100")
|
||||||
|
{
|
||||||
|
// connect internal signal
|
||||||
|
connect(this,SIGNAL(prepare()),this,SLOT(mrobe100Prepare()));
|
||||||
|
}
|
||||||
else if(m_bootloadermethod == "fwpatcher")
|
else if(m_bootloadermethod == "fwpatcher")
|
||||||
{
|
{
|
||||||
m_dp->addItem(tr("No uninstallation possible"),LOGWARNING);
|
m_dp->addItem(tr("No uninstallation possible"),LOGWARNING);
|
||||||
|
|
@ -636,6 +652,149 @@ void BootloaderInstaller::h10Finish()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************
|
||||||
|
*** mrobe100 secific code
|
||||||
|
***************************************************/
|
||||||
|
void BootloaderInstaller::mrobe100Prepare()
|
||||||
|
{
|
||||||
|
if(m_install) // Installation
|
||||||
|
{
|
||||||
|
QString url = m_bootloaderUrlBase + "/olympus/mrobe100/" + m_bootloadername;
|
||||||
|
|
||||||
|
m_dp->addItem(tr("Downloading file %1.%2")
|
||||||
|
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
|
||||||
|
|
||||||
|
// temporary file needs to be opened to get the filename
|
||||||
|
downloadFile.open();
|
||||||
|
m_tempfilename = downloadFile.fileName();
|
||||||
|
downloadFile.close();
|
||||||
|
// get the real file.
|
||||||
|
getter = new HttpGet(this);
|
||||||
|
getter->setProxy(m_proxy);
|
||||||
|
getter->setFile(&downloadFile);
|
||||||
|
getter->getFile(QUrl(url));
|
||||||
|
// connect signals from HttpGet
|
||||||
|
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||||
|
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||||
|
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||||
|
}
|
||||||
|
else // Uninstallation
|
||||||
|
{
|
||||||
|
|
||||||
|
QString firmwarename = m_bootloadername;
|
||||||
|
|
||||||
|
QString firmware = m_mountpoint + "/SYSTEM/" + firmwarename;
|
||||||
|
QString firmwareOrig = m_mountpoint + "/SYSTEM/OF.mi4";
|
||||||
|
|
||||||
|
QFileInfo firmwareFI(firmware);
|
||||||
|
if(!firmwareFI.exists()) //Firmware dosent exists on player
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Firmware does not exist: %1")
|
||||||
|
.arg(firmware),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QFileInfo firmwareOrigFI(firmwareOrig);
|
||||||
|
if(!firmwareOrigFI.exists()) //Original Firmware dosent exists on player
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Original Firmware does not exist: %1")
|
||||||
|
.arg(firmwareOrig),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QFile firmwareFile(firmware);
|
||||||
|
QFile firmwareOrigFile(firmwareOrig);
|
||||||
|
|
||||||
|
//remove modified firmware
|
||||||
|
if(!firmwareFile.remove())
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Could not remove the Firmware at: %1")
|
||||||
|
.arg(firmware),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//copy original firmware
|
||||||
|
if(!firmwareOrigFile.copy(firmware))
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Could not copy the Firmware from: %1 to %2")
|
||||||
|
.arg(firmwareOrig,firmware),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
removeInstallLog();
|
||||||
|
|
||||||
|
emit done(false); //success
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BootloaderInstaller::mrobe100Finish()
|
||||||
|
{
|
||||||
|
QString firmwarename = m_bootloadername;
|
||||||
|
|
||||||
|
QString firmware = m_mountpoint + "/SYSTEM/" + firmwarename;
|
||||||
|
QString firmwareOrig = m_mountpoint + "/SYSTEM/OF.mi4";
|
||||||
|
|
||||||
|
QFileInfo firmwareFI(firmware);
|
||||||
|
|
||||||
|
if(!firmwareFI.exists()) //Firmware dosent exists on player
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Firmware does not exist: %1")
|
||||||
|
.arg(firmware),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QFileInfo firmwareOrigFI(firmwareOrig);
|
||||||
|
|
||||||
|
if(!firmwareOrigFI.exists())
|
||||||
|
{
|
||||||
|
QFile firmwareFile(firmware);
|
||||||
|
|
||||||
|
//backup
|
||||||
|
QDir::home().mkdir("Olympus mrobe100 Original Firmware Backup");
|
||||||
|
firmwareFile.copy(QDir::toNativeSeparators(QDir::homePath()) + QDir::toNativeSeparators("/Olympus mrobe100 Original Firmware Backup/") + m_bootloadername);
|
||||||
|
|
||||||
|
//rename
|
||||||
|
if(!firmwareFile.rename(firmwareOrig)) //rename Firmware to Original
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Could not rename: %1 to %2")
|
||||||
|
.arg(firmware,firmwareOrig),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //there is already a original firmware
|
||||||
|
{
|
||||||
|
QFile firmwareFile(firmware);
|
||||||
|
firmwareFile.remove();
|
||||||
|
}
|
||||||
|
//copy the firmware
|
||||||
|
if(!downloadFile.copy(firmware))
|
||||||
|
{
|
||||||
|
m_dp->addItem(tr("Could not copy: %1 to %2")
|
||||||
|
.arg(m_tempfilename,firmware),LOGERROR);
|
||||||
|
emit done(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadFile.remove();
|
||||||
|
|
||||||
|
createInstallLog();
|
||||||
|
|
||||||
|
m_dp->addItem(tr("Bootloader install finished successfully."),LOGOK);
|
||||||
|
m_dp->abort();
|
||||||
|
|
||||||
|
emit done(false); // success
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
*** ipod secific code
|
*** ipod secific code
|
||||||
***************************************************/
|
***************************************************/
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,10 @@ private slots:
|
||||||
//iriver specific routines
|
//iriver specific routines
|
||||||
void iriverPrepare();
|
void iriverPrepare();
|
||||||
void iriverFinish();
|
void iriverFinish();
|
||||||
|
|
||||||
|
//mrobe100 specific routines
|
||||||
|
void mrobe100Prepare();
|
||||||
|
void mrobe100Finish();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ bleeding_info=http://build.rockbox.org/cvsmod/build-info
|
||||||
font_url=http://www.rockbox.org/daily/fonts/rockbox-fonts.zip
|
font_url=http://www.rockbox.org/daily/fonts/rockbox-fonts.zip
|
||||||
last_release=2.5
|
last_release=2.5
|
||||||
prog_name=rockbox
|
prog_name=rockbox
|
||||||
bootloader_url=http://download.rockbox.org/bootloader
|
bootloader_url=http://haxx.rockbox.org/bootloader
|
||||||
themes_url=http://www.rockbox-themes.org
|
themes_url=http://www.rockbox-themes.org
|
||||||
manual_url=http://download.rockbox.org/manual
|
manual_url=http://download.rockbox.org/manual
|
||||||
doom_url=http://download.rockbox.org/useful/rockdoom.zip
|
doom_url=http://download.rockbox.org/useful/rockdoom.zip
|
||||||
|
|
@ -45,6 +45,8 @@ platform32=iaudiox5v
|
||||||
platform40=gigabeatf
|
platform40=gigabeatf
|
||||||
platform50=sansae200
|
platform50=sansae200
|
||||||
platform51=sansac200
|
platform51=sansac200
|
||||||
|
platform60=mrobe100
|
||||||
|
|
||||||
|
|
||||||
[player]
|
[player]
|
||||||
name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20"
|
name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20"
|
||||||
|
|
@ -439,6 +441,19 @@ usbid=0x07817451
|
||||||
voicename=sansac200
|
voicename=sansac200
|
||||||
targetid=30
|
targetid=30
|
||||||
|
|
||||||
|
[mrobe100]
|
||||||
|
name="Olympus m:robe100"
|
||||||
|
platform=mrobe100
|
||||||
|
released=no
|
||||||
|
needsbootloader=yes
|
||||||
|
bootloadermethod=mrobe100
|
||||||
|
bootloadername=pp5020.mi4
|
||||||
|
resolution=160x128x1
|
||||||
|
manualname=
|
||||||
|
brand=Olympus
|
||||||
|
usbid=0x07B10280
|
||||||
|
voicename=mrobe100
|
||||||
|
targetid=33
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
lang1=africaans
|
lang1=africaans
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue