Mouse and Keyboard Not Working in Qemu Emulator

Mouse and Keyboard not working in qemu emulator

The problem was, I need to specify USB bus number with device number for USB Pass-Through.
Get the list of USB's by this command lsusb and it will list them as following:

Sample Image

My keyboard bus number is 002 and address is 001. So, change the command based on the device number and address. So, my command will be as follows:

qemu-system-arm -M overo -m 256 -sd ./test.img -clock unix -serial stdio -usb -device usb-host,hostbus=2,hostaddr=1

You need to add this line -usb -device usb-host,hostbus=2,hostaddr=1 based on the device number and address. To get cursor pointer working add -show-cursor as specified by here

QEMU usb keyboard passthrough difficulties

I ran into same issue and tried several approaches. From running different ISOs to trying out different driver configurations but nothing worked. I believe SPARC64 is not yet fully supported with QEMU architecture. I also tried Solaris 11 as suggested by @Andrew Henle. Though I wasn't able to get it running with -M niagara but I believe that could be the right direction.

Now if you don't specifically want the QEMU but just want to use/test Solaris 10 or 11 on SPARC architecture. I think you still have two options:

  1. You can buy the supported hardware on eBay.
  2. If you do not want to purchase the hardware, you can get a shared SPARC server from Oracle Cloud.

Good Luck!

Why does my OS loader work fine in bochs but not in qemu?

Following Brendan's suggestion, I tried to use the BIOS to read the OS loader, the modified MBR code is as follows:

section MBR vstart=0x7C00
jmp main

%include "config/boot.asm"
%include "print16.asm"
%include "config/memory-management.asm"

DISK_READ_ERROR: db "OS loader read failed, the error code is: 0x", 0

[bits 16]
main:
mov ax, 0
mov ss, ax
mov ds, ax
mov fs, ax
mov es, ax
mov sp, $$

call clean_screen

; Read OS loader via BIOS interrupt.
; Set the function number, 2 means read sector.
mov ah, 2
; Set the number of sectors to read.
mov al, LOADER_SECTORS
; Set the cylinder.
mov ch, 0
; Set the head.
mov dh, 0
; Set sector.
mov cl, LOADER_START_SECTOR
; Set the drive letter, 0 ~ 0x7F is floppy disk, 0x80 ~ 0xFF is hard disk.
mov dl, 0x80
; Set the destination address.
mov bx, LOADER_BASE_ADDR
int 0x13
; If the disk read error, the BIOS will set the CF of the flags register to 1, and AH is the error code.
jc disk_error

jmp LOADER_BASE_ADDR

disk_error:
mov [REGISTER_AX], ax
mov ax, DISK_READ_ERROR
call print
mov ax, [REGISTER_AX]
call print_hex
jmp $

times 510-($-$$) db 0
db 0x55, 0xAA

Another thing to note is that interrupts need to be disabled using the cli command before entering the protection, otherwise in qemu this will result in an infinite restart of the computer.



Related Topics



Leave a reply



Submit