diff options
author | Sammy He <r62914@freescale.com> | 2011-07-26 00:15:45 +0800 |
---|---|---|
committer | Xinyu Chen <xinyu.chen@freescale.com> | 2011-07-27 11:15:28 +0800 |
commit | 69c434e51c7711b8978af53264cd68902b91a0c5 (patch) | |
tree | b9815cec988db95a8af02fb8240586dd55dc0576 /common | |
parent | 5a323cf99ca449e4d47014ce10f9da39f902bf29 (diff) | |
download | u-boot-imx-69c434e51c7711b8978af53264cd68902b91a0c5.zip u-boot-imx-69c434e51c7711b8978af53264cd68902b91a0c5.tar.gz u-boot-imx-69c434e51c7711b8978af53264cd68902b91a0c5.tar.bz2 |
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.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 089a225..2c819bf 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 { |