diff options
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallbase.cpp | 7 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallmpio.cpp | 140 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallmpio.h | 43 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutil.ini | 14 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pri | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pro | 9 |
7 files changed, 211 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp index 3a94180aab..cf8b9e12fd 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "bootloaderinstallchinachip.h" | 29 | #include "bootloaderinstallchinachip.h" |
30 | #include "bootloaderinstallams.h" | 30 | #include "bootloaderinstallams.h" |
31 | #include "bootloaderinstalltcc.h" | 31 | #include "bootloaderinstalltcc.h" |
32 | #include "bootloaderinstallmpio.h" | ||
32 | #include "utils.h" | 33 | #include "utils.h" |
33 | 34 | ||
34 | #if defined(Q_OS_MACX) | 35 | #if defined(Q_OS_MACX) |
@@ -64,6 +65,9 @@ BootloaderInstallBase* BootloaderInstallBase::createBootloaderInstaller(QObject* | |||
64 | else if(type == "tcc") { | 65 | else if(type == "tcc") { |
65 | return new BootloaderInstallTcc(parent); | 66 | return new BootloaderInstallTcc(parent); |
66 | } | 67 | } |
68 | else if(type == "mpio") { | ||
69 | return new BootloaderInstallMpio(parent); | ||
70 | } | ||
67 | else { | 71 | else { |
68 | return NULL; | 72 | return NULL; |
69 | } | 73 | } |
@@ -212,7 +216,7 @@ QString BootloaderInstallBase::postinstallHints(QString model) | |||
212 | "<li>After the firmware has been updated reboot your player.</li>"); | 216 | "<li>After the firmware has been updated reboot your player.</li>"); |
213 | } | 217 | } |
214 | if(model == "iaudiox5" || model == "iaudiom5" | 218 | if(model == "iaudiox5" || model == "iaudiom5" |
215 | || model == "iaudiox5v" || model == "iaudiom3") { | 219 | || model == "iaudiox5v" || model == "iaudiom3" || model == "mpioh200") { |
216 | hint = true; | 220 | hint = true; |
217 | msg += tr("<li>Turn the player off</li>" | 221 | msg += tr("<li>Turn the player off</li>" |
218 | "<li>Insert the charger</li>"); | 222 | "<li>Insert the charger</li>"); |
@@ -224,7 +228,6 @@ QString BootloaderInstallBase::postinstallHints(QString model) | |||
224 | "<li>Toggle the battery switch on the player</li>" | 228 | "<li>Toggle the battery switch on the player</li>" |
225 | "<li>Hold <i>Power</i> to boot into Rockbox</li>"); | 229 | "<li>Hold <i>Power</i> to boot into Rockbox</li>"); |
226 | } | 230 | } |
227 | |||
228 | msg += "</ol>"; | 231 | msg += "</ol>"; |
229 | msg += tr("<p><b>Note:</b> You can safely install other parts first, but " | 232 | msg += tr("<p><b>Note:</b> You can safely install other parts first, but " |
230 | "the above steps are <b>required</b> to finish the installation!</p>"); | 233 | "the above steps are <b>required</b> to finish the installation!</p>"); |
diff --git a/rbutil/rbutilqt/base/bootloaderinstallmpio.cpp b/rbutil/rbutilqt/base/bootloaderinstallmpio.cpp new file mode 100644 index 0000000000..d6db46f0ae --- /dev/null +++ b/rbutil/rbutilqt/base/bootloaderinstallmpio.cpp | |||
@@ -0,0 +1,140 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2008 by Dominik Wenger | ||
10 | * $Id: bootloaderinstallams.cpp 24778 2010-02-19 23:45:29Z funman $ | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include <QtCore> | ||
21 | #include "bootloaderinstallbase.h" | ||
22 | #include "bootloaderinstallmpio.h" | ||
23 | |||
24 | #include "../mkmpioboot/mkmpioboot.h" | ||
25 | |||
26 | BootloaderInstallMpio::BootloaderInstallMpio(QObject *parent) | ||
27 | : BootloaderInstallBase(parent) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | QString BootloaderInstallMpio::ofHint() | ||
32 | { | ||
33 | return tr("Bootloader installation requires you to provide " | ||
34 | "a firmware file of the original firmware (bin file). " | ||
35 | "You need to download this file yourself due to legal " | ||
36 | "reasons. Please refer to the " | ||
37 | "<a href='http://www.rockbox.org/manual.shtml'>manual</a> and " | ||
38 | "the <a href='http://www.rockbox.org/wiki/MPIOHD200Port'>MPIOHD200Port</a> " | ||
39 | "wiki page on how to obtain this file.<br/>" | ||
40 | "Press Ok to continue and browse your computer for the firmware " | ||
41 | "file."); | ||
42 | } | ||
43 | |||
44 | bool BootloaderInstallMpio::install(void) | ||
45 | { | ||
46 | if(m_offile.isEmpty()) | ||
47 | return false; | ||
48 | |||
49 | qDebug() << "[BootloaderInstallMpio] installing bootloader"; | ||
50 | |||
51 | // download firmware from server | ||
52 | emit logItem(tr("Downloading bootloader file"), LOGINFO); | ||
53 | |||
54 | connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2())); | ||
55 | downloadBlStart(m_blurl); | ||
56 | |||
57 | return true; | ||
58 | } | ||
59 | |||
60 | void BootloaderInstallMpio::installStage2(void) | ||
61 | { | ||
62 | qDebug() << "[BootloaderInstallMpio] installStage2"; | ||
63 | |||
64 | int origin = 0xe0000; /* MPIO HD200 bootloader address */ | ||
65 | |||
66 | m_tempfile.open(); | ||
67 | QString bootfile = m_tempfile.fileName(); | ||
68 | m_tempfile.close(); | ||
69 | |||
70 | int ret = mkmpioboot(m_offile.toLocal8Bit().data(), bootfile.toLocal8Bit().data(), m_blfile.toLocal8Bit().data(), origin); | ||
71 | |||
72 | if(ret != 0) | ||
73 | { | ||
74 | QString error; | ||
75 | switch(ret) | ||
76 | { | ||
77 | case -1: | ||
78 | error = tr("Could not open the original firmware."); | ||
79 | break; | ||
80 | case -2: | ||
81 | error = tr("Could not read the original firmware."); | ||
82 | break; | ||
83 | case -3: | ||
84 | error = tr("Loaded firmware file does not look like MPIO OF file."); | ||
85 | break; | ||
86 | case -4: | ||
87 | error = tr("Could not open downloaded bootloader."); | ||
88 | break; | ||
89 | case -5: | ||
90 | error = tr("Place for bootloader in OF file not empty."); | ||
91 | break; | ||
92 | case -6: | ||
93 | error = tr("Could not read the downloaded bootloader."); | ||
94 | break; | ||
95 | case -7: | ||
96 | error = tr("Bootloader checksum error."); | ||
97 | break; | ||
98 | case -8: | ||
99 | error = tr("Could not open outputfile."); | ||
100 | break; | ||
101 | case -9: | ||
102 | error = tr("Could not write outputfile."); | ||
103 | break; | ||
104 | default: | ||
105 | error = tr("Unknown errornumber: %1").arg(ret); | ||
106 | break; | ||
107 | } | ||
108 | |||
109 | qDebug() << tr("Patching original firmware failed: %1").arg(error); | ||
110 | emit logItem(tr("Patching original firmware failed: %1").arg(error), LOGERROR); | ||
111 | emit done(true); | ||
112 | return; | ||
113 | } | ||
114 | |||
115 | //end of install | ||
116 | qDebug() << "[BootloaderInstallMpio] install successfull"; | ||
117 | emit logItem(tr("Success: modified firmware file created"), LOGINFO); | ||
118 | logInstall(LogAdd); | ||
119 | emit done(false); | ||
120 | return; | ||
121 | } | ||
122 | |||
123 | bool BootloaderInstallMpio::uninstall(void) | ||
124 | { | ||
125 | emit logItem(tr("To uninstall, perform a normal upgrade with an unmodified " | ||
126 | "original firmware"), LOGINFO); | ||
127 | logInstall(LogRemove); | ||
128 | return false; | ||
129 | } | ||
130 | |||
131 | BootloaderInstallBase::BootloaderType BootloaderInstallMpio::installed(void) | ||
132 | { | ||
133 | return BootloaderUnknown; | ||
134 | } | ||
135 | |||
136 | BootloaderInstallBase::Capabilities BootloaderInstallMpio::capabilities(void) | ||
137 | { | ||
138 | return (Install | NeedsOf); | ||
139 | } | ||
140 | |||
diff --git a/rbutil/rbutilqt/base/bootloaderinstallmpio.h b/rbutil/rbutilqt/base/bootloaderinstallmpio.h new file mode 100644 index 0000000000..8e6c65affe --- /dev/null +++ b/rbutil/rbutilqt/base/bootloaderinstallmpio.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2008 by Dominik Wenger | ||
10 | * $Id: bootloaderinstallams.h 22317 2009-08-15 13:04:21Z Domonoky $ | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef BOOTLOADERINSTALLMPIO_H | ||
20 | #define BOOTLOADERINSTALLMPIO_H | ||
21 | |||
22 | #include <QtCore> | ||
23 | #include "bootloaderinstallbase.h" | ||
24 | |||
25 | //! bootloader installation derivate based on mkmpioboot | ||
26 | class BootloaderInstallMpio : public BootloaderInstallBase | ||
27 | { | ||
28 | Q_OBJECT | ||
29 | public: | ||
30 | BootloaderInstallMpio(QObject *parent); | ||
31 | bool install(void); | ||
32 | bool uninstall(void); | ||
33 | BootloaderInstallBase::BootloaderType installed(void); | ||
34 | Capabilities capabilities(void); | ||
35 | QString ofHint(); | ||
36 | |||
37 | private: | ||
38 | |||
39 | private slots: | ||
40 | void installStage2(void); | ||
41 | }; | ||
42 | |||
43 | #endif | ||
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini index bcef5d7d49..8fe6395d7c 100644 --- a/rbutil/rbutilqt/rbutil.ini +++ b/rbutil/rbutilqt/rbutil.ini | |||
@@ -65,6 +65,7 @@ platform71=samsungyh920 | |||
65 | platform72=samsungyh925 | 65 | platform72=samsungyh925 |
66 | platform73=cowond2 | 66 | platform73=cowond2 |
67 | platform80=vibe500 | 67 | platform80=vibe500 |
68 | platform90=mpiohd200 | ||
68 | 69 | ||
69 | [archosplayer] | 70 | [archosplayer] |
70 | name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20" | 71 | name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20" |
@@ -618,6 +619,19 @@ usberror=0x04098039 | |||
618 | configure_modelname=vibe500 | 619 | configure_modelname=vibe500 |
619 | encoder=rbspeex | 620 | encoder=rbspeex |
620 | 621 | ||
622 | [mpiohd200] | ||
623 | name="MPIO HD200" | ||
624 | buildserver_modelname=mpiohd200 | ||
625 | bootloadermethod=mpio | ||
626 | bootloadername=/mpiohd200/bootloader.mpio | ||
627 | bootloaderfile=/System/HD200_UPG.SYS | ||
628 | manualname= | ||
629 | brand=MPIO | ||
630 | usbid=0x27351004 | ||
631 | configure_modelname=mpiohd200 | ||
632 | encoder=rbspeex | ||
633 | status=disabled | ||
634 | |||
621 | [05ac1240] | 635 | [05ac1240] |
622 | name="Apple Ipod Nano (Second Generation, DFU Mode)" | 636 | name="Apple Ipod Nano (Second Generation, DFU Mode)" |
623 | 637 | ||
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 29ba0e9c81..66e41944f1 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "progressloggerinterface.h" | 43 | #include "progressloggerinterface.h" |
44 | 44 | ||
45 | #include "bootloaderinstallbase.h" | 45 | #include "bootloaderinstallbase.h" |
46 | 46 | #include "bootloaderinstallmpio.h" | |
47 | 47 | ||
48 | #if defined(Q_OS_LINUX) | 48 | #if defined(Q_OS_LINUX) |
49 | #include <stdio.h> | 49 | #include <stdio.h> |
diff --git a/rbutil/rbutilqt/rbutilqt.pri b/rbutil/rbutilqt/rbutilqt.pri index 53742570df..63d182a0ab 100644 --- a/rbutil/rbutilqt/rbutilqt.pri +++ b/rbutil/rbutilqt/rbutilqt.pri | |||
@@ -67,6 +67,7 @@ SOURCES += \ | |||
67 | base/bootloaderinstallchinachip.cpp \ | 67 | base/bootloaderinstallchinachip.cpp \ |
68 | base/bootloaderinstallams.cpp \ | 68 | base/bootloaderinstallams.cpp \ |
69 | base/bootloaderinstalltcc.cpp \ | 69 | base/bootloaderinstalltcc.cpp \ |
70 | base/bootloaderinstallmpio.cpp \ | ||
70 | base/rockboxinfo.cpp \ | 71 | base/rockboxinfo.cpp \ |
71 | ../../tools/mkboot.c \ | 72 | ../../tools/mkboot.c \ |
72 | ../../tools/iriver.c \ | 73 | ../../tools/iriver.c \ |
@@ -133,6 +134,7 @@ HEADERS += \ | |||
133 | base/bootloaderinstallchinachip.h \ | 134 | base/bootloaderinstallchinachip.h \ |
134 | base/bootloaderinstallams.h \ | 135 | base/bootloaderinstallams.h \ |
135 | base/bootloaderinstalltcc.h \ | 136 | base/bootloaderinstalltcc.h \ |
137 | base/bootloaderinstallmpio.h \ | ||
136 | base/rockboxinfo.h \ | 138 | base/rockboxinfo.h \ |
137 | ../../tools/mkboot.h \ | 139 | ../../tools/mkboot.h \ |
138 | ../../tools/iriver.h \ | 140 | ../../tools/iriver.h \ |
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index bb191f59c9..13f31de164 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro | |||
@@ -63,8 +63,11 @@ libmkamsboot.commands = @$(MAKE) \ | |||
63 | libmktccboot.commands = @$(MAKE) \ | 63 | libmktccboot.commands = @$(MAKE) \ |
64 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \ | 64 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \ |
65 | libmktccboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\" | 65 | libmktccboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\" |
66 | QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot | 66 | libmkmpioboot.commands = @$(MAKE) \ |
67 | PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot | 67 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \ |
68 | libmkmpioboot$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\" | ||
69 | QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot | ||
70 | PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot | ||
68 | 71 | ||
69 | # rule for creating ctags file | 72 | # rule for creating ctags file |
70 | tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES) | 73 | 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 | |||
86 | 89 | ||
87 | DEPENDPATH = $$INCLUDEPATH | 90 | DEPENDPATH = $$INCLUDEPATH |
88 | 91 | ||
89 | LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lucl | 92 | LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl |
90 | 93 | ||
91 | # check for system speex. Add a custom rule for pre-building librbspeex if not | 94 | # check for system speex. Add a custom rule for pre-building librbspeex if not |
92 | # found. Newer versions of speex are split up into libspeex and libspeexdsp, | 95 | # found. Newer versions of speex are split up into libspeex and libspeexdsp, |