misc.img is not needed
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
5 files changed