summaryrefslogtreecommitdiff
path: root/common/image-android.c
diff options
context:
space:
mode:
authorfang hui <b31070@freescale.com>2015-11-12 14:52:39 +0800
committerfang hui <b31070@freescale.com>2015-11-13 17:00:58 +0800
commit9c723a7d146018be07f49f6162ba761973049b9b (patch)
tree7d7394e027daaaa395367c964cead334681b8db7 /common/image-android.c
parent54ea3f2ad69597486ed40a16e47aa41eea8f072b (diff)
downloadu-boot-imx-9c723a7d146018be07f49f6162ba761973049b9b.zip
u-boot-imx-9c723a7d146018be07f49f6162ba761973049b9b.tar.gz
u-boot-imx-9c723a7d146018be07f49f6162ba761973049b9b.tar.bz2
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 <b31070@freescale.com>
Diffstat (limited to 'common/image-android.c')
-rw-r--r--common/image-android.c12
1 files changed, 12 insertions, 0 deletions
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 <linux/usb/ch9.h>
+#include <linux/usb/gadget.h>
+#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";