Fansite and Forum for Meizu Products
 
       



Go Back   Meizu Me > General > Community Development > Rockbox

Using DFU Tool on Linux using QEMU

Rockbox

Reply
 
Thread Tools Display Modes
Old 05-26-2008   #1 (permalink)
Member wpyh is on a distinguished road
 
Join Date: Jan 2008
Location: Indonesia
Posts: 106
Using DFU Tool on Linux using QEMU

I've done an experiment with my M6 SP on using DFU Tool inside QEMU on Linux. The answer is currently "maybe".

Preparation:
1. Get the USBID of the DFU device: Put the device into DFU mode and connect it to the computer, then use lsusb to see the USBID.
2. Install Windows XP inside QEMU, and then install DFU Tool on it.
3. Copy M6.EBN into the DFU Tool folder in the Windows XP installation.

Steps:
1. Mount usbfs at /proc/bus/usb.
2. Run QEMU as root. Remember to enable the USB option (-usb).
3. Hold the M and Play buttons, then connect the M6 to the computer.
4. Switch to the QEMU Monitor and add the usb device: usb_add host:0419:0141 (the USBID's for other models might be different).
5. Switch back to the Windows XP desktop and run the DFU Tool.
6. See that the device is detected, then press the "Download" button.

My QEMU crashed at this point. This is the dmesg line:
qemu[6429]: segfault at 220a2ec ip b7c40810 sp bfdfddec error 4 in libc-2.6.1.so[b7bd9000+12e000]

That's why I said the answer is "maybe": maybe there is a bug in QEMU that prevents the download process from starting correctly. But there is certainly hope
wpyh is offline   Reply With Quote
Old 06-13-2008   #2 (permalink)
Passing By Wbdsgnr is on a distinguished road
 
Join Date: Feb 2008
Location: Europe
Posts: 5
Wine?

Excuse my simple question :-) Did someone try to use wine already?
Otherwise, what are the experiences with the opensourcedfu-utils ?
Lastly, we could always reverse engineer the usb protocol in windows and implement it in linux.. although I do prefer an easier solution since time is limited
Wbdsgnr is offline   Reply With Quote
Old 06-13-2008   #3 (permalink)
Passing By fnord23 is on a distinguished road
 
Join Date: Jan 2008
Posts: 3
What I don't get on wpyh Method:
If you're willing to install WinXP on QEMU, you could as well install WinXP on a different partition and do a dual-boot.

@Wbdsgnr: I think I read somewhere here, that the opensource dfu-utils aren't compatible to the samsung(?) version of dfu the M6 uses
fnord23 is offline   Reply With Quote
Old 06-16-2008   #4 (permalink)
Member wpyh is on a distinguished road
 
Join Date: Jan 2008
Location: Indonesia
Posts: 106
I'll answer some of the questions here:

1. I can't speak for markun, but he's tried using wine to run the DFU tool but failed. This is because wine doesn't export the hardware, it just provides the Windows API.

2. I'm installing WinXP on QEMU precisely because I don't want to dual boot. Why should I? Linux gives me a very good working environment, and I feel lost in Windows (XP, Vista, whatever). Dual booting is also very inconvenient. That, and I've allocated the whole harddisk to Linux.

3. The dfu-util software (currently) can't flash the Meizu. I don't know but fnord23 may be right about the dfu versions. From my experiments, it seems to send data to the Meizu, but the player doesn't do a firmware update.
wpyh is offline   Reply With Quote
Old 06-16-2008   #5 (permalink)
Member Th3_uN1Qu3 is on a distinguished road
 
Th3_uN1Qu3's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 205
Low-level programs such as DFU tools cannot be emulated because they need direct access to the hardware and an emulator or compatibility layer like QEMU or WINE won't let the program do direct hardware access as it has to pass through them first. I doubt a virtual machine would work either.
__________________
Meizu Playlist Converter!
Th3_uN1Qu3 is offline   Reply With Quote
Old 06-18-2008   #6 (permalink)
Member wpyh is on a distinguished road
 
Join Date: Jan 2008
Location: Indonesia
Posts: 106
Well, the DFU tool does access hardware directly, and QEMU has a USB passthrough mode / feature / option. That USB passthrough feature is what I'm using. And since QEMU talks directly with the hardware, I expected it to work.

Now that might mean that the DFU tool tries to disconnect and reconnect the USB again, but I think the crash is due to a QEMU bug.
wpyh is offline   Reply With Quote
Old 06-19-2008   #7 (permalink)
Member Th3_uN1Qu3 is on a distinguished road
 
Th3_uN1Qu3's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 205
Quote:
Originally Posted by wpyh View Post
Well, the DFU tool does access hardware directly, and QEMU has a USB passthrough mode / feature / option. That USB passthrough feature is what I'm using. And since QEMU talks directly with the hardware, I expected it to work.

Now that might mean that the DFU tool tries to disconnect and reconnect the USB again, but I think the crash is due to a QEMU bug.
Even if it has such a mode (i have used QEMU several times but did not know about this feature), chances are it's going to be very buggy and highly dependant on the OS you run QEMU on.
Th3_uN1Qu3 is offline   Reply With Quote
Old 06-20-2008   #8 (permalink)
Member wpyh is on a distinguished road
 
Join Date: Jan 2008
Location: Indonesia
Posts: 106
There is a short description of that feature here: QEMU

Quote:
Originally Posted by Th3_uN1Qu3 View Post
it's going to be very buggy
Yes, it is indeed buggy, otherwise my post would contain instructions on how to successfully run DFU tool that way.

Quote:
Originally Posted by Th3_uN1Qu3 View Post
and highly dependant on the OS you run QEMU on.
Yes, this is also a known fact. I forgot to mention that I'm running QEMU on Linux. Sorry for any confusion this might have caused.
wpyh is offline   Reply With Quote
Old 5 Days Ago   #9 (permalink)
Member wpyh is on a distinguished road
 
Join Date: Jan 2008
Location: Indonesia
Posts: 106
It is now possible to do a DFU restore on Linux, using VirtualBox.

Preparation:
1. Install Windows XP inside QEMU, and then install DFU Tool on it.
2. Copy M3.EBN, M6.EBN or M6SL.EBN into the DFU Tool folder in the Windows XP installation.

Steps:
1. Mount usbfs at /proc/bus/usb.
2. As root, loop every 0.5 seconds to chown all the files in /proc/bus/usb to the username you are using.
3. Run VirtualBox. Remember to enable USB support for the VM.
4. Hold the M and Play buttons, wait 2 seconds, then connect the device to the computer.
5. Release the Play button.
6. Connect the device to VirtualBox.
7. Run DFU Tool, then press "Download" button.
8. Unplug device.

Notes:
1. The Play button must be released after connecting the device to the PC, otherwise it will power off after a few seconds.
2. Keep the M button pressed down through the recovery procedure.
3. If anything fails, start over.
wpyh is offline   Reply With Quote
Old 5 Days Ago   #10 (permalink)
Member JkPwNsTeR is on a distinguished road
 
JkPwNsTeR's Avatar
 
Join Date: Jul 2008
Location: Canada
Posts: 239
So in other words, just forget it because no one wants to buy a second Windows XP license. Seriously, if you're going to do it legally, you need one. Just buy a new miniPlayer/musicCard.
JkPwNsTeR is offline   Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tipps zum DFU Tool Andreas67 German 2 02-06-2008 09:42 PM
wie benutzt man DFU Tool ? qwer German 1 12-25-2007 04:07 PM
If M3 doesnt have a DFU tool fdddd Technical 0 12-21-2007 05:35 AM
M3 DFU Tool paxl13 music card M3 5 11-22-2007 06:05 PM
m6_patch_font tool Asmo Russian 28 10-05-2007 05:45 AM

All times are GMT. The time now is 02:51 AM.


Powered by vBulletin. Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 ©2007, Crawlability, Inc.
 
Meizu Me is an independent resource for all things Meizu. Meizu, Mini Player, Music Card, Mini One and all other related names are properties of MEIZU Electronic Technology, Inc. Designed by ForumTemplates. All content © 2007 MeizuMe. All Rights Reserved.