Commit Graph

114 Commits

Author SHA1 Message Date
Jiyong Park 3eb11f74cd Add fstab for microdroid & add more kernel commandline params
The vendor_boot.img now has fstab file in it. It currently mounts the
system.img to /system, but eventually we will use the dynamic partitions
in super.img.

A few more essential kernel commandline params are added. Eventually,
these androidboot.* parameters will be given via /proc/bootconfig.

Bug: 178562528
Test: build microdroid-* modules. push microdroid-boot-5.10.img as
boot.img, microdroid-vendor-boot-5.10.img as vendor_boot.img,
micrdroid.img as super.img.
Run assemble_cvd on the device.
Push microdroid-uboot_env.img as uboot_env.img
Run crosvm with the generated composite image. VM goes through the
bootloader, kernel, first stage init, and then second stage init.

Change-Id: Id1ce4f33f912bb80cd280060ecd9cabe57675660
2021-02-24 15:30:12 +09:00
Treehugger Robot af2e274b8d Merge "Build boot.img for microdroid" 2021-02-22 23:53:15 +00:00
Jiyong Park f138b92d86 Merge "Build uboot_env.img statically" 2021-02-22 17:21:50 +00:00
Jiyong Park f677cfab84 Build uboot_env.img statically
The environment partition can control the behavior of the bootloader.
Therefore it shouldn't be dynamically created on the device.

Bug: 180675126
Test: m microdroid_uboot_env
Change-Id: If49634293f2fe7fbb82fae243632480fc7d72d30
2021-02-22 07:57:14 +00:00
Jiyong Park c8b4003cfd Build boot.img for microdroid
Bug: 178562516
Test: m microdroid_boot-5.10
Change-Id: Ibe0c6ee8b84d7b5b310b780e10769877b63d18e9
2021-02-19 08:53:50 +09:00
Inseob Kim d8cf762504 Add SELinux stuffs to boot
Contexts files, plat_sepolicy.cil, and 10000.0.cil are needed to boot.
This adds those files to microdroid. But cil files are temporary and
only for testing. We'll need to migrate real cil files to Android.bp.

Bug: 178993690
Test: boot microdroid
Change-Id: I684b67bbb6906ba42a710156519723eff23938d2
2021-02-18 19:16:20 +09:00
Inseob Kim dc2af866ec Add minimized init.rc and services to microdroid
This adds a minimized init.rc and services to microdroid, so microdroid
can boot and adb can work.

Bug: 179340780
Test: boot with manually added selinux stuffs and apexd session patch
Change-Id: I42ae13f3f2ac9ca22ed646564867da3931824682
2021-02-18 09:25:11 +09:00
Inseob Kim 5ffc082419 Add rootdir contents to microdroid
These lists are based on rootdir contents. A little more shrinked.

Bug: 179652970
Test: boot with aosp_cf_x86_64_only_phone
Change-Id: I06cc7d5e8a6b7b22270217d6b2d6a1b7e6ecaebc
2021-02-17 14:05:55 +09:00
Inseob Kim a313e56e87 Set base_dir of microdroid to system
Bug: 179652970
Test: see contents of microdroid.img
Change-Id: I67abae5e308ea1f0d67b426fc2bcaa36773634cc
2021-02-17 12:11:02 +09:00
Treehugger Robot d633fb0dac Merge "Build vendor_boot image for microdroid" 2021-02-07 11:45:33 +00:00
Bob Badour 2efc476199 [LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Virtualization
Added SPDX-license-identifier-Apache-2.0 to:
  apex/Android.bp
  authfs/Android.bp
  microdroid/Android.bp
  tests/hostside/Android.bp
  tests/hostside/native/init/Android.bp
  tests/hostside/native/vsock/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ibcf7d8fbfaee8efb100d765f8c7dbde819ffb621
2021-02-05 01:25:31 -08:00
Jiyong Park 153d355b86 Build vendor_boot image for microdroid
It consists of

* common kernel modules for virtual devices
* a dummy dtb image

Bug: 178978059
Test: m microdroid_vendor_boot-5.10

Change-Id: I7df34ef976b557ff750aa566838f744162caf1a3
2021-02-04 23:39:09 +09:00
Inseob Kim af8ae3c68a Add microdroid_file_contexts to build image
This file is a simple copy of system/sepolicy/private/file_contexts to
support contexts for microdroid.img. It contains unnecessary entries,
but we'll leave it for now and clean up after enough experiment.

Bug: 178993690
Test: boot and see selinux denials are gone
Change-Id: I43782937a282b752091640b249288415137db6b6
2021-02-03 14:50:28 +09:00
Jiyong Park b552bb6848 Add microdroid, a minimal Android-based Linux image
microdroid is a minimal Linux image that we will use in VMs. Instead of
inventing a whole new Linux image from scratch, we design microdroid as
a stripped down version of the generic Android system image (GSI).

Bug: 177630284
Test: m microdroid
Test: no runtime test. This isn't mountable yet.
Change-Id: I528e9da2a0933e7d024f3606c82df585d029785c
2021-01-25 19:14:36 +09:00