cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
keshava7887
Observer
Observer
662 Views
Registered: ‎06-19-2020

QSPI boot

Jump to solution

Hi 

I am trying to boot my custom board based zynq-mpsoc zu4eg device  using QSPI mode,

I am Generating BOOT.BIN using below command.

petalinux-package --boot --fsbl images/linux/zynqmp_fsbl.elf --atf images/linux/bl31.elf --u-boot images/linux/u-boot.elf --fpga ssdtest.bit.

 

I am able to boot the board in jtag mode.

I have copied BOOT.bin to mtd partition using flashcp -v ./BOOT.BIN /dev/mtd0

I have copied image.ub to mtd partition using flashcp -v ./image /dev/mtd2

When I tried to boot board in  QSPI  mode, device stops at uboot with following error.

"Hit any key to stop autoboot: 0
SF: Detected mx66u2g45g with page size 256 Bytes, erase size 64 KiB, total 256 MiB
device 0 offset 0x3e80000, size 0x80000
SF: 524288 bytes @ 0x3e80000 Read: OK
## Executing script at 20000000
Wrong image format for "source" command
SCRIPT FAILED: continuing...
## Executing script at 20000000
Wrong image format for "source" command
SCRIPT FAILED: continuing...
No MMC device available
No MMC device available
SF: Detected mx66u2g45g with page size 256 Bytes, erase size 64 KiB, total 256 MiB
device 0 offset 0x3e80000, size 0x80000
SF: 524288 bytes @ 0x3e80000 Read: OK
## Executing script at 20000000
Wrong image format for "source" command
SCRIPT FAILED: continuing... "

Linux qspi memory partition. 

[ 3.300564] spi-nor spi0.0: mx66u2g45g (262144 Kbytes)
[ 3.305709] 3 fixed-partitions partitions found on MTD device spi0.0
[ 3.312052] Creating 3 MTD partitions on "spi0.0":
[ 3.316836] 0x000000000000-0x000000ec0000 : "boot"
[ 3.322323] 0x000000ec0000-0x000000f00000 : "bootenv"
[ 3.327969] 0x000000f00000-0x000005500000 : "kernel"

 I am loading my image.ub at different location in flash  but uboot script is looking for image.ub at different location. 

Can anyone guide me how to fix uboot to correctly read boot image.ub location and tell me if I am doing something wrong in generating binaries.

Or state out if I am missing any steps. 

I have tested my image.ub in same uboot by copying image.ub from vitis IDE XSCT command  using this command 'dow -data image.ub 0x10000000' then 'bootm 0x10000000' in uboot, linux boots with this settings. 

And also suggest me document which tell how to boot from QSPI for zcu106 board.  

 

Thanks 

Screenshot from 2020-09-24 12-00-13.png
Screenshot from 2020-09-24 12-29-45.png
0 Kudos
Reply
1 Solution

Accepted Solutions
patocarr
Teacher
Teacher
538 Views
Registered: ‎01-28-2008

Hi @keshava7887 

  You will need an extra partition in QSPI to hold the boot.scr script. I've posted about this in my blog U-Boot-changes-to-distro-boot for more details.

Thanks,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

View solution in original post

6 Replies
keshava7887
Observer
Observer
656 Views
Registered: ‎06-19-2020

I am using petalinux 2020.1 tools. 

0 Kudos
Reply
jrhtech
Explorer
Explorer
618 Views
Registered: ‎10-04-2017

In 2020 you also need to put the Uboot boot script, boot.scr, in the flash also.

jeff

0 Kudos
Reply
keshava7887
Observer
Observer
596 Views
Registered: ‎06-19-2020

Thanks jrhtech, 

Can you tell how to load and were to place boot.scr in the flash.  

0 Kudos
Reply
jrhtech
Explorer
Explorer
556 Views
Registered: ‎10-04-2017
Sorry for the delayed response; however, I do not know the specific answer. I boot from QSPI->eMCC and my eMCC just has a filesystem that I copy the boot.scr and image.ub onto. I know you need to write the files at a specific address that u-boot needs to read from but I'm not sure where you set that up.

jeff
0 Kudos
Reply
patocarr
Teacher
Teacher
539 Views
Registered: ‎01-28-2008

Hi @keshava7887 

  You will need an extra partition in QSPI to hold the boot.scr script. I've posted about this in my blog U-Boot-changes-to-distro-boot for more details.

Thanks,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

View solution in original post

keshava7887
Observer
Observer
482 Views
Registered: ‎06-19-2020

Hi Patocarr,

 

Thanks for your help.

 

Thanks 

Keshava murthy p 

0 Kudos
Reply