Commit Graph

4 Commits

Author SHA1 Message Date
Jiyong Park ae5a4ed6e3 Add one more virtio-console device
To be in sync with Cuttlefish, have three virtio-console devices
(previously two) in Microdroid.

/dev/hvc0 is used as the kernel console where kmsg is redirected to
/dev/hvc1 is a new one and is used as the userspace console (set via
androidboot.console). This currently is not used; the backend is a sink.
/dev/hvc2 is used for logcat output

Bug: 200914564
Test: run MicrodroidDemoApp
Change-Id: Ib51be683cc2f8e19e09ae7a6b5707a196eb93ac5
2021-11-01 20:07:15 +09:00
Jiyong Park fa91d70fef Send logd logs from VM to host
When the debug level of a VM is not "none", logd logs from the VM is
sent to the host. This is done by running the VM with another virtual
console and running logcat as a daemon process whose output is set to
the new virtual console device. The launch of the daemon process is
controlled by microdroid. It starts the process only when the debug
level is set to above "none".

For now, the virtual console device is backed by the same file
descriptor as the kernel console logs. A follow-up change will introduce
a new dedicated file descriptor.

Bug: 200914564
Test: start microdroid using the `vm` tool. logcat logs are shown in
stdout.

Change-Id: I1748d30c5c997cda73f7b9f082ca84b0b3d25f1e
2021-10-27 01:34:39 +09:00
Jiyong Park 026df86633 Remove unnecessary entries from uevent.rc
Bug: 200914564
Test: atest MicrodroidHostTestCases

Change-Id: I6b78f10a5e9136985465f5488cf94cb5fdb168cf
2021-10-19 22:36:22 +09:00
Jiyong Park 4d2289579f Microdroid has its own ueventd.rc
So far, Microdroid used ueventd.rc from Android. Although ueventd.rc for
Android has some device nodes that are not relevant to microdroid (e.g.
gpu, input, etc.) but that wasn't harmful. However, we will soon have
/dev/hvc* entries for the virtualized console which is exclusive for
Microdroid.

Forking the file in preparation for the change.

Bug: 200914564
Test: atest MicrodroidHostTestCases
Change-Id: I3d42203f4835b8058249ef0783d0509d693e81e0
2021-10-19 21:29:43 +09:00