public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] OvmfPkg: OVMF supports USB mouses
@ 2024-04-05 12:58 phillip
  2024-04-05 13:33 ` Heinrich Schuchardt
  2024-04-05 13:43 ` Heinrich Schuchardt
  0 siblings, 2 replies; 3+ messages in thread
From: phillip @ 2024-04-05 12:58 UTC (permalink / raw)
  To: devel; +Cc: phillip, xypron.glpk

From: Phillip Tennen <phillip@axleos.com>

UsbMouseDxe was missing from the OVMF build description, so 
the Simple Pointer Protocol wasn't usable from within QEMU.

Here's an example of somone getting tripped up by this:
https://forum.osdev.org/viewtopic.php?f=1&t=31572.

I worked around this by including the below patch in my local
builds, and was encouraged by Heinrich Schuchardt to submit a patch.

I have not contributed to this project before, so please accept
my apologies if I've formatted anything incorrect. All the best.

Signed-off-by: Phillip Tennen <phillip@axleos.com>

---
 OvmfPkg/OvmfPkgX64.dsc | 1 +
 OvmfPkg/OvmfPkgX64.fdf | 1 +
 2 files changed, 2 insertions(+)

diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 56c920168d..d76a263859 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -953,6 +953,7 @@
   MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
   MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
   MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
 
 !include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
 
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
index eb3fb90cb8..bfe201a352 100644
--- a/OvmfPkg/OvmfPkgX64.fdf
+++ b/OvmfPkg/OvmfPkgX64.fdf
@@ -342,6 +342,7 @@ INF  MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
 INF  MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
 INF  MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
 INF  MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
+INF  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
 INF  MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
 
 INF  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
-- 
2.39.3 (Apple Git-145)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117459): https://edk2.groups.io/g/devel/message/117459
Mute This Topic: https://groups.io/mt/105348119/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] OvmfPkg: OVMF supports USB mouses
  2024-04-05 12:58 [edk2-devel] [PATCH] OvmfPkg: OVMF supports USB mouses phillip
@ 2024-04-05 13:33 ` Heinrich Schuchardt
  2024-04-05 13:43 ` Heinrich Schuchardt
  1 sibling, 0 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2024-04-05 13:33 UTC (permalink / raw)
  To: phillip; +Cc: Ard Biesheuvel, devel, Jiewen Yao, Gerd Hoffmann

On 05.04.24 14:58, phillip@axleos.com wrote:
> From: Phillip Tennen <phillip@axleos.com>
> 
> UsbMouseDxe was missing from the OVMF build description, so
> the Simple Pointer Protocol wasn't usable from within QEMU.
> 
> Here's an example of somone getting tripped up by this:
> https://forum.osdev.org/viewtopic.php?f=1&t=31572.
> 
> I worked around this by including the below patch in my local
> builds, and was encouraged by Heinrich Schuchardt to submit a patch.
> 
> I have not contributed to this project before, so please accept
> my apologies if I've formatted anything incorrect. All the best.
> 
> Signed-off-by: Phillip Tennen <phillip@axleos.com>
> 
> ---
>   OvmfPkg/OvmfPkgX64.dsc | 1 +
>   OvmfPkg/OvmfPkgX64.fdf | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 56c920168d..d76a263859 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -953,6 +953,7 @@
>     MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>     MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
>     MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
> +  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf

Thank you Phillip for contributing.

https://github.com/tianocore/tianocore.github.io/wiki/Code-Contributions
has some information on the contribution process.

Currently applying the patch in this mail fails:

git am --keep-cr '[PATCH] OvmfPkg: OVMF supports USB mouses - 
phillip@axleos.com - 2024-04-05 1458.eml'

warning: quoted CRLF detected
Applying: OvmfPkg: OVMF supports USB mouses
.git/rebase-apply/patch:14: trailing whitespace.
   MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
.git/rebase-apply/patch:26: trailing whitespace.
INF  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
error: patch failed: OvmfPkg/OvmfPkgX64.dsc:953
error: OvmfPkg/OvmfPkgX64.dsc: patch does not apply
error: patch failed: OvmfPkg/OvmfPkgX64.fdf:342
error: OvmfPkg/OvmfPkgX64.fdf: patch does not apply
Patch failed at 0001 OvmfPkg: OVMF supports USB mouses

I guess it is just a problem with the line endings.

Please, run 'python3 BaseTools/Scripts/SetupGit.py' once. This will set 
up your git repository with the Tianocore defaults for submitting patches.

It would be preferable to match the existing indentation.

Maybe make both insertions at the same place under UsbKbDxe.inf.

Otherwise looks good to me and works fine: The USB mouse is usable in 
your IRC application.

The file 'Maintainers' has a list of the persons that should be CCed for 
OvmfPkg patches.

Best regards

Heinrich

>   
>   !include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
>   
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index eb3fb90cb8..bfe201a352 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -342,6 +342,7 @@ INF  MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
>   INF  MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>   INF  MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>   INF  MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
> +INF  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
>   INF  MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
>   
>   INF  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117457): https://edk2.groups.io/g/devel/message/117457
Mute This Topic: https://groups.io/mt/105348119/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] OvmfPkg: OVMF supports USB mouses
  2024-04-05 12:58 [edk2-devel] [PATCH] OvmfPkg: OVMF supports USB mouses phillip
  2024-04-05 13:33 ` Heinrich Schuchardt
@ 2024-04-05 13:43 ` Heinrich Schuchardt
  1 sibling, 0 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2024-04-05 13:43 UTC (permalink / raw)
  To: phillip; +Cc: devel, Ard Biesheuvel, Jiewen Yao, Gerd Hoffmann

On 05.04.24 14:58, phillip@axleos.com wrote:
> From: Phillip Tennen <phillip@axleos.com>
> 
> UsbMouseDxe was missing from the OVMF build description, so
> the Simple Pointer Protocol wasn't usable from within QEMU.
> 
> Here's an example of somone getting tripped up by this:
> https://forum.osdev.org/viewtopic.php?f=1&t=31572.
> 
> I worked around this by including the below patch in my local
> builds, and was encouraged by Heinrich Schuchardt to submit a patch.
> 
> I have not contributed to this project before, so please accept
> my apologies if I've formatted anything incorrect. All the best.
> 
> Signed-off-by: Phillip Tennen <phillip@axleos.com>
> 
> ---
>   OvmfPkg/OvmfPkgX64.dsc | 1 +
>   OvmfPkg/OvmfPkgX64.fdf | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 56c920168d..d76a263859 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -953,6 +953,7 @@
>     MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>     MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
>     MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
> +  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf

Thank you Phillip for your contribution.

https://github.com/tianocore/tianocore.github.io/wiki/Code-Contributions 
provides some guidance for contributing.

Currently applying the patch fails:

$ git am --keep-cr /tmp/\[PATCH\]\ OvmfPkg\:\ OVMF\ supports\ USB\ 
mouses\ -\ phillip@axleos.com\ -\ 2024-04-05\ 1458.eml
warning: quoted CRLF detected
Applying: OvmfPkg: OVMF supports USB mouses
.git/rebase-apply/patch:14: trailing whitespace.
   MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
.git/rebase-apply/patch:26: trailing whitespace.
INF  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
error: patch failed: OvmfPkg/OvmfPkgX64.dsc:953
error: OvmfPkg/OvmfPkgX64.dsc: patch does not apply
error: patch failed: OvmfPkg/OvmfPkgX64.fdf:342
error: OvmfPkg/OvmfPkgX64.fdf: patch does not apply
Patch failed at 0001 OvmfPkg: OVMF supports USB mouses

I guess this is due to line endings.

Please, run 'python3 BaseTools/Scripts/SetupGit.py' in your git 
repository to set it up to match the Tianocore submission style, e.g.

[sendemail]
transferEncoding = 8bit

Please, align to the existing indentation.

For consistency it would be preferable to add both lines in the same 
place under UsbKbDxe.inf.

The change looks correct and the USB mouse works fine when testing with 
your IRC application.

File Maintainers contains the list of people that should be CCed on 
mails with OvmfPkg patches.

Best regards

Heinrich

>   
>   !include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
>   
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index eb3fb90cb8..bfe201a352 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -342,6 +342,7 @@ INF  MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
>   INF  MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>   INF  MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>   INF  MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
> +INF  MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
>   INF  MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
>   
>   INF  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117458): https://edk2.groups.io/g/devel/message/117458
Mute This Topic: https://groups.io/mt/105348119/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-05 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 12:58 [edk2-devel] [PATCH] OvmfPkg: OVMF supports USB mouses phillip
2024-04-05 13:33 ` Heinrich Schuchardt
2024-04-05 13:43 ` Heinrich Schuchardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox