Using usb image in bochs

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ZigZogZang
Posts: 14
Joined: Tue Nov 26, 2013 7:41 am

Using usb image in bochs

Post by ZigZogZang »

Hey,
I am using current version 2.6.2 of Bochs. I have usb image that was saved using HxD and I would like to run this image with Bochs.

I don't know how to edit bochs config file to deal with it. I have found some tips about usb_uhci for bochs config file, but it seems to be old configuration and I didn't find any useful information how to do it for current stable version.

Please give me info how to edit bochs config file to use my usb image file, thank you!
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Using usb image in bochs

Post by Nable »

Did you actually try options from the example config?
It looks like docs are up-to-date ( http://bochs.sourceforge.net/doc/docboo ... T-USB-UHCI ), because they suggest the same syntax as in example config from SVN.
ZigZogZang
Posts: 14
Joined: Tue Nov 26, 2013 7:41 am

Re: Using usb image in bochs

Post by ZigZogZang »

Nable wrote:Did you actually try options from the example config?
It looks like docs are up-to-date ( http://bochs.sourceforge.net/doc/docboo ... T-USB-UHCI ), because they suggest the same syntax as in example config from SVN.
Yes i was using it

I have added now this line to bochs config file

usb_uhci: enabled=1, port1=disk:DISK.IMA

and after i run bochs -q it displayed:
========================================================================
Bochs x86 Emulator 2.6.2
Built from SVN snapshot on May 26, 2013
Compiled on Oct 8 2013 at 21:10:58
========================================================================
00000000000i[ ] reading configuration from bochsrc
00000000000p[CTRL ] >>PANIC<< optional plugin 'usb_uhci' not found
00000000000e[CTRL ] notify called, but no bxevent_callback function is registered
========================================================================
Bochs is exiting with the following message:
[CTRL ] optional plugin 'usb_uhci' not found
========================================================================
...

I haven't found any info about any plugins for bochs like usb_uhci for example so what is the reason of this error ?

Well I have found some info that usb_uhci need to be installed on local computer, but is that real reason of it ? It doesn't make any sense, and why wouldn't it be available ?
User avatar
wichtounet
Member
Member
Posts: 90
Joined: Fri Nov 01, 2013 4:05 pm
Location: Fribourg, Switzerland
Contact:

Re: Using usb image in bochs

Post by wichtounet »

It maybe that you have not compiled USB support into Bochs.

When you compile bochs from the sources, you can choose to enable or disable USB support with these options during configure:
--enable-usb Enable i440FX PCI USB support (UHCI). The host controller with 2-port root hub and 6 USB device types are available.
--enable-usb-ohci Enable USB OHCI support. The host controller with 2-port root hub is available (USB device types: same as UHCI).
--enable-usb-xhci Enable experimental USB xHCI support. The host controller with 4-port root hub is available (USB device types: same as UHCI).
None of these options is set by default so it is possible that in your case, it is disabled. You'll have to compile Bochs again to include this support.
Thor Operating System: C++ 64 bits OS: https://github.com/wichtounet/thor-os
Good osdeving!
ZigZogZang
Posts: 14
Joined: Tue Nov 26, 2013 7:41 am

Re: Using usb image in bochs

Post by ZigZogZang »

wichtounet wrote:It maybe that you have not compiled USB support into Bochs.

When you compile bochs from the sources, you can choose to enable or disable USB support with these options during configure:
--enable-usb Enable i440FX PCI USB support (UHCI). The host controller with 2-port root hub and 6 USB device types are available.
--enable-usb-ohci Enable USB OHCI support. The host controller with 2-port root hub is available (USB device types: same as UHCI).
--enable-usb-xhci Enable experimental USB xHCI support. The host controller with 4-port root hub is available (USB device types: same as UHCI).
None of these options is set by default so it is possible that in your case, it is disabled. You'll have to compile Bochs again to include this support.
Yea i have done it, but i added to my config:

usb_uhci: enabled=1, port1=disk:bootimg.ima
boot:disk

After i run bochs it says no bootable disk found

If i press F12 then its possible only to choose floppy/hard disk/cd rom, no usb device... why ?

Why ?
Post Reply