您尚未登录。

楼主 #1 2019-04-15 17:59:43

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

TF卡启动报错 mmc init failed with error: -110

我的sun8i.h的设置文件是下面设置的  求大神看看啊
#define CONFIG_BOOTCOMMAND   "setenv bootm_boot_mode sec; " \
                            "load mmc 0:1 0x41000000 zImage; "  \
                            "load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
                            "bootz 0x41000000 - 0x41800000;"
#define CONFIG_BOOTARGS      "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0"

离线

#2 2019-04-15 18:04:57

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

这块板子,这张卡烧我做的固件正常?





离线

楼主 #3 2019-04-15 18:17:05

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

这块板子,这张卡烧我做的固件正常?

这个卡是烧的我自己的固件   

另外一张卡烧的你固件打印信息如下

U-Boot SPL 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
4016104 bytes read in 641 ms (6 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
** Unable to read file sun8i-v3s-licheepi-zero-dock.dtb **
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
=>

离线

楼主 #4 2019-04-15 18:23:58

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

换了一张卡后打印的信息又不一样了

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 02:37:00)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 02:37:00 -0700) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###

离线

#5 2019-04-15 18:28:15

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

用三楼那张卡烧你自己的固件试一试





离线

#6 2019-04-15 18:59:37

雷龙发展q2852826868
会员
所在地: 深圳
注册时间: 2018-12-10
已发帖子: 157
积分: 157
个人网站

Re: TF卡启动报错 mmc init failed with error: -110

贴片式T卡  来顶一顶。支持一下






CS品牌SD NAND , ATO 小容量SLC/SPI NAND/MCP. T:13691982107,Q:2852826868

离线

楼主 #7 2019-04-15 20:16:55

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

用三楼那张卡烧你自己的固件试一试


都是一样的效果  没有什么区别

离线

楼主 #8 2019-04-16 08:57:22

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

我现在重新clone一个uboot 直接编译玩后下载后  就是同一样的结果

离线

#9 2019-04-16 09:16:21

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

无情一刀 说:

我现在重新clone一个uboot 直接编译玩后下载后  就是同一样的结果

修改 drivers/mmc/sunxi_mmc.c

return mmc_set_mod_clk(mmchost, 24000000); //24Mhz

改为:

return mmc_set_mod_clk(mmchost, 2000000); //2Mhz

试一试





离线

#10 2019-04-16 09:18:07

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

再不行就加上这个: https://whycan.cn/t_2050.html#p14059

int spl_mmc_load_image(struct spl_image_info *spl_image,
                       struct spl_boot_device *bootdev)
{
        struct mmc *mmc = NULL;
        u32 boot_mode;
        int err = 0;
        __maybe_unused int part;

        err = spl_mmc_find_device(&mmc, bootdev->boot_device);
        if (err)
                return err;

        int try_count = 0;

        do
        {
                err = mmc_init(mmc);

                if (err) 
                {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
                     printf("spl: mmc init failed with error: %d\n", err);
#endif
                     try_count++;

                     if(try_count > 10)
                     {
                             return err;
                     }
                }
        else
        {
                break;
        }

        }while(1);




离线

楼主 #11 2019-04-16 09:45:38

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

还是很难起来 我现在在uboot是 不是昨天下载的
设置时钟为2的时候打印是下面的信息

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 18:25:24)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 18:25:24 -0700) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###

然后代码也改了后是打印下面

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 18:37:28)
DRAM: 64 MiB
Trying to boot from MMC1

离线

#12 2019-04-16 09:56:16

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

看上面的 log 降低 MMC 的频率, spl & u-boot 都跑起来了.

再把 u-boot 里面的 DRAM 和 CPU 频率都降下来。

可以直接修改 .config 文件

DRAM 166M
CPU    800M





离线

楼主 #13 2019-04-16 11:06:04

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

看上面的 log 降低 MMC 的频率, spl & u-boot 都跑起来了.

再把 u-boot 里面的 DRAM 和 CPU 频率都降下来。

可以直接修改 .config 文件

DRAM 166M
CPU    800M

就是配置这样两个是吧??
CONFIG_DRAM_CLK=166
CONFIG_SYS_CLK_FREQ=838860800

离线

#14 2019-04-16 11:09:31

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

CONFIG_DRAM_CLK=166
CONFIG_SYS_CLK_FREQ=800000000

试一试这样.





离线

楼主 #15 2019-04-16 11:19:29

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

CONFIG_DRAM_CLK=166
CONFIG_SYS_CLK_FREQ=800000000

试一试这样.

无语了  还是这样

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:13:26)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:13:26 -0700) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
### ERROR ### Please RESET the board ###

离线

#16 2019-04-16 11:29:14

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

这有点尴尬,烧我的固件不会酱紫?





离线

楼主 #17 2019-04-16 11:31:55

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

这有点尴尬,烧我的固件不会酱紫?


我都按照上面的修改了

U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:25:02)
DRAM: 64 MiB
Trying to boot from MMC1
就那个代码里面一直在读取了

离线

楼主 #18 2019-04-16 11:39:06

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

这有点尴尬,烧我的固件不会酱紫?



下载你的没有问题

离线

#19 2019-04-16 12:14:30

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

无情一刀 说:
晕哥 说:

这有点尴尬,烧我的固件不会酱紫?



下载你的没有问题

那单独烧我固件的 uboot 试一试?





离线

楼主 #20 2019-04-16 12:33:22

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:
无情一刀 说:
晕哥 说:

这有点尴尬,烧我的固件不会酱紫?



下载你的没有问题

那单独烧我固件的 uboot 试一试?


好的 下午试试
我刚才烧写刚下载的uboot 打印的信息是下面  这个新的uboot 我就修改了DRAM和CU时钟 

U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 15 2019 - 20:56:13 -0700) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: c2, 20, 18
*** Warning - spi_flash_probe() failed, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /sun8i-v3s-licheepi-zero.dtb
11872 bytes read in 25 ms (462.9 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile

离线

#21 2019-04-16 12:44:22

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

上面这个 uboot 启动了,应该是可以进入命令行状态吧





离线

楼主 #22 2019-04-16 13:37:41

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:
无情一刀 说:
晕哥 说:

这有点尴尬,烧我的固件不会酱紫?



下载你的没有问题

那单独烧我固件的 uboot 试一试?



U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 15 2017 - 14:00:51 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
** Unable to read file zImage **
reading sun8i-v3s-licheepi-zero-dock.dtb
12545 bytes read in 27 ms (453.1 KiB/s)
=>

离线

#23 2019-04-16 13:41:48

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

那可以你在这个基础上改吧.





离线

楼主 #24 2019-04-16 15:28:49

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

晕哥 说:

那可以你在这个基础上改吧.


下载新uboot 烧写进去了uboot是起来 就是一直这样了
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Apr 16 2019 - 00:23:47 -0700) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /sun8i-v3s-licheepi-zero.dtb
11868 bytes read in 25 ms (462.9 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
BOOTP broadcast 1
DHCP client bound to address 192.168.0.168 (4 ms)
*** Warning: no boot file name; using 'C0A800A8.img'
Using ethernet@1c30000 device
TFTP from server 192.168.1.1; our IP address is 192.168.0.168
Filename 'C0A800A8.img'.
Load address: 0x41000000
Loading: T T

离线

#25 2019-04-16 15:30:34

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110





离线

楼主 #26 2019-04-16 15:36:24

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

步骤没有错的 git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental

离线

#27 2019-04-16 15:39:58

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,234
积分: 9197

Re: TF卡启动报错 mmc init failed with error: -110

无情一刀 说:

步骤没有错的 git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental

第一个分区缺 sun8i-v3s-licheepi-zero.dtb, zImage 文件?





离线

楼主 #28 2019-04-17 12:03:00

无情一刀
会员
注册时间: 2018-09-04
已发帖子: 694
积分: 685

Re: TF卡启动报错 mmc init failed with error: -110

至今没有找到答案 虽然可以跑起来了
我昨天是从新下载了一个uboot带spi  然后在sun8i.h里面设置了TF启动  后面就直接烧写TF卡中  就起来了 ,
我不知道是不是uboot直接cp过来原因的

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn