From: Mickael LANOE Date: Wed, 02 Jun 2010 14:59:28 +0200 Subject: [U-Boot] cannot load file from ext2 partition on OMAP3 evm Message-ID: <4C0655B0.4070509@univ-ubs.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c index 96c0e65..b555c73 100644 --- a/drivers/mmc/omap3_mmc.c +++ b/drivers/mmc/omap3_mmc.c @@ -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)