Commit Graph

6 Commits

Author SHA1 Message Date
Jiyong Park 9ecac555ba Microdroid uses android boot image header V4
It's the latest one supporting the bootconfig. Also this change moves
the kernel commandline paramters from uboot-env.img to boot.img. The
former will eventually be removed.

Bug: 181936566
Test: boot microdroid on VIM3L
Change-Id: I5738f07e8b98fd0d61dbea047ebbd0ceb7258f31
2021-03-05 18:56:34 +09:00
Jiyong Park 3adec1f0ad Disable kmsg ratelimiting
... for better debuggability. Ideally this should be turned off for the
production builds.

Bug: 181936135
Test: start microdroid, watch the output.
Change-Id: Iebacf83b41af46918fdc1fd8de07ad6b3bd4abfa
2021-03-05 17:30:15 +09:00
Jiyong Park 1b13e0f69f Turn selinux off temporarily for microdroid
For some unknown reason, microdroid is experiencing selinux denials
although we provided the correct policy files. Until the cause is found
and fixed, let's disable selinux.

Bug: 181728474
Bug: 181747352
Test: boot microdroid
Change-Id: I466c0eb88d4b3ce6a2cca73252e15f53a401cab7
2021-03-04 00:12:58 +09:00
Jiyong Park d820bea707 Use devnum#partname format instead of the part number
The first and the second parameters of the `boot_android` command are
dev_iface and dev_part_str. The former selects the device interface like
`virtio` and the latter selects a specific partition. The format for the
latter is devnum#partname. ex) 0#misc. When the second parameter is not
given, u-boot falls back to read the environment variable `bootdevice`,
whose format is `devnum:partnum`.

For microdroid (and cuttlefish as well), we have been relying on the
fallback behavior. With this change, we stop doing that. The second
parameter is correctly set to "0#misc" and the variable `bootdevice`
is dropped.

Bug: 181635258
Test: microdroid boots

Change-Id: Ib572d0149765ee93d780837216e6a1c8eafaad03
2021-03-03 22:31:09 +09:00
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
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