diff options
author | Zhang Sanshan <b51434@freescale.com> | 2015-07-06 10:26:01 +0800 |
---|---|---|
committer | Zhang Sanshan <b51434@freescale.com> | 2015-07-07 16:32:18 +0800 |
commit | b026e66a5bb6c2b6fda9e353dfe9061306c69da4 (patch) | |
tree | 3751cb2d62ebabae15965916ee41bfe817446159 /drivers | |
parent | 7c250c44fb697e281afe4924d4356525cfdab6d3 (diff) | |
download | u-boot-imx-imx_v2015.04_3.14.38_6ul7d_beta.zip u-boot-imx-imx_v2015.04_3.14.38_6ul7d_beta.tar.gz u-boot-imx-imx_v2015.04_3.14.38_6ul7d_beta.tar.bz2 |
MA-6860-1 refine fastboot in ubootrel_imx_3.14.38_6ul7d_betal5.1.1_2.0.0_7d-betaimx_v2015.04_3.14.38_6ul7d_beta
Enable fastboot command "fastboot flash data"
Custom may need to update data partition in fastboot mode.
This patch enable flash data partition in emmc\sd.
Signed-off-by: Zhang Sanshan <b51434@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/fastboot/fastboot.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/fastboot/fastboot.c b/drivers/fastboot/fastboot.c index 8fce951..d76fb70 100644 --- a/drivers/fastboot/fastboot.c +++ b/drivers/fastboot/fastboot.c @@ -65,7 +65,8 @@ enum { PTN_KERNEL_INDEX, PTN_URAMDISK_INDEX, PTN_SYSTEM_INDEX, - PTN_RECOVERY_INDEX + PTN_RECOVERY_INDEX, + PTN_DATA_INDEX }; struct fastboot_device_info fastboot_devinfo; @@ -823,7 +824,7 @@ static int _fastboot_parts_load_from_ptable(void) struct mmc *mmc; block_dev_desc_t *dev_desc; - struct fastboot_ptentry ptable[PTN_RECOVERY_INDEX + 1]; + struct fastboot_ptentry ptable[PTN_DATA_INDEX + 1]; /* sata case in env */ if (fastboot_devinfo.type == DEV_SATA) { @@ -870,7 +871,7 @@ static int _fastboot_parts_load_from_ptable(void) } memset((char *)ptable, 0, - sizeof(struct fastboot_ptentry) * (PTN_RECOVERY_INDEX + 1)); + sizeof(struct fastboot_ptentry) * (PTN_DATA_INDEX + 1)); /* MBR */ strcpy(ptable[PTN_MBR_INDEX].name, "mbr"); ptable[PTN_MBR_INDEX].start = ANDROID_MBR_OFFSET / dev_desc->blksz; @@ -895,8 +896,12 @@ static int _fastboot_parts_load_from_ptable(void) CONFIG_ANDROID_SYSTEM_PARTITION_MMC, user_partition, FASTBOOT_PARTITION_SYSTEM, dev_desc, ptable); + _fastboot_parts_add_ptable_entry(PTN_DATA_INDEX, + CONFIG_ANDROID_DATA_PARTITION_MMC, + user_partition, + FASTBOOT_PARTITION_DATA, dev_desc, ptable); - for (i = 0; i <= PTN_RECOVERY_INDEX; i++) + for (i = 0; i <= PTN_DATA_INDEX; i++) fastboot_flash_add_ptn(&ptable[i]); return 0; |