Hello,
we are using NxpP2020RDB, Please can you attach Bootcommands for SPI_Flash.
what are parameters needed to configure for SPI_Flash kernel Boot-up
My U-Boot Log
sf probe 0
SF: Detected S25FL128P_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
printenv
baudrate=115200
bdev=sda1
bootcmd=setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtadr
bootdelay=10
bootfile=uImage
consoledev=ttyS0
ethact=eTSEC1
ethprime=eTSEC1
fdtaddr=c00000
hostname=unknown
hwconfig=usb1:dr_mode=host,phy_type=ulpi
jffs2nand=mtdblock9
jffs2nor=mtdblock3
loadaddr=1000000
map_lowernorbank=i2c dev 1; i2c mw 18 1 02 1; i2c mw 18 3 fd 1
map_uppernorbank=i2c dev 1; i2c mw 18 1 00 1; i2c mw 18 3 fd 1
nandboot=i2c dev 1; i2c mw 18 1 0xe8 1; i2c mw 18 3 0x03 1; reset
nandbootaddr=100000
nandfdtaddr=80000
netdev=eth0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdr
norboot=i2c dev 1; i2c mw 18 1 0xc8 1; i2c mw 18 3 0x03 1; reset
norbootaddr=ef080000
norfdtaddr=ef040000
pciboot=i2c dev 1; i2c mw 18 1 0xa8 1; i2c mw 18 3 0x03 1; reset
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr
ramdisk_size=120000
ramdiskaddr=2000000
ramdiskfile=rootfs.ext2.gz.uboot
rootpath=/opt/nfsroot
sdboot=i2c dev 1; i2c mw 18 1 0x68 1; i2c mw 18 3 0x03 1; reset
spiboot=i2c dev 1; i2c mw 18 1 0x28 1; i2c mw 18 3 0x03 1; reset
stderr=serial
stdin=serial
stdout=serial
tftpflash=tftpboot $loadaddr $uboot; protect off 0x11001000 +$filesize; erase 0x11001000 +$filesize; cp.b $loadaddr 0x11001000 $filesize; protect on 0x11001000 +$filesize; cmp.b $loadaddr 0x11001000 $filesize
uboot=u-boot.bin
Environment size: 1908/8188 bytes
Hello naresh puli,
Please refer to the following procedure to boot jffs2 filesystem from SPI flash.
In Linux please run the following command to get mtd block information
compare the "mtd.erasesize" with yocto "JFFS2_ERASEBLOCK" in the file meta-fsl-ppc/conf/machine/<platform>.conf and modify "JFFS2_ERASEBLOCK" according to "mtd.erasesize"
Under u-boot, please configure the following bootargs.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Yiping Wang,
i hope you are doing good.....
sorry for the late response
whatever i said i followed the same procedure but my spi flash can't get kernel image!
setenv bootargs 'root=/dev/mtd block14 rw rootfstype=jffs2 console=ttyS0,115200'
sf probe 0
sf read 0x1000000 0x00180000 0x404e56
sf read 0xc00000 0x00100000 0x3570
bootm 1000000 - c00000
Environment size: 1984/8188 bytes
=> setenv bootargs 'root=/dev/mtd block14 rw rootfstype=jffs2 console=ttyS0,115200'
=> sf probe 0
SF: Detected S25FL128P_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
=> sf read 0x1000000 0x00180000 0x404e56
SF: 4214358 bytes @ 0x180000 Read: OK
=> sf read 0xc00000 0x00100000 0x3570
SF: 13680 bytes @ 0x100000 Read: OK
=> bootm 1000000 - c00000
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-3.12.19-rt30-QorIQ-SDK-V1.
Created: 2016-10-26 5:50:59 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 4214294 Bytes = 4 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!