22 Commits

Author SHA1 Message Date
Jiajie Chen
411e63f8e8 Add QEMU end-to-end test verifying simulated USB devices
Boot a real Linux inside QEMU and confirm that simulated USB/IP devices
work against a real kernel (vhci-hcd + cdc_acm):

- Add examples/demo.rs: a single server exporting a HID keyboard and a
  CDC ACM serial device on port 3240.
- Add scripts/qemu/: build a minimal initramfs (host kernel + busybox +
  usbip tool + demo server), boot it in QEMU, attach the simulated devices
  over 127.0.0.1, and verify:
    * the serial port emits 'a' (0x61)  -> SERIAL_TEST
    * the keyboard generates a KEY_1 input event -> KEYBOARD_TEST
- Add .github/workflows/qemu.yml to run this in CI (KVM when available,
  TCG fallback otherwise), uploading the serial console log as an artefact.
2026-09-04 00:16:40 +08:00
Jiajie Chen
7e3409d6d9 Add unset string fuctions 2024-10-26 09:35:32 +08:00
h7x4
5d270f228c Fix clippy warnings 2023-08-24 16:20:46 +02:00
h7x4
6ed02934e3 Add support for modifying devicelist during execution 2023-08-23 15:51:48 +02:00
Jiajie Chen
b399673335 Bump dependencies, thanks @Cycatz 2020-11-08 10:55:16 +08:00
Jiajie Chen
fac58ccdf9 Refactor interface 2020-05-16 17:00:03 +08:00
Jiajie Chen
57e2d4f7f4 Cleanup warnings 2020-05-16 16:27:01 +08:00
Jiajie Chen
7e3058aeb4 Use rusb to enumerate devices 2020-05-16 15:34:21 +08:00
Jiajie Chen
6895498592 Add initial testing 2020-05-16 12:05:06 +08:00
Jiajie Chen
051514aa31 Improve cdc acm 2020-05-16 11:08:35 +08:00
Jiajie Chen
0f2c27a15c Generate input in cdc 2020-05-16 11:05:37 +08:00
Jiajie Chen
883f651f28 Initial cdc acm serial server 2020-05-16 10:59:16 +08:00
Jiajie Chen
2606dc7bed Minor refactor 2020-05-16 10:01:06 +08:00
Jiajie Chen
1198a869d5 Add doc strings 2020-05-16 09:55:11 +08:00
Jiajie Chen
205db87736 Can emulate hid now 2020-05-16 09:38:16 +08:00
Jiajie Chen
8e4878bdc2 Implement basic hid 2020-05-16 08:28:29 +08:00
Jiajie Chen
c4bbdf113a Add support for class specific descriptor and fix wLength handling 2020-05-16 07:19:34 +08:00
Jiajie Chen
8f0aa3d2de Initial endpoint descriptors 2020-05-16 00:07:00 +08:00
Jiajie Chen
c5f9c89738 Initial configuration descriptor 2020-05-16 00:01:41 +08:00
Jiajie Chen
9868f1b22c Add builder for device 2020-05-15 21:46:18 +08:00
Jiajie Chen
2a2f3be6aa Implement OP_REQ_DEVLIST 2020-05-15 21:31:26 +08:00
Jiajie Chen
673631951e Initial usbip server based on tokio 2020-05-15 21:18:28 +08:00