From 22908334388e4ec893334436463327ac59b4ad45 Mon Sep 17 00:00:00 2001 From: zhang sanshan Date: Tue, 8 Aug 2017 12:46:32 +0800 Subject: [PATCH] MA-10028 [Android]delete gpt in cmdline The gpt table in imx8 is not overlay with uboot. we do not use the last GPT table on imx8 platform. Change-Id: I2c766a8de83e84135aa53811817b8d74f2f2f6e0 Signed-off-by: zhang sanshan --- common/image-android.c | 7 ++++++- include/fsl_fastboot.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/image-android.c b/common/image-android.c index a006120c51..1d09299cee 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -14,6 +14,7 @@ #include #include #include +#include #define ANDROID_IMAGE_DEFAULT_KERNEL_ADDR 0x10008000 @@ -111,7 +112,7 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, if (bootdev == SD1_BOOT || bootdev == SD2_BOOT || bootdev == SD3_BOOT || bootdev == SD4_BOOT) { sprintf(newbootargs, - " androidboot.storage_type=sd gpt"); + " androidboot.storage_type=sd"); } else if (bootdev == MMC1_BOOT || bootdev == MMC2_BOOT || bootdev == MMC3_BOOT || bootdev == MMC4_BOOT) { sprintf(newbootargs, @@ -122,6 +123,10 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, } else printf("boot device type is incorrect.\n"); strcat(commandline, newbootargs); + if (bootloader_gpt_overlay()) { + sprintf(newbootargs, " gpt"); + strcat(commandline, newbootargs); + } #ifdef CONFIG_FSL_BOOTCTL sprintf(newbootargs, " androidboot.slot_suffix=%s", get_slot_suffix()); diff --git a/include/fsl_fastboot.h b/include/fsl_fastboot.h index 9d04da95fa..5d93ebeb33 100644 --- a/include/fsl_fastboot.h +++ b/include/fsl_fastboot.h @@ -7,6 +7,7 @@ #ifndef FSL_FASTBOOT_H #define FSL_FASTBOOT_H +#include #define FASTBOOT_PTENTRY_FLAGS_REPEAT(n) (n & 0x0f) #define FASTBOOT_PTENTRY_FLAGS_REPEAT_MASK 0x0000000F @@ -199,6 +200,8 @@ void fastboot_run_bootmode(void); /*Setup board-relative fastboot environment */ void board_fastboot_setup(void); +/*check whether bootloader is overlay with GPT table*/ +bool bootloader_gpt_overlay(void); /* Check whether the combo keys pressed * Return 1 if combo keys pressed for recovery boot * Return 0 if no combo keys pressed -- 2.17.1