Index: rbutil/rbutilqt/rbutil.ini
===================================================================
--- rbutil/rbutilqt/rbutil.ini	(révision 31217)
+++ rbutil/rbutilqt/rbutil.ini	(copie de travail)
@@ -501,7 +501,7 @@
 [sansafuzeplus]
 name="Sansa Fuze+"
 buildserver_modelname=sansafuzeplus
-bootloadermethod=none ; no bootloader for now
+bootloadermethod=imx
 bootloadername=/sandisk-sansa/fuzeplus/bootloader-fuzeplus.sansa
 bootloaderfile=/firmware.sb
 manualname=
@@ -510,7 +510,7 @@
 usberror=
 configure_modelname=sansafuzeplus
 encoder=rbspeex
-status=disabled
+;status=disabled
 
 [sansam200v4]
 name="Sansa m200v4"
Index: rbutil/rbutilqt/rbutilqt.pri
===================================================================
--- rbutil/rbutilqt/rbutilqt.pri	(révision 31217)
+++ rbutil/rbutilqt/rbutilqt.pri	(copie de travail)
@@ -62,6 +62,7 @@
  base/bootloaderinstallams.cpp \
  base/bootloaderinstalltcc.cpp \
  base/bootloaderinstallmpio.cpp \
+ base/bootloaderinstallimx.cpp \
  base/rockboxinfo.cpp \
  ../../tools/mkboot.c \
  ../../tools/iriver.c \
@@ -128,6 +129,7 @@
  base/bootloaderinstallams.h \
  base/bootloaderinstalltcc.h \
  base/bootloaderinstallmpio.h \
+ base/bootloaderinstallimx.h \
  base/rockboxinfo.h \
  ../../tools/mkboot.h \
  ../../tools/iriver.h \
Index: rbutil/rbutilqt/rbutilqt.pro
===================================================================
--- rbutil/rbutilqt/rbutilqt.pro	(révision 31217)
+++ rbutil/rbutilqt/rbutilqt.pro	(copie de travail)
@@ -100,9 +100,14 @@
         APPVERSION=\"rbutil\" \
         libchinachip$$RBLIBPOSTFIX \
         CC=\"$$QMAKE_CC $$MACHINEFLAGS\" AR=\"$$MYAR\"
+libmkimxboot.commands = @$(MAKE) -s \
+        TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkimxboot \
+        APPVERSION=\"rbutil\" \
+        libmkimxboot$$RBLIBPOSTFIX \
+        CC=\"$$QMAKE_CC $$MACHINEFLAGS\" AR=\"$$MYAR\"
 # Note: order is important for RBLIBS! The libs are appended to the linker
 # flags in this order, put libucl at the end.
-RBLIBS = librbspeex libmkamsboot libmktccboot libmkmpioboot libchinachip libucl
+RBLIBS = librbspeex libmkamsboot libmkimxboot libmktccboot libmkmpioboot libchinachip libucl
 QMAKE_EXTRA_TARGETS += $$RBLIBS
 PRE_TARGETDEPS += $$RBLIBS
 
Index: rbutil/rbutilqt/base/bootloaderinstallimx.h
===================================================================
--- rbutil/rbutilqt/base/bootloaderinstallimx.h	(révision 0)
+++ rbutil/rbutilqt/base/bootloaderinstallimx.h	(révision 0)
@@ -0,0 +1,42 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ *
+ *   Copyright (C) 2011 by Jean-Louis Biasini
+ *
+ * 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 BOOTLOADERINSTALLIMX_H
+#define BOOTLOADERINSTALLIMX_H
+
+#include <QtCore>
+#include "bootloaderinstallbase.h"
+
+//! bootloader installation class for devices handled by mkimxboot.
+class BootloaderInstallImx : public BootloaderInstallBase
+{
+    Q_OBJECT
+    public:
+        BootloaderInstallImx(QObject *parent);
+        bool install(void);
+        bool uninstall(void);
+        BootloaderInstallBase::BootloaderType installed(void);
+        Capabilities capabilities(void);
+        QString ofHint();
+
+    private:
+
+    private slots:
+        void installStage2(void);
+};
+
+#endif
Index: rbutil/rbutilqt/base/bootloaderinstallimx.cpp
===================================================================
--- rbutil/rbutilqt/base/bootloaderinstallimx.cpp	(révision 0)
+++ rbutil/rbutilqt/base/bootloaderinstallimx.cpp	(révision 0)
@@ -0,0 +1,112 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ *
+ *   Copyright (C) 2008 by Dominik Riebeling
+ *
+ * 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 "bootloaderinstallimx.h"
+
+#include "../mkimxboot/mkimxboot.h"
+
+BootloaderInstallImx::BootloaderInstallImx(QObject *parent)
+        : BootloaderInstallBase(parent)
+{
+}
+
+QString BootloaderInstallImx::ofHint()
+{
+    return tr("Bootloader installation requires you to provide "
+              "a copy of the original Sandisk firmware (sb file). "
+              "This firmware file will be patched and then installed to your "
+              "player along with the rockbox bootloader. "
+              "You need to download this file yourself due to legal "
+              "reasons. Please browse the "
+              "<a href='http://forums.sandisk.com/sansa/'>Sansa Forums'</a> "
+              //"or refer to the "
+              //"<a href='http://www.rockbox.org/manual.shtml'>manual</a> and "
+              //"the <a href='http://www.rockbox.org/wiki/SansaAMS'>SansaAMS</a> "
+              //"wiki page on how to obtain this file.<br/>"
+              "Press Ok to continue and browse your computer for the firmware "
+              "file.");
+}
+
+
+/** Start bootloader installation.
+ */
+bool BootloaderInstallImx::install(void)
+{
+    if(m_offile.isEmpty())
+        return false;
+
+    //qDebug() << "[BootloaderInstallImx] 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 BootloaderInstallImx::installStage2(void)
+{
+    qDebug() << "[BootloaderInstallImx] installStage2";
+
+    m_tempfile.open();
+    QString bootfile = m_tempfile.fileName();
+    m_tempfile.close();
+
+    struct imx_option_t opt;
+    
+    /* default option untill we know how to use the interface :)                                  TODO */
+    opt.debug = true;
+    opt.output = IMX_DUALBOOT;
+    const char* outfile = "firmware.sb";
+    enum imx_error_t err = mkimxboot(m_offile.toLocal8Bit().data(), bootfile.toLocal8Bit().data(), outfile, opt);
+
+
+
+
+    //end of install
+    if (err == 0)
+    {
+    qDebug() << "[BootloaderInstallImx] install successfull";
+    emit logItem(tr("Success: modified firmware file created"), LOGINFO);
+    logInstall(LogAdd);
+    emit done(false);
+    }
+    return;
+}
+
+bool BootloaderInstallImx::uninstall(void)
+{
+    emit logItem(tr("To uninstall, perform a normal upgrade with an unmodified "
+                    "original firmware"), LOGINFO);
+    logInstall(LogRemove);
+    return false;
+}
+
+BootloaderInstallBase::BootloaderType BootloaderInstallImx::installed(void)
+{
+    return BootloaderUnknown;
+}
+
+BootloaderInstallBase::Capabilities BootloaderInstallImx::capabilities(void)
+{
+    return (Install | NeedsOf);
+}
Index: rbutil/rbutilqt/base/bootloaderinstallbase.cpp
===================================================================
--- rbutil/rbutilqt/base/bootloaderinstallbase.cpp	(révision 31217)
+++ rbutil/rbutilqt/base/bootloaderinstallbase.cpp	(copie de travail)
@@ -29,6 +29,7 @@
 #include "bootloaderinstallams.h"
 #include "bootloaderinstalltcc.h"
 #include "bootloaderinstallmpio.h"
+#include "bootloaderinstallimx.h"
 #include "utils.h"
 
 #if defined(Q_OS_MACX)
@@ -67,6 +68,9 @@
     else if(type == "mpio") {
         return new BootloaderInstallMpio(parent);
     }
+    else if(type == "imx") {
+        return new BootloaderInstallImx(parent);
+    }
     else {
         return NULL;
     }
