Wind River Support Network

HomeDefectsLIN6-8399
Fixed

LIN6-8399 : When executing bootm for QSPI flash boot in uboot, show "can't get kernel image"

Created: Sep 10, 2014    Updated: Dec 3, 2018
Resolved Date: Sep 17, 2014
Found In Version: 6.0
Fix Version: 6.0.0.12
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: BSP - Async

Description

Boot target from QSPI flash, 

1). Build
/wrlinux-x/wrlinux/configure --enable-board=xilinx-zynq --enable-kernel=preempt-rt --enable-rootfs=glibc-std --enable-test=yes --with-layer=/wr-testing/kts-test,/lpg-build/cdc/xdong/wr-testing/bts,/wr-testing/ltp --with-template=feature/kts-basic,feature/kts-extended,feature/kts-rt --enable-parallel-pkgbuilds=16 --enable-jobs=16  --enable-reconfig && make fs

2). Check uboot version
boot.bin in SD
root@xxxx-d1:/media/2AF3-5CC2# md5sum boot.bin
39c7187434680d4704d9edaa30f3324d  boot.bin

boot.bin in Git tree
xxxx@pek-lpgtest13:/buildarea2/x_rt_std_bts_new/export$ md5sum ../layers/wr-bsps/xilinx-zynq/bootloader/boot_mini-itx.bin 
39c7187434680d4704d9edaa30f3324d  ../layers/wr-bsps/xilinx-zynq/bootloader/boot_mini-itx.bin

3). Logs
Hit any key to stop autoboot:  0 
zynq-uboot >
zynq-uboot >
zynq-uboot >
zynq-uboot >mmcinfo
Device: zynq_sdhci
Manufacturer ID: 82
OEM: 4a54
Name: SD16G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 4-bit
zynq-uboot >
zynq-uboot >
zynq-uboot >
zynq-uboot >
zynq-uboot >
zynq-uboot >
zynq-uboot >fatload mmc 0 0x100000 boot.bin
reading boot.bin
13765484 bytes read in 1166 ms (11.3 MiB/s)
zynq-uboot >sf probe 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
zynq-uboot >sf erase 0 0x1000000
SF: 16777216 bytes @ 0x0 Erased: OK
zynq-uboot >sf write 0x100000 0 ${filesize}
SF: 13765484 bytes @ 0x0 Written: OK
zynq-uboot >fatload mmc 0 0x2a00000 devicetree.dtb
reading devicetree.dtb
9582 bytes read in 17 ms (549.8 KiB/s)
zynq-uboot >sf probe 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
zynq-uboot >sf erase 0x1600000 0x100000
SF: 1048576 bytes @ 0x1600000 Erased: OK
zynq-uboot >sf write 0x2a00000 0x1600000 ${filesize}
SF: 9582 bytes @ 0x1600000 Written: OK
zynq-uboot >fatload mmc 0 0x3000000 uImageSD
reading uImageSD
4882816 bytes read in 425 ms (11 MiB/s)
zynq-uboot >sf probe 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
zynq-uboot >sf erase 0x1100000 0x500000
SF: 5242880 bytes @ 0x1100000 Erased: OK
zynq-uboot >sf write 0x3000000 0x1100000 ${filesize}
SF: 4882816 bytes @ 0x1100000 Written: OK
zynq-uboot >  

U-Boot 2014.01-dirty (Jun 24 2014 - 17:14:01)

I2C:   ready
Memory: ECC disabled
DRAM:  1 GiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
Hit any key to stop autoboot:  0 
zynq-uboot >sf probe 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
zynq-uboot >sf read 0x2a00000 0x1600000 0x100000
SF: 1048576 bytes @ 0x1600000 Read: OK
zynq-uboot >sf read 0x3000000 0x1100000 0x500000
SF: 5242880 bytes @ 0x1100000 Read: OK
zynq-uboot >bootm 0x3000000 - 0x2a00000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
zynq-uboot >

Steps to Reproduce

1). Save bootloader image to the bootloader partitions in uboot enviroment
fatload mmc 0 0x100000 boot.bin
sf probe 0
sf erase 0 0x1000000
sf write 0x100000 0 ${filesize}

2). Update DTB to support to boot from QSPI flash
fatload mmc 0 0x2a00000 devicetree.dtb
sf probe 0
sf erase 0x1600000 0x100000
sf write 0x2a00000 0x1600000 ${filesize}

3). Update uImage to support to boot from QSPI flash
fatload mmc 0 0x3000000 uImageSD
sf probe 0
sf erase 0x1100000 0x500000
sf write 0x3000000 0x1100000 ${filesize}

4). Reset target

5). Read deb from QSPI
sf probe 0
sf read 0x2a00000 0x1600000 0x100000

6). Read kernel from QSPI
sf read 0x3000000 0x1100000 0x500000

7). Boot target
bootm 0x3000000 - 0x2a00000

Other Downloads


Live chat
Online