LS1021a SD card boot issues

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

LS1021a SD card boot issues

3,189 次查看
jtice
Contributor I

Hello,

I have an LS1021A-TWR that I'd like use to run Linux from an SD card, but I'm having trouble getting it to work. First, I tried using the QorIQ SDK 1.7 to build everything and flashed to an SD card, but when booting it has a kernel panic that appears very similar to this one. It appears the author of that post fixed his issue by using u-boot 2015.01, but after flashing both mainline 2015.01 and 2015.04, I can't seem to use the "ext2load" command anymore as it says "Unknown command 'ext2load' - try 'help' ". I don't have much experience with u-boot and embedded systems, so I'm not sure if there is some configuration required when building u-boot to enable ext2load or if there's another way I should be configuring u-boot to read the kernel and dtb files from the SD card. Any help is appreciated, thanks!

标签 (1)
0 项奖励
回复
7 回复数

2,081 次查看
addiyi
NXP Employee
NXP Employee

Why don't you use uboot image from SDK 1.8? ext2load is working fine on that.

Adrian

0 项奖励
回复

2,081 次查看
jtice
Contributor I

Hi Adrian,

I have actually tried using uboot from 1.8, but unfortunately that was even less successful for me. Like in 1.7, I changed the config to build uboot for an SD card and ran bitbake, but absolutely nothing shows up from the uart on minicom after flashing this image and connecting to power. Should the process for building or flashing uboot be any different from SDK 1.7 to 1.8?

0 项奖励
回复

2,081 次查看
addiyi
NXP Employee
NXP Employee

Attached you can find uboot built for sd boot from sdk 1.8. Also, make sure this image was written a correct address in sd-card. Below you can find two ways to write uboot on sd card:

from u-boot

$ tftp <address> /<path_to_uboot>/u-boot-sd.bin

$ mmc write <address> 8 0x400

or

from linux

$ sudo dd if=/<path_to_uboot>/u-boot-sd.bin of=/dev/mmcblk0 bs=512 seek=8 conv=notrunc oflag=sync

Adrian

0 项奖励
回复

2,081 次查看
jtice
Contributor I

Not sure what was wrong with the uboot I built with sdk 1.8, but the one you attached seems to boot with similar issues as with 1.7's uboot. After connecting to power, I see the following:

U-Boot 2014.07+ls1+g659b6a2 (Jan 27 2015 - 09:02:07)

CPU:   Freescale LayerScape LS1021E, Version: 1.0, (0x87081110)

Clock Configuration:

       CPU0(ARMV7):1000 MHz,

       Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate),

Reset Configuration Word (RCW):

       00000000: 0608000a 00000000 00000000 00000000

       00000010: 20000000 00407900 60025a00 21046000

       00000020: 00000000 00000000 00000000 01038000

       00000030: 20024800 881b1540 00000000 00000000

Board: LS1021ATWR

I2C:   ready

DRAM:  1 GiB

Using SERDES1 Protocol: 32 (0x20)

MMC:   FSL_SDHC: 0

In:    serial

Out:   serial

Err:   serial

Net:   eTSEC1 is in sgmii mode.

eTSEC2 is in sgmii mode.

eTSEC1 [PRIME], eTSEC2, eTSEC3

Hit any key to stop autoboot:  0

Device: FSL_SDHC

Manufacturer ID: 41

OEM: 3432

Name: SD4GB

Tran Speed: 50000000

Rd Block Len: 512

SD version 3.0

High Capacity: Yes

Capacity: 3.7 GiB

Bus Width: 4-bit

3079896 bytes read in 271 ms (10.8 MiB/s)

20683 bytes read in 142 ms (141.6 KiB/s)

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

   Image Name:   Linux-3.12.19-rt30+ls1+g6619b8b

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3079832 Bytes = 2.9 MiB

   Load Address: 80008000

   Entry Point:  80008000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 8f000000

   Booting using the fdt blob at 0x8f000000

   Loading Kernel Image ... OK

   Loading Device Tree to bef10000, end bef180ca ... OK

Starting kernel ...

Booting Linux on physical CPU 0xf00

Linux version 3.12.19-rt30+ls1+g6619b8b (******@ubuntu) (gcc version 4.8.3 20140401 (prerelease) (Linaro GCC 4.8-2014.04) ) #1 SMP Thu Jul 25

CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=70c73c7d

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

Machine: Freescale LS1021A, model: LS1021A TWR Board

Memory policy: ECC disabled, Data cache writealloc

PERCPU: Embedded 8 pages/cpu @80d49000 s8384 r8192 d16192 u32768

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

Kernel command line: root=/dev/mmcblk0p2 rw rootdelay=5 console=ttyS0,115200

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

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

Memory: 1034080K/1048576K available (3224K kernel code, 255K rwdata, 1460K rodata, 180K init, 196K bss, 14496K reserved, 0K highmem)

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    vmalloc : 0xc0800000 - 0xff000000   (1000 MB)

    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)

    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

    modules : 0x7f800000 - 0x7fe00000   (   6 MB)

      .text : 0x80008000 - 0x8049b244   (4685 kB)

      .init : 0x8049c000 - 0x804c90c0   ( 181 kB)

      .data : 0x804ca000 - 0x80509e60   ( 256 kB)

       .bss : 0x80509e68 - 0x8053b124   ( 197 kB)

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

Hierarchical RCU implementation.

        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

NR_IRQS:16 nr_irqs:16 16

Architected cp15 timer(s) running at 12.50MHz (phys).

Switching to timer-based delay loop

sched_clock: ARM arch timer >56 bits at 12500kHz, resolution 80ns

sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms

Console: colour dummy device 80x30

Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

CPU0: update cpu_power 1024

CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00

Setting up static identity map for 0x80304218 - 0x8030427c

CPU1: Booted secondary processor

CPU1: update cpu_power 1024

CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01

Brought up 2 CPUs

SMP: Total of 2 processors activated.

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

CPU: Virtualization extensions available.

devtmpfs: initialized

VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5

regulator-dummy: no parameters

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

cpuidle: using governor ladder

cpuidle: using governor menu

syscon 1570000.scfg: regmap [mem 0x01570000-0x0157ffff] registered

irq: no irq domain found for /soc/uqe@2400000/qeic@80 !

irq: no irq domain found for /soc/uqe@2400000/qeic@80 !

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

hw-breakpoint: maximum watchpoint size is 8 bytes.

bio: create slab <bio-0> at 0

3P3V: 3300 mV

vgaarb: loaded

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: of_i2c: modalias failure on /soc/i2c@21a0000/ltc2945@67

i2c i2c-2: IMX I2C adapter registered

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

fsl-ifc 1530000.ifc: Freescale Integrated Flash Controller

Advanced Linux Sound Architecture Driver Initialized.

Switched to clocksource arch_sys_counter

NET: Registered protocol family 2

TCP established hash table entries: 8192 (order: 4, 65536 bytes)

TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

TCP: Hash tables configured (established 8192 bind 8192)

TCP: reno registered

UDP hash table entries: 512 (order: 2, 16384 bytes)

UDP-Lite hash table entries: 512 (order: 2, 16384 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-A7 PMU driver, 5 counters available

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.

msgmni has been set to 2019

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

layerscape-pcie 3400000.pcie: phy link never came up

layerscape-pcie 3400000.pcie: PCI host bridge to bus 0000:00

pci_bus 0000:00: root bus resource [io  0x1000-0xffff]

pci_bus 0000:00: root bus resource [mem 0x4040000000-0x407fffffff] (bus address [0x40000000-0x7fffffff])

pci_bus 0000:00: root bus resource [bus 00-ff]

PCI: bus0: Fast back to back transfers disabled

PCI: bus1: Fast back to back transfers enabled

pci 0000:00:00.0: BAR 1: assigned [mem 0x4040000000-0x4043ffffff]

pci 0000:00:00.0: BAR 0: assigned [mem 0x4044000000-0x4044ffffff]

pci 0000:00:00.0: BAR 6: assigned [mem 0x4045000000-0x4045ffffff pref]

pci 0000:00:00.0: PCI bridge to [bus 01]

layerscape-pcie 3500000.pcie: phy link never came up

layerscape-pcie 3500000.pcie: PCI host bridge to bus 0001:00

pci_bus 0001:00: root bus resource [io  0x10000-0x1ffff] (bus address [0x0000-0xffff])

pci_bus 0001:00: root bus resource [mem 0x4840000000-0x487fffffff] (bus address [0x40000000-0x7fffffff])

pci_bus 0001:00: root bus resource [bus 00-ff]

PCI: bus0: Fast back to back transfers disabled

PCI: bus1: Fast back to back transfers enabled

pci 0001:00:00.0: BAR 1: assigned [mem 0x4840000000-0x4843ffffff]

pci 0001:00:00.0: BAR 0: assigned [mem 0x4844000000-0x4844ffffff]

pci 0001:00:00.0: BAR 6: assigned [mem 0x4845000000-0x4845ffffff pref]

pci 0001:00:00.0: PCI bridge to [bus 01]

sii902x: probe of 1-0039 failed with error -1

syscon 1570000.scfg: Failed to create debugfs directory

Console: switching to colour frame buffer device 60x34

fb0: fb device registered successfully.

fb1: fb device registered successfully.

fb2: fb device registered successfully.

fb3: fb device registered successfully.

Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

21c0500.serial: ttyS0 at MMIO 0x21c0500 (irq = 118, base_baud = 9375000) is a 16550A_FSL64

console [ttyS0] enabled

21c0600.serial: ttyS1 at MMIO 0x21c0600 (irq = 118, base_baud = 9375000) is a 16550A_FSL64

of_serial 2402200.ucc: clk or clock-frequency not defined

of_serial: probe of 2402200.ucc failed with error -2

serial: Freescale lpuart driver

2950000.serial: ttyLP0 at MMIO 0x2950000 (irq = 112, base_baud = 6250000) is a FSL_LPUART

brd: module loaded

loop: module loaded

fsl-ifc 1530000.ifc: transaction sent to IFC is not mapped to

fsl-ifc 1530000.ifc:  any memory bank 0x80000000

fsl-ifc 1530000.ifc: Write transaction error

fsl-ifc 1530000.ifc:  CM_ERATTR0 0x00000000

fsl-ifc 1530000.ifc: AXI ID of the erro

fsl-ifc 1530000.ifc:  transaction 0x00000000

fsl-ifc 1530000.ifc: SRC ID of the error

fsl-ifc 1530000.ifc:  transaction 0x00000000

fsl-ifc 1530000.ifc: Transaction Address corresponding to error

fsl-ifc 1530000.ifc:  ERADDR 0x60000000

fsl-ifc 1530000.ifc: transaction sent to IFC is not mapped to

fsl-ifc 1530000.ifc:  any memory bank 0x80000000

fsl-ifc 1530000.ifc: Write transaction error

fsl-ifc 1530000.ifc:  CM_ERATTR0 0x00000000

fsl-ifc 1530000.ifc: AXI ID of the erro

fsl-ifc 1530000.ifc:  transaction 0x00000000

fsl-ifc 1530000.ifc: SRC ID of the error

fsl-ifc 1530000.ifc:  transaction 0x00000000

fsl-ifc 1530000.ifc: Transaction Address corresponding to error

fsl-ifc 1530000.ifc:  ERADDR 0x600000AA

Unhandled fault: synchronous external abort (0x1210) at 0xc1000020

Internal error: : 1210 [#1] SMP THUMB2

Modules linked in:

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30+ls1+g6619b8b #1

task: bf87c000 ti: bf880000 task.ti: bf880000

PC is at cfi_qry_present+0x166/0x1e0

LR is at cfi_qry_present+0x27/0x1e0

pc : [<801cd660>]    lr : [<801cd521>]    psr: 60000133

sp : bf881cf0  ip : 00000006  fp : 00000001

r10: 00000001  r9 : 00000000  r8 : 00000002

r7 : 00000002  r6 : bf0226a0  r5 : 00005151  r4 : 00005900

r3 : 00005959  r2 : 00005252  r1 : 00000020  r0 : c1000020

Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment kernel

Control: 70c53c7d  Table: 80003000  DAC: fffffffd

Process swapper/0 (pid: 1, stack limit = 0xbf880248)

Stack: (0xbf881cf0 to 0xbf882000)

1ce0:                                     bf0226a0 00000000 bf881d64 00009898

1d00: 00000002 00009800 00000002 801cd85f 08000000 bf881d64 bf0226a0 00000000

1d20: 801cd235 00000001 804eb938 00000000 00000000 801cd269 bf0226a0 00000000

1d40: 00000002 bf0226a0 00000001 801cd235 00000001 804eb938 bf0226a0 801dab09

1d60: 00068000 00000000 00000000 00000002 00000001 00000000 00000000 00000000

1d80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

1da0: 00000713 804eb940 8041d1c9 bf0226a0 80d3fc10 bf805410 bf0226a0 bf0226a0

1dc0: 00000000 801dac87 801ccbe1 804eb940 8041d1c9 bf0226a0 80d3fc10 bf805410

1de0: 00000000 801ccbad bf0226d4 bf022690 bf805400 801db007 08000000 00000000

1e00: bf908380 00000000 bf023e40 00000000 00000000 bf023e80 60000000 00000000

1e20: 8041d1c9 00000000 bf023e40 00000001 00000000 00000000 bf023e40 bf908440

1e40: 60000000 00000000 67ffffff 00000000 80d3fc4c 00000200 00000000 00000000

1e60: 00000000 00000000 00000000 bf805410 bf805444 8052edd4 804ebb5c 804ad1f1

1e80: 000000ae 00000000 bf880000 801a1a49 bf805410 bf805444 804ebb5c 00000000

1ea0: 804ad1f1 801a1b7d 00000000 804ebb5c 801a1b49 801a0b05 bf85f65c bf907234

1ec0: 804ebb5c 804e9bf0 bf022600 801a1513 8041e453 8041e454 0000006f 804ebb5c

1ee0: 804bc058 804c6928 80509e80 801a1f05 00000000 00000006 804bc058 800085f3

1f00: bf901400 bf901680 00000000 bf901680 80309400 803f7d7b 00000000 800aeaed

1f20: 804d8908 00000113 8049c461 80d46ce3 80d46ceb 80028f21 00000000 804710c0

1f40: 00000000 000000ae 00000006 00000006 00000001 00000006 804bc058 804c6928

1f60: 80509e80 80509e80 000000ae 804bc064 00000000 8049c92d 00000006 00000006

1f80: 8049c461 00000000 00000000 802fa61d 00000000 00000000 00000000 00000000

1fa0: 00000000 802fa623 00000000 8000c1f9 00000000 00000000 00000000 00000000

1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000

[<801cd660>] (cfi_qry_present+0x166/0x1e0) from [<801cd85f>] (cfi_qry_mode_on+0x185/0xb5e)

[<801cd85f>] (cfi_qry_mode_on+0x185/0xb5e) from [<801cd269>] (cfi_probe_chip+0x35/0x128)

[<801cd269>] (cfi_probe_chip+0x35/0x128) from [<801dab09>] (genprobe_ident_chips+0x45/0x1b8)

[<801dab09>] (genprobe_ident_chips+0x45/0x1b8) from [<801dac87>] (mtd_do_chip_probe+0xb/0x7c)

[<801dac87>] (mtd_do_chip_probe+0xb/0x7c) from [<801ccbad>] (do_map_probe+0x31/0x40)

[<801ccbad>] (do_map_probe+0x31/0x40) from [<801db007>] (of_flash_probe+0x2ab/0x38c)

[<801db007>] (of_flash_probe+0x2ab/0x38c) from [<801a1a49>] (driver_probe_device+0x65/0x140)

[<801a1a49>] (driver_probe_device+0x65/0x140) from [<801a1b7d>] (__driver_attach+0x35/0x48)

[<801a1b7d>] (__driver_attach+0x35/0x48) from [<801a0b05>] (bus_for_each_dev+0x3b/0x46)

[<801a0b05>] (bus_for_each_dev+0x3b/0x46) from [<801a1513>] (bus_add_driver+0x8b/0x164)

[<801a1513>] (bus_add_driver+0x8b/0x164) from [<801a1f05>] (driver_register+0x4b/0x76)

[<801a1f05>] (driver_register+0x4b/0x76) from [<800085f3>] (do_one_initcall+0x63/0xd0)

[<800085f3>] (do_one_initcall+0x63/0xd0) from [<8049c92d>] (kernel_init_freeable+0xbd/0x150)

[<8049c92d>] (kernel_init_freeable+0xbd/0x150) from [<802fa623>] (kernel_init+0x7/0x90)

[<802fa623>] (kernel_init+0x7/0x90) from [<8000c1f9>] (ret_from_fork+0x11/0x38)

Code: e009 2f02 d103 4408 (8807) b2bf

---[ end trace 6b0edf2f16347540 ]---

fsl-ifc 1530000.ifc: transaction sent to IFC is not mapped to

fsl-ifc 1530000.ifc:  any memory bank 0x80000000

fsl-ifc 1530000.ifc: Read transaction error

fsl-ifc 1530000.ifc:  CM_ERATTR0 0x80B00000

fsl-ifc 1530000.ifc: AXI ID of the erro

fsl-ifc 1530000.ifc:  transaction 0x0000000B

fsl-ifc 1530000.ifc: SRC ID of the error

fsl-ifc 1530000.ifc:  transaction 0x00000000

fsl-ifc 1530000.ifc: Transaction Address corresponding to error

fsl-ifc 1530000.ifc:  ERADDR 0x60000020

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU1: stopping

CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D      3.12.19-rt30+ls1+g6619b8b #1

[<80010829>] (unwind_backtrace+0x1/0x88) from [<8000e51f>] (show_stack+0xb/0xc)

[<8000e51f>] (show_stack+0xb/0xc) from [<802fe8cd>] (dump_stack+0x4d/0x60)

[<802fe8cd>] (dump_stack+0x4d/0x60) from [<8000ff23>] (handle_IPI+0x7f/0xd0)

[<8000ff23>] (handle_IPI+0x7f/0xd0) from [<800083ef>] (gic_handle_irq+0x3b/0x44)

[<800083ef>] (gic_handle_irq+0x3b/0x44) from [<803018db>] (__irq_svc+0x3b/0x5c)

Exception stack(0xbf89bfa0 to 0xbf89bfe8)

bfa0: ffffffed 00000000 0088a000 00000000 bf89a000 bf89a010 80000000 8050a194

bfc0: 80003010 410fc075 00000000 00000000 00000008 bf89bfe8 8000cc01 8000cc02

bfe0: 60000133 ffffffff

[<803018db>] (__irq_svc+0x3b/0x5c) from [<8000cc02>] (arch_cpu_idle+0x1a/0x20)

[<8000cc02>] (arch_cpu_idle+0x1a/0x20) from [<8003b38d>] (cpu_startup_entry+0x7d/0xc4)

[<8003b38d>] (cpu_startup_entry+0x7d/0xc4) from [<80008485>] (__enable_mmu+0x1/0x1c)

0 项奖励
回复

2,081 次查看
addiyi
NXP Employee
NXP Employee

Could you please add also the uboot printenv output? Also, did you use uImage from sdk 1.8?

Adrian

0 项奖励
回复

2,081 次查看
jtice
Contributor I

Sure:

=> print

baudrate=115200

bootargs=root=/dev/mmcblk0p2 rw rootdelay=5 console=ttyS0,115200

bootcmd=setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=5 console=$consoledev,$baudrate;mmcinfo;ext2load mmc 0:2 $loadaddr /boot/$bootfile;ext2load mmc 0:2 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr

bootdelay=3

bootfile=uImage

consoledev=ttyS0

ethact=eTSEC1

ethprime=eTSEC1

fdt_high=0xcfffffff

fdtaddr=8f000000

fdtfile=ls1021a-twr.dtb

filesize=2efed8

initrd_high=0xcfffffff

loadaddr=82000000

stderr=serial

stdin=serial

stdout=serial

Environment size: 628/131068 bytes

Also, I've used the uImages from both sdk 1.7 and sdk 1.8 and had the same error messages. I've also used the actual file names for both the kernel and dtb instead of the symbolic link, but it seems to have no effect.

0 项奖励
回复

2,081 次查看
addiyi
NXP Employee
NXP Employee

I can confirm you that using images from SDK 1.8, sdcard boot works fine. Check the sd to be coretly formatted and in bootargs make sure partition is available on sd (/dev/mmcblk0p2).

Adrian

0 项奖励
回复