AnsweredAssumed Answered

How do I boot a LS1021A-TWR from an SD card using the binaries generated by the 2.0 SDK?

Question asked by Thomas Thorne on Aug 22, 2016
Latest reply on Mar 15, 2017 by Muhammad Umair Khan

I have recently received a LS1021ATWR module and downloaded the QorIQ SDK V2.0 Yocto image of 2016-05-27 from the support pages.  I have installed the SDK and used it to generate an fsl-image-full for the ls1021atwr target.  When I try to boot from an SD card using these binaries the system seems to halt or freeze after the 'Starting kernel ...' message is displayed.  How should I be attempting to boot, using binaries generated from the SDK, loaded onto an SDHC card?

 

I can see a series of files (mostly symlinks) in my images directory:

~/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr$ ls tmp/deploy/images/ls1021atwr/

fsl-image-full-ls1021atwr-20160822111052.rootfs.manifest  u-boot-sdcard-qspi-2016.01+fslgit-r0.bin

fsl-image-full-ls1021atwr-20160822111052.rootfs.tar.gz    u-boot-sdcard-qspi.bin

fsl-image-full-ls1021atwr-20160822112706.rootfs.manifest  u-boot-secure-boot-2016.01+fslgit-r0.bin

fsl-image-full-ls1021atwr-20160822112706.rootfs.tar.gz    u-boot-secure-boot.bin

fsl-image-full-ls1021atwr.manifest                        uImage

fsl-image-full-ls1021atwr.tar.gz                          uImage--4.1-r0-ls1021atwr-20160815152334.bin

modules--4.1-r0-ls1021atwr-20160815152334.tgz             uImage--4.1-r0-ls1021a-twr-20160815152334.dtb

modules--4.1-r0-ls1021atwr-20160818140007.tgz             uImage--4.1-r0-ls1021atwr-20160818140007.bin

modules--4.1-r0-ls1021atwr-20160818142615.tgz             uImage--4.1-r0-ls1021a-twr-20160818140007.dtb

modules--4.1-r0-ls1021atwr-20160818145023.tgz             uImage--4.1-r0-ls1021atwr-20160818142615.bin

modules-ls1021atwr.tgz                                    uImage--4.1-r0-ls1021a-twr-20160818142615.dtb

README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt        uImage--4.1-r0-ls1021atwr-20160818145023.bin

u-boot.bin                                                uImage--4.1-r0-ls1021a-twr-20160818145023.dtb

u-boot-lpuart-2016.01+fslgit-r0.bin                       uImage-ls1021atwr.bin

u-boot-lpuart.bin                                         uImage-ls1021a-twr.dtb

u-boot-ls1021atwr.bin                                     zImage

u-boot-nor-2016.01+fslgit-r0.bin                          zImage--4.1-r0-ls1021atwr-20160815152334.bin

u-boot-nor.bin                                            zImage--4.1-r0-ls1021atwr-20160818140007.bin

u-boot-qspi-2016.01+fslgit-r0.bin                         zImage--4.1-r0-ls1021atwr-20160818142615.bin

u-boot-qspi.bin                                           zImage--4.1-r0-ls1021atwr-20160818145023.bin

u-boot-sdcard-ifc-2016.01+fslgit-r0.bin                   zImage-ls1021atwr.bin

u-boot-sdcard-ifc.bin

 

Following the instructions found in the QorIQ SDK 2.0 Documentation - Software Deployment Guides > Boardss > LS1024TWRA > Deployment > SD Deployment section I; formatted an SD card, created two partitions on it, extracted the root filesystem onto it, coped the uImage-ls1021atwr.bin to /boot/uImage and the uImage-ls1021a-twr.dtb to /boot/uImage.dtb.  Then I synch'ed and unmounted the SD card and placed it in the tower board.

 

I powered on the board and watched u-boot come up, interrupting it by pressing a key at the prompt.  As per the previously mentioned instructions I then updated a series of environment variables for u-boot:

# setenv bootfile uImage

# setenv fdtfile uImage.dtb

# setenv 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'

# save

To me they looked suitable for a two partition SD card.  The names match what has been put in place.  All should be as instructed. 

 

Why then do I not get any further than the "Starting kernel ..." message when I boot?  Are there any diagnostic steps I can undertake to try and work out where things have gone wonky?

 

The full boot message and environment variables follows:

Boot Output

U-Boot 2015.01+ls1+g3281947 (Jul 30 2015 - 20:01:52)

 

 

CPU:   Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)

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: 70000000 00007900 e0025a00 21046000

       00000020: 00000000 00000000 00000000 20000000

       00000030: 00080000 881b7340 00000000 00000000

Board: LS1021ATWR

CPLD:  V2.0

PCBA:  V1.0

VBank: 0

I2C:   ready

DRAM:  1 GiB

Using SERDES1 Protocol: 112 (0x70)

Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0

QE: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1

Flash: 128 MiB

MMC:   FSL_SDHC: 0

EEPROM: NXID v1

PCIe1: Root Complex no link, regs @ 0x3400000

PCIe2: Root Complex no link, regs @ 0x3500000

In:    serial

Out:   serial

Err:   serial

SEC0: RNG instantiated

SATA link 0 timeout.

AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl SATA mode

flags: 64bit ncq pm clo only pmp fbss pio slum part ccc

scanning bus for devices...

Found 0 device(s).

SCSI:  Net:   eTSEC2 is in sgmii mode.

eTSEC1, eTSEC2, eTSEC3 [PRIME]

Hit any key to stop autoboot:  0

=>

=>

=>

=> setenv bootfile uImage

=> setenv fdtfile uImage.dtb

=> setenv 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'

=> save

Saving Environment to Flash...

Un-Protected 1 sectors

Erasing Flash...

. done

Erased 1 sectors

Writing to Flash... 9....8....7....6....5....4....3....2....1....done

Protected 1 sectors

=> save

Saving Environment to Flash...

Un-Protected 1 sectors

Erasing Flash...

. done

Erased 1 sectors

Writing to Flash... 9....8....7....6....5....4....3....2....1....done

Protected 1 sectors

=> boot

Device: FSL_SDHC

Manufacturer ID: 89

OEM: 502

Name: NCard

Tran Speed: 50000000

Rd Block Len: 512

SD version 2.0

High Capacity: No

Capacity: 1.8 GiB

Bus Width: 4-bit

Erase Group Size: 512 Bytes

3511256 bytes read in 266 ms (12.6 MiB/s)

21610 bytes read in 99 ms (212.9 KiB/s)

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

   Image Name:   Linux-4.1.8-rt8+gbd51baf

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3511192 Bytes = 3.3 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 bef1b000, end bef23469 ... OK

 

 

Starting kernel ...

 

Environment Variables

=> printenv

baudrate=115200

bootargs=root=/dev/mmcblk0p1 rw rootdelay=5 console=,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

bootcmd_ori=cp.b 60300000 82000000 700000;cp.b 60a00000 88000000 2000000; cp.b 60200000 8f000000 10000;bootm 82000000 88000000 8f000000;

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

bootdelay=3

bootfile=uImage

dnsip=10.192.130.201

eth1addr=00:04:9f:03:e1:26

eth2addr=00:04:9f:03:e1:27

ethact=eTSEC3

ethaddr=00:04:9f:03:e1:25

ethprime=eTSEC3

fdt_high=0xcfffffff

fdtaddr=8f000000

fdtfile=uImage.dtb

gatewayip=10.193.20.254

initrd_high=0xcfffffff

ipaddr=10.193.20.191

loadaddr=82000000

netmask=255.255.255.0

scsidevs=0

serverip=10.192.208.233

stderr=serial

stdin=serial

stdout=serial

 

 

Environment size: 1085/131068 bytes

=>

Outcomes