All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandr Bochkarev <aneox.inbox@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [bug report] sunxi: booting from eMMC
Date: Wed, 12 Oct 2016 17:25:44 +0600	[thread overview]
Message-ID: <3B102B1C-8BB0-43CA-93CD-82B029139648@gmail.com> (raw)
In-Reply-To: <32930d8a-ee15-9aa2-7d87-6450b1efba4b@samsung.com>

> 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.


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@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@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@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@gmail.com>>
>>>>> ???????:
>>>>> 
>>>>> On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox at gmail.com <mailto:aneox.inbox@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@lists.denx.de>
>>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>> 
>> 
> 

  reply	other threads:[~2016-10-12 11:25 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02  7:37 [U-Boot] [bug report] sunxi: booting from eMMC Alexandr Bochkarev
2016-10-02 13:38 ` Jagan Teki
2016-10-02 13:43   ` Alexandr Bochkarev
2016-10-02 17:08     ` Jagan Teki
     [not found]       ` <CAC2Q4vbD0Eh++cfvKfbSxK_m0KLqUh5GGJ4ur6K6AFSp2so39w@mail.gmail.com>
     [not found]         ` <CAC2Q4vY8vnaM5XrZKNp84J0AmYKWSGQKK_DQOKLERUCQyGM=nA@mail.gmail.com>
2016-10-02 17:15           ` AneoX
2016-10-02 17:28             ` Jagan Teki
     [not found]               ` <CAC2Q4vY0mpHLO82qN=xecvy9gjKESWd_FzP-esaC9zcyH0dqcg@mail.gmail.com>
2016-10-02 17:39                 ` AneoX
2016-10-06 23:48                   ` Jaehoon Chung
2016-10-07  8:44                     ` Alexandr Bochkarev
2016-10-12 10:52                       ` Alexandr Bochkarev
2016-10-12 11:09                         ` Jaehoon Chung
2016-10-12 11:25                           ` Alexandr Bochkarev [this message]
2016-10-12 12:05                             ` Jaehoon Chung
2016-10-12 12:11                               ` Alexandr Bochkarev
2016-10-12 12:21                                 ` Jaehoon Chung
2016-10-12 12:42                                   ` Alexandr Bochkarev
2016-10-12 12:57                                     ` Alexandr Bochkarev
2016-10-12 13:11                                       ` Alexandr Bochkarev
2016-10-12 13:30                                         ` Jaehoon Chung
2016-10-12 14:03                                           ` Alexandr Bochkarev
2016-10-12 17:49                                             ` Alexandr Bochkarev
2016-10-13  1:11                                               ` Jaehoon Chung
2016-11-03 21:23                                               ` Alexandr Bochkarev
2016-11-03 21:39                                                 ` Alexandr Bochkarev
2016-11-04 22:57                                                   ` Alexandr Bochkarev
2016-11-05  8:18                                                     ` Hans de Goede
2016-11-05 10:58                                                       ` Alexandr Bochkarev
2016-10-13  1:12                                             ` Jaehoon Chung
2016-10-13  8:18                                               ` Alexandr Bochkarev
     [not found]                                                 ` <03f26ecf-c130-88d3-b3df-d7c6ed90ed48@samsung.com>
     [not found]                                                   ` <CB1DA1DA-F8C8-4F21-8201-F008E306FA72@gmail.com>
     [not found]                                                     ` <4b856cc3-68e4-371e-9f9e-df0264769843@samsung.com>
     [not found]                                                       ` <5191BB28-1F97-4B43-8048-85EDFCD52E64@gmail.com>
     [not found]                                                         ` <CGME20161102111524epcas3p1a851f9aeb4b21316065be54bb52b15d4@epcas3p1.samsung.com>
     [not found]                                                           ` <4A365F64-DFAF-477A-B844-6FE397773553@gmail.com>
     [not found]                                                             ` <b1ca97e7-9094-d7f7-d7a8-db3d5b8e9c75@samsung.com>
     [not found]                                                               ` <CAC2Q4vZM7_yhgtR0sd3N-w0ZeeOUQG5RgToz+oNhK5jnKSmcyw@mail.gmail.com>
     [not found]                                                                 ` <073f966f-29be-a35e-8f1c-9ef1c1f2bef7@samsung.com>
2016-11-03 10:10                                                                   ` Alexandr Bochkarev
2016-11-03 19:57                                                                     ` Alexandr Bochkarev
  -- strict thread matches above, loose matches on Subject: below --
2016-09-12 11:53 Ciprian Manea
2016-09-12 13:56 ` Maxime Ripard
2016-09-12 14:47   ` Hans de Goede
2016-09-13 11:50     ` Maxime Ripard
2016-09-14 10:05       ` Hans de Goede
2016-09-15 13:32         ` Maxime Ripard
2016-09-19 13:17         ` Maxime Ripard
2016-09-19 21:42           ` Hans de Goede
2016-09-19 23:10           ` Jaehoon Chung
2016-09-21 13:32             ` Maxime Ripard
2016-10-03  8:21             ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B102B1C-8BB0-43CA-93CD-82B029139648@gmail.com \
    --to=aneox.inbox@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.