Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(automation/scripting/CI) rvvm external/programmatic input (send input to a running rvvm instance) #143

Open
ZLangJIT opened this issue Sep 23, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ZLangJIT
Copy link

ZLangJIT commented Sep 23, 2024

how would i go about sending input to rvvm in a way that is not interactive ?

as i tried printf ... | rvvm ... but it does not seem to work

and rvvm -serial file.txt just results in the serial output being written to the file with nothing actually inputting to the console serial (eg # shell )

might be related to how trying to type stuff before the kernel boots the # shell does not result in anything being sent to the shell (or stuff being partially sent)

for example, for simple automated boot up power down test printf "poweroff\n" | rvvm ...

this would also include sending mouse input to a running rvvm instance, eg to forward mouse events from the host to the guest

@ZLangJIT ZLangJIT changed the title rvvm serial console external/programatic input rvvm serial console external/programmatic input (docker --command like input - send input to running rvvm instance) Sep 23, 2024
@ZLangJIT ZLangJIT changed the title rvvm serial console external/programmatic input (docker --command like input - send input to running rvvm instance) rvvm serial console external/programmatic input (send input to running rvvm instance) Sep 23, 2024
@ZLangJIT ZLangJIT changed the title rvvm serial console external/programmatic input (send input to running rvvm instance) rvvm serial console external/programmatic input (send input to running a rvvm instance) Sep 23, 2024
@ZLangJIT ZLangJIT changed the title rvvm serial console external/programmatic input (send input to running a rvvm instance) rvvm serial console external/programmatic input (send input to a running rvvm instance) Sep 23, 2024
@ZLangJIT ZLangJIT changed the title rvvm serial console external/programmatic input (send input to a running rvvm instance) (automation/scripting) rvvm serial console external/programmatic input (send input to a running rvvm instance) Sep 23, 2024
@ZLangJIT ZLangJIT changed the title (automation/scripting) rvvm serial console external/programmatic input (send input to a running rvvm instance) (automation/scripting/CI) rvvm serial console external/programmatic input (send input to a running rvvm instance) Sep 23, 2024
@ZLangJIT ZLangJIT changed the title (automation/scripting/CI) rvvm serial console external/programmatic input (send input to a running rvvm instance) (automation/scripting/CI) rvvm external/programmatic input (send input to a running rvvm instance) Sep 23, 2024
@LekKit
Copy link
Owner

LekKit commented Sep 23, 2024

as i tried printf ... | rvvm ... but it does not seem to work

It might have worked, but this input is likely eaten and ignored by the kernel on some earlier boot stages.

Also rvvm -serial expects a path to pipe file, not a usual file. So you actually need to create a pipe file, then try to write into it from script AFTER the guest have booted... Yeah you are better off using in-guest scripts or using librvvm API instead.

librvvm serial device API (you need to implement your own chardev and pass to ns16550a_init():
https://github.com/LekKit/RVVM/blob/staging/src/devices/chardev.h

this would also include sending mouse input to a running rvvm instance, eg to forward mouse events from the host to the guest

librvvm HID API for input devices:
https://github.com/LekKit/RVVM/blob/staging/src/devices/hid_api.h

@LekKit LekKit added the question Further information is requested label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants