Commit Graph

12 Commits

Author SHA1 Message Date
Jooyung Han 017916bf35 Microdroid activates host APEXes
Host apexes are passed to microdroid via the payload composite image.
The payload composite image can be created by either
mk_payload_signature/mk_cdisk or mk_payload.

For now, microdroid expects two APEXes from the host:
- com.android.adbd
- com.android.sdkext

The exact set of host apexes for microdroid is TBD. The current set is
only for demonstration.

Bug: 181093750
Test: MicrodroidTestCase
Change-Id: I7fe33fe03ac94799a4e109b83286bfb39e44b882
2021-04-21 23:20:29 +09:00
Jiyong Park 7851501f2b Move uboot_env.img to a new composite disk
u-boot is updated to look for the environment partition in the second
disk.

Bug: 183006588
Test: atest MicrodroidHostTestCases
Change-Id: I2e716bb85d4762f700ea7479c68ffbcfd150857c
2021-04-13 17:44:44 +09:00
Inseob Kim 72f06a3489 Include microdroid files to virt apex
All files to run microdroid is now included to the com.android.virt
APEX:

- super image
- boot images
- vbmeta images
- bootloader
- uboot_env image
- cdisk json config

Also the documentation README.md and microdroid host tests are updated
too.

Bug: 184803590
Test: follow instructions on README.md
Test: atest MicrodroidHostTestCases
Change-Id: I71f0e32ca774b351d9f49af2754f0a1c786c2400
2021-04-12 16:15:38 +09:00
Jiyong Park 66aa0fb524 Sign the bootloader using avbtool
The signing is effectively no op for now because nothing verifies the
bootloader. However, in the end, the pKVM firmware will verify the
bootloader and use the vbmeta footer appended to it.

Bug: 182169705
Test: atest MicrodroidTestCase
Change-Id: I459250a84969b2a6bfa207085fe267f3a78033d6
2021-04-09 11:24:33 +09:00
Jooyung Han 25a2acc102 Use mk_cdisk instead of assemble_cvd
mk_cdisk is a tool to create a composite disk image. It can be used to
create other kinds of composite disks as well as os_composite.os which
was created by assemble_cvd before.

For example, if we want to pass host apexes to microdroid we can pass
them via a composite disk referencing host apex files.

Bug: 181093750
Test: running microdroid VM following updated microdroid/README.md
TEst: MicrodroidTestCase
Change-Id: Ief6468564da9eb78c6729ae64a218811919b3ae0
2021-04-08 17:13:04 +09:00
Jooyung Han d4bc533ff0 Rename composite.img to os_composite.img
assemble_cvd changed it recently.

Test: MicrodroidTestCase
Bug: n/a
Change-Id: I67ff25071ce20f9df445707e43a17d67bf5850cf
2021-03-24 17:19:32 +09:00
Jiyong Park 82848c5f2b Merge "Build microdroid-vbmeta and -vbmeta_system" 2021-03-18 00:02:41 +00:00
Ram Muthiah 543c58b347 Update microdroid test to include protected_vm flag
assemble_cvd was updated to include a flag which would disable insecure
launcher options.

Bug: 182005319
Test: local boot on cuttlefish
Change-Id: I3aabd594bf742a7639d4f57a1276a2733545c03e
2021-03-15 20:53:17 -07:00
Jiyong Park 80d8da832e Build microdroid-vbmeta and -vbmeta_system
Bug: 180676957
Test: m microdroid-vbmeta microdroid-vbmeta_system
avbtool info_image --image <built_image>

Test: atest MicrodroidHostTestCases

Change-Id: Ifa3dae5080e68faca921b7817db98548727eefc4
2021-03-16 11:34:44 +09:00
Inseob Kim f7e4e1b88e Fix assemble_cvd command
assemble_cvd needs crosvm, but /apex/com.android.virt/bin is not in
$PATH. This adds the directory to $PATH so assemble_cvd can be happy.

Test: manual
Change-Id: Iaf955c67ab92b3bbed04a9a31ece614b0e4a9639
2021-03-10 18:25:17 +09:00
Jiyong Park 22bdc857c5 Enable adbd on microdroid
The following system properties are forcibly set to make adbd function.

ro.apex.updatable=true : otherwise, apexd doesn't activate critical
APEXes like the runtime APEX

ro.adb.secure=0 : to bypass the adb authentication

ro.debuggable=1 : to be able to use ro.adb.secure=0

This change also updates README.md file for the instruction to use adb.

Bug: 181728474
Test: adb shell works towards microdroid. See microdroid/README.md

Change-Id: Ica405e8bd4d2d1ef03e545aef5ed07ddc4bea34c
2021-03-04 09:46:34 +09:00
Jiyong Park 2223f0c9b8 Add some documentation about microdroid
... so that others can do experiments

Bug: N/A
Test: N/A
Change-Id: I59805826ec7cb36da29c656ef469217716a50834
2021-02-26 18:55:27 +09:00