Commit Graph

5 Commits

Author SHA1 Message Date
Jooyung Han 21e668cb97 microdroid: use a single vbmeta for all partitions
Since we don't need to update partitions separately, a single vbmeta is
enough for all partitions.

Bug: 193504286
Test: atest MicrodroidHostTestCases
Change-Id: I4f0e84dc0132c8f3ff9262e11bfc68eaf7863169
2021-10-26 12:11:26 +09:00
Jiyong Park 52ea0830e5 Mount system and vendor over dm-verity
This CL fixes a series of mistakes which let the system and the vendor
partition be mounted without dm-verity.

* avb=vbmeta and avb=vbmeta_system flags are added to fstab so that the
partitions are mounted over dm-verity

* uboot script is modified to append avb_bootargs into bootargs so that
avb parameters like the root hash, etc. are passed to the kernel via
cmdline

* The boot partition is no longer a chained partition. Its hashtree is
included in vbmeta.img directly. This is firstly because we don't have a
need to update the kernel independently from other partitions. And
secondly, boot as a chained partition requires us to create
/dev/block/by-name/boot during the first stage init, which require
additional-but-useless entry in fstab.

* Name of the logical partitions in super.img is changed to system_a and
vendor_a from system and vendor, respectively.

Bug: 198303625
Test: boot microdroid. `ls /dev/block/mapper` shows
```
drwxr-xr-x 3 root root  160 2021-09-01 03:10 .
drwxr-xr-x 5 root root 1180 2021-09-01 03:10 ..
drwxr-xr-x 2 root root  140 2021-09-01 03:10 by-uuid
lrwxrwxrwx 1 root root   15 2021-09-01 03:10 microdroid-apk -> /dev/block/dm-4
lrwxrwxrwx 1 root root   15 2021-09-01 03:10 system-verity -> /dev/block/dm-2
lrwxrwxrwx 1 root root   15 2021-09-01 03:10 system_a -> /dev/block/dm-0
lrwxrwxrwx 1 root root   15 2021-09-01 03:10 vendor-verity -> /dev/block/dm-3
lrwxrwxrwx 1 root root   15 2021-09-01 03:10 vendor_a -> /dev/block/dm-1
```

Change-Id: I6b485d841d9bd774ab964fd9ae7d2e0a15795b14
2021-09-01 17:27:30 +09:00
Inseob Kim 17d0db10da Change /data to tmpfs
For security reason, we will use tmpfs for /data. It should contain only
small, temporary files for now.

vold is removed as it's redundant now. MicrodroidTestCase's boot marker
is also updated because logd reinit won't happen if vold is removed.

Bug: 185767624
Test: atest MicrodroidHostTestCases
Change-Id: I3f60d5dfad2519b6d593a3f514bb50c50019b526
2021-06-09 14:30:47 +09:00
Inseob Kim de6b6894f6 Enable file encryption on /data partition
For now, the default implementation will be used. In the future,
microdroid-specific keymint HAL will be implemented.

Bug: 185767624
Test: atest MicrodroidHostTestCases
Test: mount userdata.img and see files encrypted
Change-Id: I593e659b60d6b33b153f8d614395755e83e597de
2021-06-02 20:40:48 +09:00
Inseob Kim 67ab436363 Update init.rc and fstab to normal convention
Bug: 185767624
Test: boot and see data mounted
Change-Id: Iabeca8c4c03df586ee1a65e8274e3667c2bdd2dc
2021-05-26 17:17:05 +09:00