Although we can't opt-out A/B (because bootloader is built with
CONFIG_ANDROID_AB), but we can delete the unused 'b' slot as the update
of microdroid is not done by writing into the disk, but updating the
virt APEX that has the microdroid image.
Bug: N/A
Test: atest MicrodroidHostTestCases
Change-Id: Ie5871bf1b665e2cc564af54338043ae482ca01bb
misc.img was needed by the uboot bootloader that microdroid is using.
The bootloader uses the partition to read the boot mode (normal,
recovery, and bootloader) that is set during the previous boot.
However, boot mode doesn't make sense for microdroid. So we delete it.
Unfortunately, deleting it is not trivial because uboot demands us to
anyway provide the location of the misc partition with the
`boot_android` command.
This change works around the restriction by letting the bootloader use
the first partition (which currently is the boot_a partition) as the
misc partition. We do that by giving only the disk number (0) and not
the partition name (as in 0#misc). Then uboot by default chooses the
first partition as the misc partition, and find that it is not a correct
misc partition. In that case, it falls back to the 'normal' boot which
we want.
Bug: 191131043
Test: atest MicrodroidHostTestCases
Change-Id: If2e49d1da9f75c805bc0d0f33e3f221b12dd220e
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
... for better debuggability. Ideally this should be turned off for the
production builds.
Bug: 181936135
Test: start microdroid, watch the output.
Change-Id: Iebacf83b41af46918fdc1fd8de07ad6b3bd4abfa
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
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
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
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