diff options
author | zhang sanshan <sanshan.zhang@nxp.com> | 2017-05-10 10:14:27 +0800 |
---|---|---|
committer | Zhang Bo <bo.zhang@nxp.com> | 2017-06-21 12:21:03 +0800 |
commit | 81c9431f562bbeb2b6b1efb0f99e023ed818dc5d (patch) | |
tree | 8190ae0c64722f89dbcec4ad5c0874f41183b8e2 /common | |
parent | 31da76c496511b3d640ac1008b630b3ec939e168 (diff) | |
download | u-boot-imx-81c9431f562bbeb2b6b1efb0f99e023ed818dc5d.zip u-boot-imx-81c9431f562bbeb2b6b1efb0f99e023ed818dc5d.tar.gz u-boot-imx-81c9431f562bbeb2b6b1efb0f99e023ed818dc5d.tar.bz2 |
MA-9375 [Android IMX] uboot: enable BCB and bootctrl
* Add API to read\write MISC partition.
* get the boot mode from BCB command when boot up.
* get the boot up tactics from bootctrl.
Change-Id: Icbba6340e10983dddc1b04804ecc012a3a3c57d0
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/board_r.c | 2 | ||||
-rw-r--r-- | common/image-android.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/common/board_r.c b/common/board_r.c index 014dbff..a69bc3f 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -731,7 +731,7 @@ static int initr_fastboot_setup(void) static int initr_check_fastboot(void) { - check_fastboot(); + fastboot_run_bootmode(); return 0; } #endif diff --git a/common/image-android.c b/common/image-android.c index de5e97c..4f1408b 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -19,6 +19,12 @@ static char andr_tmp_str[ANDR_BOOT_ARGS_SIZE + 1]; +#ifdef CONFIG_FSL_BOOTCTL +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> +#include "../drivers/usb/gadget/bootctrl.h" +#endif + static ulong android_image_get_kernel_addr(const struct andr_img_hdr *hdr) { /* @@ -125,6 +131,11 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, } else printf("boot device type is incorrect.\n"); +#ifdef CONFIG_FSL_BOOTCTL + char suffixStr[64]; + sprintf(suffixStr, " androidboot.slot_suffix=%s", get_slot_suffix()); + strcat(commandline, suffixStr); +#endif setenv("bootargs", commandline); if (os_data) { |