2lib: Drop unused ramdisk fragments based on BCB command

Parse misc partition to find out boot command type and prepare proper
ramdisk content based on boot type.

BUG=b:349304841
TEST=Boot into Android and request wipe (e.g. Settings > System > Reset
options > Erase all data (factory reset)). Device reboots into Android
recovery and wipes user data partition and reboots back to normal mode.
Note that force_normal_boot needs to be removed from cmdline and
recovery.fstab needs to be present on ramdisk.
BRANCH=main

Change-Id: I7b55f2b65533e3f0739435e7f2f283d116f94587
Signed-off-by: Tomasz Michalec <tmichalec@google.com>
Signed-off-by: Grzegorz Bernacki <bernacki@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/6030623
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
1 file changed