[U-Boot] [bug report] sunxi: booting from eMMC

Alexandr Bochkarev aneox.inbox at gmail.com
Fri Oct 7 10:44:45 CEST 2016


Hi!
Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc (
So, my steps:

git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot;
make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig
make CROSS_COMPILE=arm-linux-gnueabihf-

Also turn on CONFIG_MMC_TRACE

After run, got:

Trying to boot from MMC1
CMD_SEND:0
..ARG... 0x00000000
..MMC_RSP_NONE
CMD_SEND:8
..ARG... 0x00000000
..RET... -110
CMD_SEND:55
..ARG... 0x00000000
..RET... -110
CMD_SEND:0
..ARG... 0x00000000
..MMC_RSP_NONE
CMD_SEND:1
..ARG... 0x00000000
..MMC_RSP_R3,4.. 0x00000000 
CMD_SEND:1
..ARG... 0x00000000
..MMC_RSP_R3,4.. 0x00000000 
CMD_SEND:0
..ARG... 0x00000000
..MMC_RSP_NONE
CMD_SEND:1
..ARG... 0x00000000
..MMC_RSP_R3,4.. 0x00000000 
CMD_SEND:1
..ARG... 0x00000000
..MMC_RSP_R3,4.. 0x00000000 
CMD_SEND:2
..ARG... 0x00000000
..MMC_RSP_R2.. 0x00000000 
..          .. 0x00000000 
..          .. 0x00000000 
..          .. 0x00000000 

.....DUMPING DATA
.....000 - 00 00 00 00 
.....004 - 00 00 00 00 
.....008 - 00 00 00 00 
.....012 - 00 00 00 00 
CMD_SEND:3
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CMD_SEND:9
..ARG... 0x00000000
..MMC_RSP_R2.. 0x00000000 
..          .. 0x00000000 
..          .. 0x00000000 
..          .. 0x00000000 

.....DUMPING DATA
.....000 - 00 00 00 00 
.....004 - 00 00 00 00 
.....008 - 00 00 00 00 
.....012 - 00 00 00 00 
CMD_SEND:13
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CURR STATE:3
CMD_SEND:7
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CMD_SEND:8
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CMD_SEND:8
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CMD_SEND:6
..ARG... 0x00000000
..MMC_RSP_R1b.. 0x00000000 
CMD_SEND:13
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CURR STATE:4
CMD_SEND:8
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CMD_SEND:6
..ARG... 0x00000000
..RET... -110
CMD_SEND:16
..ARG... 0x00000000
..MMC_RSP_R1,5,6,7 . 0x00000000 
CMD_SEND:17
..ARG... 0x00000000
..RET... -110

hdr read sector 80, count=0
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

So, 
spl_mmc.c on line 66, blk_dread return 0 count
blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0
block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread;
mmc.c, line 285 mmc_read_blocks return Failed to read blocks
mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace


> 7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung at samsung.com> написал(а):
> 
> On 10/03/2016 02:39 AM, AneoX wrote:
>> Emmc Card was the new one, so i just burn a dump of working sd. Previously
>> sd have been wired to board for test.
>> 
>> Board is a custom,  like olinuxino lime which with nand and sd slot, 512 mb
>> ram. So i using it defconfig and in case of sd card, it works.
>> Emmc lines has external pullups according to the datasheet.
> 
> Well, i needs to get more information..If you guess that seems to return 0 from block_read()..
> then you can find which condition was hit..is it impossible?
> 
> If you can share more debug message..then i will help you.
> 
> Best Regards,
> Jaehoon Chung
> 
>> 
>> 2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki at gmail.com>
>> написал:
>> 
>> On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox at gmail.com> wrote:
>>> Like a sd card. I have emmc to sd adapter, so
>>> 
>>> dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
>> 
>> I guess you cleaned[1] the card before doing this?
>> 
>>> 
>>> and then just solder emmc to my board.
>> 
>> OK, which a20 board?
>> 
>> [1] http://linux-sunxi.org/Bootable_SD_card
>> 
>> thanks!
>> --
>> Jagan Teki
>> Free Software Engineer | www.openedev.com
>> U-Boot, Linux | Upstream Maintainer
>> Hyderabad, India.
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de <mailto:U-Boot at lists.denx.de>
>> http://lists.denx.de/mailman/listinfo/u-boot <http://lists.denx.de/mailman/listinfo/u-boot>


More information about the U-Boot mailing list