From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 4 Feb 2013 21:58:40 +0100 Subject: [U-Boot] [PATCH] mxs: mxsboot: Add support for SD card generation for i.MX23 In-Reply-To: References: <1359050048-25415-1-git-send-email-otavio@ossystems.com.br> <201302041946.14480.marex@denx.de> Message-ID: <201302042158.41048.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Otavio Salvador, > On Mon, Feb 4, 2013 at 4:46 PM, Marek Vasut wrote: > > Dear Otavio Salvador, > > > >> On Mon, Feb 4, 2013 at 4:12 PM, Fabio Estevam wrote: > >> > On Thu, Jan 24, 2013 at 4:39 PM, Marek Vasut wrote: > >> >> PATCH: > >> >> diff --git a/tools/mxsboot.c b/tools/mxsboot.c > >> >> index 6c05aa4..d92c39f 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) { > >> > > >> > My mx28evk does not boot with this patch applied. > >> > >> As it does not work in mx28evk I'd prefer to use my previously > >> proposed patch as it keeps clear what is done for mx23 and mx28. What > >> people think? > > > > NAK. Your patch is just adding churn, which the bootrom ignores. Did you > > manage to get reply from FSL why the bootrom ignores it already? > > Well; your patch does the same but reuses the churn from mx28. Nobody > replied. So let's wait for the official reply from FSL. Can you tell me the support ticket number please? Best regards, Marek Vasut