iMX6 fails to boot from SD card

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMX6 fails to boot from SD card

3,606 次查看
krisztianbakos
Contributor II

Hello,

I got stuck with iMX6 linux booting and would appreciate some help.

The problem seems to be around the SD card, but I'm not quite sure.

The setup is a custom board, which has an iMX6D (automotive @ 792 MHz)

u-boot env vars:

U-Boot > print

baudrate=115200

boot_fdt=try

bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=:,v3,tcp

bootcmd=mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboi

bootdelay=1

bootscript=echo Running bootscript from mmc ...; source

console=ttymxc0

ethact=FEC

ethprime=FEC

fdt_addr=0x11000000

fdt_file=imx6q-sabreauto.dtb

fdt_high=0xffffffff

filesize=b4dc

get_cmd=dhcp

initrd_high=0xffffffff

ip_dyn=yes

loadaddr=0x12000000

loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};

loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}

loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}

mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}

mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm ${loadaddr} -;

mmcdev=0

mmcpart=1

mmcroot=/dev/mmcblk0p1 rootwait rw

netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp

netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uima;

script=boot.scr

stderr=serial

stdin=serial

stdout=serial

uimage=uImage

update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} ${updi

Environment size: 2055/8188 bytes

Boot log:

U-Boot > ext2load mmc0 0 12000000 uImage

5051792 bytes read in 1057 ms (4.6 MiB/s)

U-Boot > ext2load mmc0 0 14000000 dtb.dtb

46300 bytes read in 211 ms (213.9 KiB/s)

U-Boot > bootm 12000000 - 14000000

## Booting kernel from Legacy Image at 12000000 ...

   Image Name:   Linux-3.10.17

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    5051728 Bytes = 4.8 MiB

   Load Address: 10800000

   Entry Point:  10800000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 14000000

   Booting using the fdt blob at 0x14000000

   Loading Kernel Image ... OK

   Using Device Tree in place at 14000000, end 1400e4db

Starting kernel ...

Booting Linux on physical CPU 0x0

Linux version 3.10.17 (root@cmis-ThinkPad-T410) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #29 SMP Thu Feb 265

CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Freescale i.MX6 Quad SABRE Smart Device Board

cma: CMA: reserved 256 MiB at 20000000

Memory policy: ECC disabled, Data cache writealloc

------------[ cut here ]------------

WARNING: at arch/arm/kernel/devtree.c:147 arm_dt_init_cpu_maps+0x138/0x1b0()

DT /cpu 3 nodes greater than max cores 2, capping them

Modules linked in:

CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.17 #29

[<80013910>] (unwind_backtrace+0x0/0xf4) from [<800114dc>] (show_stack+0x10/0x14)

[<800114dc>] (show_stack+0x10/0x14) from [<80025088>] (warn_slowpath_common+0x54/0x6c)

[<80025088>] (warn_slowpath_common+0x54/0x6c) from [<800250d0>] (warn_slowpath_fmt+0x30/0x40)

[<800250d0>] (warn_slowpath_fmt+0x30/0x40) from [<80bac9d0>] (arm_dt_init_cpu_maps+0x138/0x1b0)

[<80bac9d0>] (arm_dt_init_cpu_maps+0x138/0x1b0) from [<80babde0>] (setup_arch+0x648/0x6e4)

[<80babde0>] (setup_arch+0x648/0x6e4) from [<80ba8804>] (start_kernel+0x8c/0x330)

[<80ba8804>] (start_kernel+0x8c/0x330) from [<10008074>] (0x10008074)

---[ end trace 1b75b31a2719ed1c ]---

PERCPU: Embedded 8 pages/cpu @810ad000 s8704 r8192 d15872 u32768

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048

Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=:,v3,tcp

PID hash table entries: 2048 (order: 1, 8192 bytes)

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Memory: 512MB = 512MB total

Memory: 244036k/244036k available, 280252k reserved, 0K highmem

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    vmalloc : 0xa0800000 - 0xff000000   (1512 MB)

    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)

    modules : 0x7f000000 - 0x80000000   (  16 MB)

      .text : 0x80008000 - 0x80ba773c   (11902 kB)

      .init : 0x80ba8000 - 0x80bea200   ( 265 kB)

      .data : 0x80bec000 - 0x80c35d80   ( 296 kB)

       .bss : 0x80c35d80 - 0x80c97e1c   ( 393 kB)

SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1

Hierarchical RCU implementation.

NR_IRQS:16 nr_irqs:16 16

L310 cache controller enabled

l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x32070000, Cache size: 1048576 B

sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms

CPU identified as i.MX6Q, silicon rev 1.5

Console: colour dummy device 80x30

Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

Setting up static identity map for 0x805eaf48 - 0x805eafa0

CPU1: Booted secondary processor

CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

Brought up 2 CPUs

SMP: Total of 2 processors activated (3162.11 BogoMIPS).

CPU: All CPU(s) started in SVC mode.

devtmpfs: initialized

pinctrl core: initialized pinctrl subsystem

regulator-dummy: no parameters

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

Use WDOG2 as reset source

syscon 20c8000.anatop: regmap [mem 0x020c8000-0x020c8fff] registered

vdd1p1: 800 <--> 1375 mV at 1125 mV

vdd3p0: 2800 <--> 3150 mV at 3000 mV

vdd2p5: 2000 <--> 2750 mV at 2425 mV

cpu: 725 <--> 1450 mV at 1150 mV

vddpu: 725 <--> 1450 mV at 1150 mV

vddsoc: 725 <--> 1450 mV at 1200 mV

syscon 20e0000.iomuxc-gpr: regmap [mem 0x020e0000-0x020e0037] registered

syscon 21bc000.ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registered

hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

hw-breakpoint: maximum watchpoint size is 4 bytes.

imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver

bio: create slab <bio-0> at 0

mxs-dma 110000.dma-apbh: initialized

usb_otg_vbus: 5000 mV

usb_h1_vbus: 5000 mV

wm8962-supply: no parameters

mipi_dsi_pwr_on: no parameters

sensor-supply: 3300 mV

i2c-core: driver [max17135] using legacy suspend method

i2c-core: driver [max17135] using legacy resume method

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

i2c i2c-0: IMX I2C adapter registered

i2c i2c-1: IMX I2C adapter registered

i2c i2c-2: IMX I2C adapter registered

Linux video capture interface: v2.00

pps_core: LinuxPPS API ver. 1 registered

pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>

PTP clock support registered

imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 driver probed

mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 dphy version is 0x3130302a

MIPI CSI2 driver module loaded

Advanced Linux Sound Architecture Driver Initialized.

cfg80211: Calling CRDA to update world regulatory domain

Switching to clocksource mxc_timer1

NET: Registered protocol family 2

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 3, 32768 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

TCP: reno registered

UDP hash table entries: 256 (order: 1, 8192 bytes)

UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available

pureg-dummy: no parameters

imx6_busfreq busfreq.13: DDR medium rate not supported.

Bus freq driver module loaded

VFS: Disk quotas dquot_6.5.2

Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

NFS: Registering the id_resolver key type

Key type id_resolver registered

Key type id_legacy registered

jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.

fuse init (API version 7.22)

msgmni has been set to 988

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

imx-weim 21b8000.weim: WEIM driver registered.

mxc_mipi_dsi 21e0000.mipi: i.MX MIPI DSI driver probed

MIPI DSI driver module loaded

mxc_sdc_fb fb.26: register mxc display driver ldb

imx-ipuv3 2800000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)

Console: switching to colour frame buffer device 128x48

mxc_sdc_fb fb.27: register mxc display driver hdmi

mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1

fbcvt: 1920x1080@60: CVT Name - 2.073M9

mxc_sdc_fb fb.28: register mxc display driver lcd

mxc_sdc_fb fb.28: ipu0-di0 already in use

mxc_sdc_fb: probe of fb.28 failed with error -16

mxc_sdc_fb fb.29: register mxc display driver ldb

imx-sdma 20ec000.sdma: no iram assigned, using external mem

imx-sdma 20ec000.sdma: loaded firmware 1.1

imx-sdma 20ec000.sdma: initialized

pfuze100-regulator 1-0008: unrecognized pfuze chip ID!

pfuze100-regulator: probe of 1-0008 failed with error -5

Serial: IMX driver

2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX

console [ttymxc0] enabled

serial: Freescale lpuart driver

[drm] Initialized drm 1.1.0 20060810

[drm] Initialized vivante 1.0.0 20120216 on minor 0

brd: module loaded

loop: module loaded

ahci: SSS flag set, parallel bus scan disabled

ahci ahci: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode

ahci ahci: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst

scsi0 : ahci_platform

ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 71

SSFDC read-only Flash Translation layer

m25p80 spi32766.0: found mr25h256, expected m25p32

m25p80 spi32766.0: mr25h256 (32 Kbytes)

spi_imx 2008000.ecspi: probed

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

usbcore: registered new interface driver usb-storage

imx_usb 2184000.usb: usbmisc init failed, ret=-517

platform 2184000.usb: Driver imx_usb requests probe deferral

imx_usb 2184200.usb: usbmisc init failed, ret=-517

platform 2184200.usb: Driver imx_usb requests probe deferral

mousedev: PS/2 mouse device common for all mice

snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0

i2c /dev entries driver

mxc_v4l2_output v4l2_out.34: V4L2 device registered as video16

mxc_v4l2_output v4l2_out.34: V4L2 device registered as video17

mxc_v4l2_output v4l2_out.34: V4L2 device registered as video18

mxc_v4l2_output v4l2_out.34: V4L2 device registered as video19

mxc_v4l2_output v4l2_out.34: V4L2 device registered as video20

mag3110 2-000e: check mag3110 chip ID

ata1: SATA link down (SStatus 0 SControl 300)

mag3110 2-000e: read chip ID 0xffffff92 is not equal to 0xc4!

mag3110: probe of 2-000e failed with error -22

i2c-core: driver [mag3110] using legacy suspend method

i2c-core: driver [mag3110] using legacy resume method

mma8451 0-001c: read chip ID 0x1 is not equal to 0x1a or 0x2a!

mma8451: probe of 0-001c failed with error -22

cpuidle: using governor ladder

cpuidle: using governor menu

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

sdhci-pltfm: SDHCI platform and OF driver helper

mmc0: no vqmmc regulator found

mmc0: no vmmc regulator found

mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA

--------------------------------------------------------------------------------------------------------------------

Without the SDHC support in the kernel, it boots to the login prompt (with ramdisk loaded), but in that case, the stdin is not working, so I can not log in.

Best Regards,

Krisztian

0 项奖励
回复
2 回复数

1,543 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Krisztian

do you have PMIC on board (like pfuze100)

and had run on board DDR test (so new ddr parameters were updated

in mx6.cfg file) ?

https://community.freescale.com/docs/DOC-96412

Best regards

igor

0 项奖励
回复

1,543 次查看
krisztianbakos
Contributor II

Hello Igor,

Nope, but I solved the problem.

The main issue was the .dtb file generated, I had to modify the .dtsi file to use the correct CD and WP pins for the SD card slot (and also for the UART shell, but that's a different story).

After that, with a new .dtb file, it was running smooth.

Thank you anyways!

Best Regards,

Krisztián

0 项奖励
回复