diff options
| author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-05-11 09:25:36 +0200 |
|---|---|---|
| committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-05-11 09:25:36 +0200 |
| commit | ec7023db8dc95966919589541f1ca09355a3f7a5 (patch) | |
| tree | 69be08a0b3f19e3e1d99ea7829931f8f800a01d9 /tools/mxsboot.c | |
| parent | e825b100d209a9d3c79b2998452cafa94eec986a (diff) | |
| parent | d782c1fe7246301143ed78c0d86ea6c81f9325f9 (diff) | |
| download | olio-uboot-2014.01-ec7023db8dc95966919589541f1ca09355a3f7a5.tar.xz olio-uboot-2014.01-ec7023db8dc95966919589541f1ca09355a3f7a5.zip | |
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Conflicts:
drivers/mtd/nand/mxc_nand_spl.c
include/configs/m28evk.h
Diffstat (limited to 'tools/mxsboot.c')
| -rw-r--r-- | tools/mxsboot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 6c05aa479..d92c39fec 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -551,7 +551,7 @@ static int mx28_create_sd_image(int infd, int outfd) fsize = lseek(infd, 0, SEEK_END); lseek(infd, 0, SEEK_SET); - size = fsize + 512; + size = fsize + 4 * 512; buf = malloc(size); if (!buf) { @@ -559,7 +559,7 @@ static int mx28_create_sd_image(int infd, int outfd) goto err0; } - ret = read(infd, (uint8_t *)buf + 512, fsize); + ret = read(infd, (uint8_t *)buf + 4 * 512, fsize); if (ret != fsize) { ret = -1; goto err1; @@ -574,8 +574,8 @@ static int mx28_create_sd_image(int infd, int outfd) cb->drv_info[0].chip_num = 0x0; cb->drv_info[0].drive_type = 0x0; cb->drv_info[0].tag = 0x1; - cb->drv_info[0].first_sector_number = sd_sector + 1; - cb->drv_info[0].sector_count = (size - 1) / 512; + cb->drv_info[0].first_sector_number = sd_sector + 4; + cb->drv_info[0].sector_count = (size - 4) / 512; wr_size = write(outfd, buf, size); if (wr_size != size) { |