rbutil: add mpio hd200 as disabled target (all untested)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26561 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2010-06-04 21:43:15 +00:00
parent 0133a4f052
commit fab86a6a4c
7 changed files with 211 additions and 6 deletions

View file

@ -29,6 +29,7 @@
#include "bootloaderinstallchinachip.h"
#include "bootloaderinstallams.h"
#include "bootloaderinstalltcc.h"
#include "bootloaderinstallmpio.h"
#include "utils.h"
#if defined(Q_OS_MACX)
@ -64,6 +65,9 @@ BootloaderInstallBase* BootloaderInstallBase::createBootloaderInstaller(QObject*
else if(type == "tcc") {
return new BootloaderInstallTcc(parent);
}
else if(type == "mpio") {
return new BootloaderInstallMpio(parent);
}
else {
return NULL;
}
@ -212,7 +216,7 @@ QString BootloaderInstallBase::postinstallHints(QString model)
"<li>After the firmware has been updated reboot your player.</li>");
}
if(model == "iaudiox5" || model == "iaudiom5"
|| model == "iaudiox5v" || model == "iaudiom3") {
|| model == "iaudiox5v" || model == "iaudiom3" || model == "mpioh200") {
hint = true;
msg += tr("<li>Turn the player off</li>"
"<li>Insert the charger</li>");
@ -224,7 +228,6 @@ QString BootloaderInstallBase::postinstallHints(QString model)
"<li>Toggle the battery switch on the player</li>"
"<li>Hold <i>Power</i> to boot into Rockbox</li>");
}
msg += "</ol>";
msg += tr("<p><b>Note:</b> You can safely install other parts first, but "
"the above steps are <b>required</b> to finish the installation!</p>");

View file

@ -0,0 +1,140 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* Copyright (C) 2008 by Dominik Wenger
* $Id: bootloaderinstallams.cpp 24778 2010-02-19 23:45:29Z funman $
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include <QtCore>
#include "bootloaderinstallbase.h"
#include "bootloaderinstallmpio.h"
#include "../mkmpioboot/mkmpioboot.h"
BootloaderInstallMpio::BootloaderInstallMpio(QObject *parent)
: BootloaderInstallBase(parent)
{
}
QString BootloaderInstallMpio::ofHint()
{
return tr("Bootloader installation requires you to provide "
"a firmware file of the original firmware (bin file). "
"You need to download this file yourself due to legal "
"reasons. Please refer to the "
"<a href='http://www.rockbox.org/manual.shtml'>manual</a> and "
"the <a href='http://www.rockbox.org/wiki/MPIOHD200Port'>MPIOHD200Port</a> "
"wiki page on how to obtain this file.<br/>"
"Press Ok to continue and browse your computer for the firmware "
"file.");
}
bool BootloaderInstallMpio::install(void)
{
if(m_offile.isEmpty())
return false;
qDebug() << "[BootloaderInstallMpio] 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 BootloaderInstallMpio::installStage2(void)
{
qDebug() << "[BootloaderInstallMpio] installStage2";
int origin = 0xe0000; /* MPIO HD200 bootloader address */
m_tempfile.open();
QString bootfile = m_tempfile.fileName();
m_tempfile.close();
int ret = mkmpioboot(m_offile.toLocal8Bit().data(), bootfile.toLocal8Bit().data(), m_blfile.toLocal8Bit().data(), origin);
if(ret != 0)
{
QString error;
switch(ret)
{
case -1:
error = tr("Could not open the original firmware.");
break;
case -2:
error = tr("Could not read the original firmware.");
break;
case -3:
error = tr("Loaded firmware file does not look like MPIO OF file.");
break;
case -4:
error = tr("Could not open downloaded bootloader.");
break;
case -5:
error = tr("Place for bootloader in OF file not empty.");
break;
case -6:
error = tr("Could not read the downloaded bootloader.");
break;
case -7:
error = tr("Bootloader checksum error.");
break;
case -8:
error = tr("Could not open outputfile.");
break;
case -9:
error = tr("Could not write outputfile.");
break;
default:
error = tr("Unknown errornumber: %1").arg(ret);
break;
}
qDebug() << tr("Patching original firmware failed: %1").arg(error);
emit logItem(tr("Patching original firmware failed: %1").arg(error), LOGERROR);
emit done(true);
return;
}
//end of install
qDebug() << "[BootloaderInstallMpio] install successfull";
emit logItem(tr("Success: modified firmware file created"), LOGINFO);
logInstall(LogAdd);
emit done(false);
return;
}
bool BootloaderInstallMpio::uninstall(void)
{
emit logItem(tr("To uninstall, perform a normal upgrade with an unmodified "
"original firmware"), LOGINFO);
logInstall(LogRemove);
return false;
}
BootloaderInstallBase::BootloaderType BootloaderInstallMpio::installed(void)
{
return BootloaderUnknown;
}
BootloaderInstallBase::Capabilities BootloaderInstallMpio::capabilities(void)
{
return (Install | NeedsOf);
}

View file

@ -0,0 +1,43 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* Copyright (C) 2008 by Dominik Wenger
* $Id: bootloaderinstallams.h 22317 2009-08-15 13:04:21Z Domonoky $
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef BOOTLOADERINSTALLMPIO_H
#define BOOTLOADERINSTALLMPIO_H
#include <QtCore>
#include "bootloaderinstallbase.h"
//! bootloader installation derivate based on mkmpioboot
class BootloaderInstallMpio : public BootloaderInstallBase
{
Q_OBJECT
public:
BootloaderInstallMpio(QObject *parent);
bool install(void);
bool uninstall(void);
BootloaderInstallBase::BootloaderType installed(void);
Capabilities capabilities(void);
QString ofHint();
private:
private slots:
void installStage2(void);
};
#endif

View file

@ -65,6 +65,7 @@ platform71=samsungyh920
platform72=samsungyh925
platform73=cowond2
platform80=vibe500
platform90=mpiohd200
[archosplayer]
name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20"
@ -618,6 +619,19 @@ usberror=0x04098039
configure_modelname=vibe500
encoder=rbspeex
[mpiohd200]
name="MPIO HD200"
buildserver_modelname=mpiohd200
bootloadermethod=mpio
bootloadername=/mpiohd200/bootloader.mpio
bootloaderfile=/System/HD200_UPG.SYS
manualname=
brand=MPIO
usbid=0x27351004
configure_modelname=mpiohd200
encoder=rbspeex
status=disabled
[05ac1240]
name="Apple Ipod Nano (Second Generation, DFU Mode)"

View file

@ -43,7 +43,7 @@
#include "progressloggerinterface.h"
#include "bootloaderinstallbase.h"
#include "bootloaderinstallmpio.h"
#if defined(Q_OS_LINUX)
#include <stdio.h>

View file

@ -67,6 +67,7 @@ SOURCES += \
base/bootloaderinstallchinachip.cpp \
base/bootloaderinstallams.cpp \
base/bootloaderinstalltcc.cpp \
base/bootloaderinstallmpio.cpp \
base/rockboxinfo.cpp \
../../tools/mkboot.c \
../../tools/iriver.c \
@ -133,6 +134,7 @@ HEADERS += \
base/bootloaderinstallchinachip.h \
base/bootloaderinstallams.h \
base/bootloaderinstalltcc.h \
base/bootloaderinstallmpio.h \
base/rockboxinfo.h \
../../tools/mkboot.h \
../../tools/iriver.h \

View file

@ -63,8 +63,11 @@ libmkamsboot.commands = @$(MAKE) \
libmktccboot.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \
libmktccboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot
PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot
libmkmpioboot.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \
libmkmpioboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot
PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot
# rule for creating ctags file
tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES)
@ -86,7 +89,7 @@ INCLUDEPATH += $$RBBASE_DIR/rbutil/ipodpatcher $$RBBASE_DIR/rbutil/sansapatcher
DEPENDPATH = $$INCLUDEPATH
LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lucl
LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl
# check for system speex. Add a custom rule for pre-building librbspeex if not
# found. Newer versions of speex are split up into libspeex and libspeexdsp,