Skip to contentSkip to conversation

cannot load file from ext2 partition on OMAP3 evm

U-Boot Mickael LANOE 2 participants 2 messages Jun 2, 2010 – Aug 7, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi,

The command ext2load does not work on the OMAP3 EVM.

The command line is:

# ext2load mmc 0:2 0x82000000 /boot/uImage

The error is:
ext2fs_devread() read error - block

After reading the u-boot source code, I see that the function mmc_bread() in file drivers/mmc/omap3_mmc.c does not return the good value.

So I apply this small patch to fix the problem

Best regards,

Mickael LANOE

drivers/mmc/omap3_mmc.c +4 -3
index 96c0e65..b555c73 100644
@@ -507,9 +507,10 @@ unsigned char configure_mmc(mmc_card_data *mmc_card_cur)
 unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt,
                        void *dst)
 {
-       omap_mmc_read_sect(blknr, (blkcnt * MMCSD_SECTOR_SIZE), &cur_card_data,
-                               (unsigned long *) dst);
-       return 1;
+       if(omap_mmc_read_sect(blknr, (blkcnt * MMCSD_SECTOR_SIZE), &cur_card_data,
+                               (unsigned long *) dst) != 1)
+               return 0;
+       return blkcnt;
 }
 
 int mmc_legacy_init(int verbose)
#1 lore raw

Dear Mickael LANOE,

Quoted 7 lines · In message <[email protected]> you wrote:

Hi,

The command ext2load does not work on the OMAP3 EVM.

The command line is:

# ext2load mmc 0:2 0x82000000 /boot/uImage
Quoted 7 lines

The error is:
ext2fs_devread() read error - block

After reading the u-boot source code, I see that the function mmc_bread() in file drivers/mmc/omap3_mmc.c does not return the good value.

So I apply this small patch to fix the problem

Can you please resubmit this patch with your Signed-off-by: line added, so we can apply it?

Thanks.

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In English, every word can be verbed.  Would that it were  so  in our
programming languages.