Skip to contentSkip to conversation

news for uml_hcd driver ?

uml-devel James McMechan 2 participants 2 messages Jan 9, 2005 – Jan 24, 2005 3 messages not in the archive User-mode Linux (UML)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 12 lines · you

Hello
I'm a french student, (engineer school). I work on a very interessant project. We want to develop a USB kernel driver for a joystick. In order to test our driver, we'd want to run it in user space (with UML and UML_HCD), doing this way we are sure not to crash the host kernel... We success to compile a 2.4.18 kernel with your patch, but the uml_hcd module don't seem to work (we don't see anything in /proc/bus/usb, when usbdevfs in mounted).
Is there any developement on this driver today?
Is there a way to port this driver for the 2.6 kernel ?
Does it exist a way to run a device driver in user space (emulation ?)

Quoted 5 lines

Thank you in advance
your sincerelly

Hubert FONGARNAND
CPE Student

It should still work what was your host kernel (the one you were running UML on top of)

I think that 2.4.19-39um as a guest kernel also worked but about 2.4.20 Greg Kroh back-ported the 2.5/2.6 USB structures to 2.4 and broke the umusb-2.4.19-39 patch. Later 2.4.19-XXum versions should also work but are untested.

From the web page (which seems to be down?)
Operation of the user mode linux host controller requires that the host system has /proc/bus/usb mounted and writable by the user running the user mode linux kernel.

Usually when I had problems it was that user mcmechan could not write to the /proc/bus/usb files or that the host kernel driver had found a driver for the device on the host kernel which caused the host USB driver to run not the UML USB driver

As to porting the uml-hcd to 2.6 it should be possible but there has not been that much interest in running USB from UML though it seems to be picking up again.

As I recall it will enumerate the devices on the host but has a problem creating the /proc/bus/usb files in the UML
The proper solution was to setup a new style HCD in the 2.6 tree but UML is rather different than USB expected e.g. no DMA and at the time creating the absent DMA infrastructure seemed like much work to hit a moving target.

As to emulation:
UML is my preferred way to work on USB or I would have done it differently. VMWARE might have a way to run USB also but I don't remember seeing any last time I looked at the web pages, and it would not help nearly as much for debugging.

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 2 lines · Hubert FONGARNAND

Hello!!!
The Umusb driver works now on the 2.4.27 kernel... I can use now, my

force

Quoted 7 lines

feedback joystick and my usbmouse on the 2.4.27-1um kernel... But I'm in very beta testing phase and I experience many "kernel panic : Kernel mode fault"
I try to run : ./linux debug
A window with gdb appear, but the kernel looks like stopped... in there another way to debug the kernel?
Your's sincerely

It did not start up when you entered "c" to continue after setting your breakpoints?

It would appear that you are running in TT mode "tracing thread" not SKAS mode.

Have you looked at http://user-mode-linux.sf.net/debugging.html the debugging tutorial? or checked on the mailing lists?

Quoted 6 lines
Quoted 6 lines · Hubert FONGARNAND
Quoted 4 lines
Quoted 3 lines · James McMechan
Quoted 2 lines · you

Hello
I'm a french student, (engineer school). I work on a very

interessant

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

project. We want to develop a USB kernel driver for a joystick. In

order

Quoted 3 lines
Quoted 3 lines

to test our driver, we'd want to run it in user space (with UML and UML_HCD), doing this way we are sure not to crash the host kernel... We success to compile a 2.4.18 kernel with your patch, but the

uml_hcd

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line

module don't seem to work (we don't see anything in /proc/bus/usb,

when

Quoted 4 lines
Quoted 4 lines

usbdevfs in mounted).
Is there any developement on this driver today? Is there a way to port this driver for the 2.6 kernel ? Does it exist a way to run a device driver in user space

(emulation ?)

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines

Thank you in advance
your sincerelly

Hubert FONGARNAND
CPE Student

It should still work what was your host kernel (the one you were

running

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

UML on top of)

I think that 2.4.19-39um as a guest kernel also worked but about

2.4.20

Quoted 1 line

Greg Kroh back-ported the 2.5/2.6 USB structures to 2.4 and broke

the

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

umusb-2.4.19-39 patch. Later 2.4.19-XXum versions should also work

but

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

are untested.

From the web page (which seems to be down?)
Operation of the user mode linux host controller requires that the

host

Quoted 1 line

system has /proc/bus/usb mounted and writable by the user running

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

user mode linux kernel.

Usually when I had problems it was that user mcmechan could not

write

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

to

Quoted 1 line

the /proc/bus/usb files or that the host kernel driver had found a

driver

Quoted 1 line

for the device on the host kernel which caused the host USB driver

to

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

run

Quoted 3 lines

not the UML USB driver

As to porting the uml-hcd to 2.6 it should be possible but there has

not

Quoted 1 line

been that much interest in running USB from UML though it seems to

be

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

picking up again.

As I recall it will enumerate the devices on the host but has a

problem

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

creating the /proc/bus/usb files in the UML
The proper solution was to setup a new style HCD in the 2.6 tree but

UML

Quoted 2 lines

is rather different than USB expected e.g. no DMA and at the time creating the absent DMA infrastructure seemed like much work to hit

a

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

moving target.

As to emulation:
UML is my preferred way to work on USB or I would have done it differently. VMWARE might have a way to run USB also but I don't

remember

Quoted 1 line

seeing any last time I looked at the web pages, and it would not

help

Quoted 22 lines
Quoted 22 lines
Quoted 3 lines
Quoted 1 line

nearly as much for debugging.

I use your umusb driver with some success on the 2.4.19 kernel!

I am glad to see a report of your success

Quoted 3 lines

I've done some modifications for interrupt transfer. now I can use my usb mouse very well. usb-storage driver works well too!

Good, I had not thought to try with a USB mouse, I think I tried USB storage, a smart card reader, and a USB Ethernet adapter

Quoted 2 lines

I've modified the 2.4.19 um kernel in order it could run on a 2.6 host kernel... and it works too.

Ah, very good... you are I hope contemplating sharing your fixes, I have CC'ed the [email protected]

Quoted 2 lines

I've problem with unloading usb modules, sometimes i have some "Kernel Mode Fault at ip 0x...." how could I debug that?

Quoted 8 lines
Quoted 8 lines

That is where UML shines, you can use the debugger on a UML kernel and put a breakpoint at the panic/Oops and then do back-traces/examine symbols

The UML sites even include examples of getting the symbols from modules All of which makes tracing down "Kernel Mode Fault..." much easier I usually have those sort of errors happen when I forget to unregister part of the module and then one of the kernel subsystems is still

trying

Quoted 3 lines
Quoted 3 lines

to use the module after the rmmod.

Quoted 1 line

We are looking to use the driver on a 2.4.27 kernel, but we

experienced

Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

some problem with dma. We are making a fake dma support (we use your um_pci driver for the 2.5 kernel)... I hope it will work! I will send you our patches if it works!

Your's sincerely

It is a pleasure to see that you are finding it useful

James McMechan

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel