From 9c723a7d146018be07f49f6162ba761973049b9b Mon Sep 17 00:00:00 2001 From: fang hui Date: Thu, 12 Nov 2015 14:52:39 +0800 Subject: MA-7251 - [evk_6ul]: Support boot conctrol for brillo brillo need bootlader support boot control. bootlader can choose which slot(partition) to boot based on it's tactic. The commit support boot control for evk6ul Signed-off-by: fang hui --- common/image-android.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'common/image-android.c') diff --git a/common/image-android.c b/common/image-android.c index 78a1f32..27da522 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -13,6 +13,11 @@ static char andr_tmp_str[ANDR_BOOT_ARGS_SIZE + 1]; +#ifdef CONFIG_BRILLO_SUPPORT +#include +#include +#include "../drivers/usb/gadget/bootctrl.h" +#endif /** * android_image_get_kernel() - processes kernel part of Android boot images * @hdr: Pointer to image header, which is at the start @@ -78,6 +83,13 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, serialnr.high, serialnr.low); #endif + +#ifdef CONFIG_BRILLO_SUPPORT + char suffixStr[64]; + sprintf(suffixStr, " androidboot.slot_suffix=%s", get_slot_suffix()); + strcat(commandline, suffixStr); +#endif + if (getenv("bootcmd_android_recovery")) { char new_commandline[ANDR_BOOT_ARGS_SIZE]; char cmd_selinux[30] = "androidboot.selinux=disabled"; -- cgit v1.1