summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSammy He <r62914@freescale.com>2011-07-26 00:15:45 +0800
committerSammy He <r62914@freescale.com>2011-07-26 18:52:00 +0800
commit25f925214af7a5abe9808e273365a87bc8474fc5 (patch)
tree27de5ca0721177b057f587b74c64cd5f7b349486 /common
parente436084d533dfc3d7569b6928e0c34278ba42b67 (diff)
ENGR00153605 fastboot: uboot cannot be burned to boot partition
uboot image cannot be burned to boot partition for eMMC 4.3. This patch will fix it. Signed-off-by: Sammy He <r62914@freescale.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_fastboot.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index 089a225573..2c819bfb31 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -1144,6 +1144,7 @@ static int rx_handler (const unsigned char *buffer, unsigned int buffer_size)
} else {
char source[32], dest[32];
char length[32], slot_no[32];
+ char part_no[32];
unsigned int temp;
/* Normal case */
@@ -1190,8 +1191,8 @@ static int rx_handler (const unsigned char *buffer, unsigned int buffer_size)
mmc_ops:
printf("writing to partition '%s'\n", ptn->name);
- char *mmc_write[6] = {"mmc", "write",
- NULL, NULL, NULL, NULL};
+ char *mmc_write[7] = {"mmc", "write",
+ NULL, NULL, NULL, NULL, NULL};
char *mmc_init[2] = {"mmcinit", NULL,};
mmc_init[1] = slot_no;
@@ -1199,11 +1200,14 @@ mmc_ops:
mmc_write[3] = source;
mmc_write[4] = dest;
mmc_write[5] = length;
+ mmc_write[6] = part_no;
sprintf(slot_no, "%d",
fastboot_devinfo.dev_id);
sprintf(source, "0x%x", interface.transfer_buffer);
-
+ /* partition no */
+ sprintf(part_no, "%d",
+ ptn->partition_id);
/* block offset */
sprintf(dest, "0x%x", ptn->start);
/* block count */
@@ -1219,7 +1223,7 @@ mmc_ops:
sprintf(response, "OKAY");
printf("Writing '%s'\n", ptn->name);
- if (do_mmcops(NULL, 0, 6, mmc_write)) {
+ if (do_mmcops(NULL, 0, 7, mmc_write)) {
printf("Writing '%s' FAILED!\n", ptn->name);
sprintf(response, "FAIL: Write partition");
} else {