QEMU : USB device passthrough problem


rosietastic

Member
Joined
Sep 15, 2014
Messages
32
Hello all! First post and a Pandora noob. Absolutely loving it!

Ok, I am not sure this is 'do able', but am giving it a go anyway...

Objective : 'Unencrypt and Backup my blu ray's to an SDXC with my Pandora'

I am trying to run some linux software (makemkv) that unfortunately is not open source. It includes an x86 binary blob and has a compile-able portion also. Am only interested in running the makemkvcon bit of makemkv which is command line only.

I have a Samsung USB portable BD writer (SE 506) which works well and is recognisable by the Pandora with SuperZaxxon 1.60/Kernel 3.2.57. I only need to mount this as read only, as I don't want to do any disc writing.

I installed the totally excellent QEMU PND and that now boots TinyCore linux as a i386. Kernel options for the TinyCore boot (3.8.13) include noapic waitusb=5 tce=sda1 home=sda1 opt=sda1. Persistency is provided by an 50 GB ext3 image that physically resides on a 128GB SDXC.

All of this works fine and lsusb on the Pandora host shows the BD device fine, it can also be mounted and read as normal. But, I cannot get the USB BD device to passthrough to the TinyCore guest.

I have tried QEMU option variants of:

-drive file=/dev/scd0,media=cdrom

-usb -usbdevice usb-host,hostbus=1,hostaddr=2

etc

and lsusb on the guest just shows the usb root hub - not my BD drive.

Can anyone help?
 
Just a word of warning: you'll need to downscale the 1080p videos beforehand for an enjoyable viewing experience on the Pandora.

If it's really just about backups, then you could probably get away with "dd if=/media/yourbddrive of=/media/yoursdcard/backup.img". Someone correct me if I'm wrong.
 
Last edited by a moderator:
It's just about backups.

I wish to decrypt my Blu Ray discs, and makemkvcon is an excellent tool to do so. Unfortunately it comes with a i386 binary blob. 
 
It's just about backups.

I wish to decrypt my Blu Ray discs, and makemkvcon is an excellent tool to do so. Unfortunately it comes with a i386 binary blob.
I can't help you on that. My suggestion would do an exact copy of the Blu-Ray and save it to a file, which could be later loaded by a BD burning tool. I think that should work. You could compress the file later on to save space.
 
Ok thanks anyway T4b. Your suggestion does work of course, but then you get into all sorts of stuff regards BD Volume IDs and the like. These details are only present on the disc (and not in a produced image from dd for example). Makemkv decrypts and backs up the data (extracting and utilising the relevant IDs) in one go.

Has anyone achieved usb device passthrough with QEMU on the pandora?
 
Has anyone achieved usb device passthrough with QEMU on the pandora?
Hi.i had ^_^

I used a complete USB Stick as HardDrive for Windows95 in the Past.

Without Image Things it was very very easy to Copy downloaded Testfiles from WinXP into the Stick and used them in Qemu on the Pandora.

It was realy simple when i renember right.

Just use the Gui and choose /dev/sda (or /dev/sda1,dont renember exactly) as HDD.

Hope that Hint help,my English is not the Best :)
 
Thanks ingoreis!

Interesting. I didn't realise you could put host devices in the QEMU GUI image file locations.

I have the HDD one already used (as I have an ext3 image to provide persistency for TinyCore linux), and the CD one is the TinyCore boot CD image. I currently use a QEMU -boot option to allow me to select the virtual CD to boot.

My next steps - I will install TinyCore to the HDD (the QEMU HDD virtual drive image file), and then try /dev/scd0 in the QEMU GUI image file location for the CD-ROM. This will actually be my BD device physically connected to the Pandora host.
 
Yeah it's a clumsy interface as you can't add other drive images and what not.. I've been meaning to look under the hood to figure out how to mount another image manually, just never got around to it..
 
I played a bit with the Gui and made this PND:

http://qemu.openpandora.org/PNDs/qemu.pnd (hope this is the right PND Link) :rolleyes:

Maybe it help you (please delete old Appdata before starting)

Edit:

Found the added Options again in the Forum:

- boot from CDROM ISO

- CoreDuo CPU Emulation(little faster) and added a List with all aviable CPUs for choosing what you want in Other Options

- Changed Qemus Network Card to a NE 2000 combatible (all Windows should have driver for it buildin)

- build in LibGL and use it with LIBGL_FB=1 (seem to work little faster than normal)

- Acpi and Hpet disable Option for little more Speed than normal Settings

- 2 little Hints in the other Options Line for booting Windows2000 and howto use the -cpu Option
 
Last edited by a moderator:
You can just have a look at the startupscript and duplocate the imagemount line. Then you will have another field to put something into.


Maybe I have to revisit this sometime but I don't have time to do so right now.


I would probably change the whole starter but I tried to not make it too complex back then.


Just enough to get aome games going without a lot commandline interaction.
 
Nice one! Success!

Thanks to all.

I duplicated the imagemount line in the script and got that working, and also tried ingoreis's new QEMU PND.

The other options on the new PND are very useful - but I had problems getting networking running properly on my Tiny Core guest (my issue I am sure, but I ran out of time).

In the end, I edited the scripts of the original QEMU PND and got the guest to recognise /dev/sr0 passed from /dev/scd0 on the pandora host. I think the device name /dev/sr0 is important as makemkv looks for optical drives under /dev/sr*. Didn't even need to muck about with UDEV for this either.

Tiny Core needed a bit of persuasion to read UDF - but it can (with an extension), so all is good. Now for the next phase - compilation of makemkvcon (and it's i386 binary portion) in TinyCore. 

As per makemkv's author, he is looking at building it using an arm toolchain, but they don't have a timeframe for this yet. So in the meantime, this option is definitely the best bet. Shame makemkv is not 100% open source - but I suppose the binary portion contains the magic sauce.

Really appreciate your help - loving the pandora (cannot believe what it can do) - and learning as i go along!
 
Back
Top