[U-Boot] [bug report] sunxi: booting from eMMC
Jaehoon Chung
jh80.chung at samsung.com
Wed Oct 12 14:21:26 CEST 2016
On 10/12/2016 09:11 PM, Alexandr Bochkarev wrote:
> On marsboard today i used 2014 u-boot, sd card on sdc0 hardware lines and emmc on sdc2 hardware lines.
> and get error "Card did not respond to voltage select!» , then i tried to boot without sd card, only with emmc on sdc2
>
> On my board i used mainline u-boot, emmc on sdc0 hardware lines.
> And get block read error, logs below.
>
> Brom on A20 chip firstly tries sdc0, if fail, then sdc2.
I understood more clearly...Your target for using is sdc0(eMMC), right?
- marsboard for just testing is sdc0 (SD-card)..
>
> I dont checked only gpio pins, maybe in det pin problem, i will try, thx.
If det-pin problem, it should be fixed too easy. :)
I will try to check codes relevant to sunxi..
Sorry for helping more clearly..
>
>
>> 12 окт. 2016 г., в 18:05, Jaehoon Chung <jh80.chung at samsung.com> написал(а):
>>
>> Added Hans (sunxi maintainer)
>>
>> On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
>>>> This log means that there is no card on slot..
>>> But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
>>>
>>> Now i tried, boot marsboard from sd, hit button to stop kernel loading.
>>> sun7i# mmc list
>>> SUNXI SD/MMC: 0
>>>
>>> Looks like its doesnt see emmc on sdc2.
>>
>> If i misunderstood something, let me know, plz. :)
>> (Because i don't have targets relevant to sunxi..)
>>
>> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
>> -> This is right? 2014?
>>
>> What did you mean sdc0/sdc1/sdc2...do you mean the hardware line?
>> If it's hardware line..sdc0 is for eMMC?
>>
>> "Card did not respond to voltage select!"
>> 1. There is no card on slot..
>> 2. Power doesn't supply..
>>
>> Did you check everything? Power, clock, gpio pin..
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>>
>>> sun7i# printenv
>>> Environment size: 1919/131068 bytes
>>> autoboot=run loadkernel && run setargs && true && bootm 0x48000000
>>> baudrate=115200
>>> boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi
>>> bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot;
>>> bootdelay=2
>>> bootenv=uEnv.txt
>>> bootm_size=0x10000000
>>> bootscr=boot.scr
>>> console=ttyS0,115200
>>> device=mmc
>>> ethact=dwmac.1c50000
>>> ethaddr=02:d8:09:82:e3:9b
>>> kernel=uImage
>>> loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv}
>>> loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr}
>>> loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi
>>> loglevel=8
>>> panicarg=panic=10
>>> partition=0:1
>>> script=script.bin
>>> scriptaddr=0x44000000
>>> setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
>>> stderr=serial
>>> stdin=serial
>>> stdout=serial
>>>
>>>
>>>> 12 окт. 2016 г., в 17:09, Jaehoon Chung <jh80.chung at samsung.com> написал(а):
>>>>
>>>> On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
>>>>> In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash.
>>>>> So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well.
>>>>> But when i eject sd and try to boot from sdc2 emmc, get the same err 17.
>>>>> In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
>>>>>
>>>>> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
>>>>> Board: MarsBoard-A20 & MarsPI
>>>>> DRAM: 1024 MiB
>>>>> CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
>>>>> Card did not respond to voltage select!
>>>>
>>>> This log means that there is no card on slot..
>>>> In my case..when i set the wrong mmc boot dev in environment, I had seen the similar log.
>>>> Could you share the environment values?
>>>>
>>>>> spl: mmc init failed: err - -17
>>>>> ### ERROR ### Please RESET the board ###
>>>>>
>>>>> So, the problem with eMMC KLM4G1FE3B-B001 is exists(
>>>>> Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
>>>>
>>>> I'm not sure...100% working card...because we don't ensure 100% what problem there are in mainline u-boot.
>>>>
>>>>>
>>>>>> 7 окт. 2016 г., в 14:44, Alexandr Bochkarev <aneox.inbox at gmail.com <mailto:aneox.inbox at gmail.com>> написал(а):
>>>>>>
>>>>>> 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
>>>>
>>>> the below log seems that is nothing to do..arguments/response data..everything are 0..
>>>> It's strange.
>>>>
>>>>
>>>> Best Regards,
>>>> Jaehoon Chung
>>>>
>>>>>>
>>>>>> 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 <mailto: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 <mailto:jagannadh.teki at gmail.com>>
>>>>>>>> написал:
>>>>>>>>
>>>>>>>> On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox at gmail.com <mailto: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 <http://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
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>
>
>
>
More information about the U-Boot
mailing list