cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
heshsham
Adventurer
Adventurer
3,484 Views
Registered: ‎05-01-2012

Which is better for QSPI flash programing: Program Flash Option (In xilinx Tools ) OR using xmd Uboot

I got .BIF file by following the link:

 

http://www.wiki.xilinx.com/Zc702+Boot+From+Flash

 

And I also got out.bin. 

 

Now I have to program the QSPI flash.

Instead of doing this using xmd command console (as explained in the above link) I am using menu  Xilinx Tools/Program Flash option. I connected the JTAG cable and programmed the Falsh.  But this required /mcs file 

 

So to get .mcs file I used this command:

 

bootgen –image myDesign.bif –o i myDesignImage.mcs

to get the .MCS file. 

 

I got the initmation that the the flash is programmed succesfully. 

 

 I want to know is there  are any issue if I program the QSPIFlash as above instead of what is given in the link : 

 

http://www.wiki.xilinx.com/Zc702+Boot+From+Flash

 

 

Programming QSPI from U-boot

You need to have a connection through JTAG, to download your binaries to the target and a UART console to interact with u-boot. Connect your hardware as specified in Hardware setup section.

NOTE 2:
The file ps7_init.tcl file is used to initialize the ZC702 board’s DDR ram. It can be found at
C:\Xilinx\14.1\ISE_DS\EDK\sw\lib\hwplatform_templates\ZC702_hw_platform\ ps7_init.tcl
For your Hardware design this file would be generated when you export your hardware to SDK.

From XMD:

xmd% connect arm hw
xmd% source ps7_init.tcl
xmd% ps7_init
xmd% dow -data qspi_image.bin 0x08000000
xmd% dow u-boot.elf
xmd% con


After this command observe u-boot prints in the serial terminal.

From U-boot:

pele-boot> sf probe 0 0 0
pele-boot> sf erase 0 0x01000000
pele-boot> sf write 0x08000000 0 0x00FFFFFF

 I am asking this because my kernel hangs at  "starting kernel"

 

[Thu Feb 27 14:30:19.524 2014]  
[Thu Feb 27 14:30:19.524 2014]  
[Thu Feb 27 14:30:19.524 2014] U-Boot 2013.07 (Feb 24 2014 - 18:12:48)
[Thu Feb 27 14:30:19.524 2014]  
[Thu Feb 27 14:30:19.524 2014] Memory: ECC disabled
[Thu Feb 27 14:30:19.524 2014] DRAM:  1 GiB
[Thu Feb 27 14:30:19.541 2014] MMC:   zynq_sdhci: 0
[Thu Feb 27 14:30:19.541 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB
[Thu Feb 27 14:30:19.568 2014] *** Warning - bad CRC, using default environment
[Thu Feb 27 14:30:19.568 2014]  
[Thu Feb 27 14:30:19.568 2014] In:    serial
[Thu Feb 27 14:30:19.568 2014] Out:   serial
[Thu Feb 27 14:30:19.568 2014] Err:   serial
[Thu Feb 27 14:30:19.568 2014] U-BOOT for Xilinx-ZC702-14.7
[Thu Feb 27 14:30:19.568 2014]  
[Thu Feb 27 14:30:19.568 2014]  
[Thu Feb 27 14:30:19.568 2014] boot Petalinux
[Thu Feb 27 14:30:19.674 2014] Device: zynq_sdhci
[Thu Feb 27 14:30:19.674 2014] Manufacturer ID: 2
[Thu Feb 27 14:30:19.674 2014] OEM: 544d
[Thu Feb 27 14:30:19.674 2014] Name: SA04G  
[Thu Feb 27 14:30:19.674 2014] Tran Speed: 50000000
[Thu Feb 27 14:30:19.674 2014] Rd Block Len: 512
[Thu Feb 27 14:30:19.674 2014] SD version 3.0
[Thu Feb 27 14:30:19.674 2014] High Capacity: Yes
[Thu Feb 27 14:30:19.674 2014] Capacity: 3.7 GiB
[Thu Feb 27 14:30:19.674 2014] Bus Width: 4-bit
[Thu Feb 27 14:30:19.674 2014] reading image.ub
[Thu Feb 27 14:30:20.057 2014] 3810980 bytes read in 337 ms (10.8 MiB/s)
[Thu Feb 27 14:30:20.057 2014] ## Loading kernel from FIT Image at 01000000 ...
[Thu Feb 27 14:30:20.057 2014]    Using 'conf@1' configuration
[Thu Feb 27 14:30:20.057 2014]    Trying 'kernel@1' kernel subimage
[Thu Feb 27 14:30:20.057 2014]      Description:  PetaLinux Kernel
[Thu Feb 27 14:30:20.057 2014]      Type:         Kernel Image
[Thu Feb 27 14:30:20.057 2014]      Compression:  gzip compressed
[Thu Feb 27 14:30:20.057 2014]      Data Start:   0x010000f0
[Thu Feb 27 14:30:20.057 2014]      Data Size:    3798517 Bytes = 3.6 MiB
[Thu Feb 27 14:30:20.057 2014]      Architecture: ARM
[Thu Feb 27 14:30:20.057 2014]      OS:           Linux
[Thu Feb 27 14:30:20.057 2014]      Load Address: 0x00008000
[Thu Feb 27 14:30:20.057 2014]      Entry Point:  0x00008000
[Thu Feb 27 14:30:20.057 2014]    Verifying Hash Integrity ... OK
[Thu Feb 27 14:30:20.057 2014] ## Loading fdt from FIT Image at 01000000 ...
[Thu Feb 27 14:30:20.102 2014]    Using 'conf@1' configuration
[Thu Feb 27 14:30:20.102 2014]    Trying 'fdt@1' fdt subimage
[Thu Feb 27 14:30:20.102 2014]      Description:  Flattened Device Tree blob
[Thu Feb 27 14:30:20.102 2014]      Type:         Flat Device Tree
[Thu Feb 27 14:30:20.102 2014]      Compression:  uncompressed
[Thu Feb 27 14:30:20.102 2014]      Data Start:   0x0139f798
[Thu Feb 27 14:30:20.102 2014]      Data Size:    11161 Bytes = 10.9 KiB
[Thu Feb 27 14:30:20.102 2014]      Architecture: ARM
[Thu Feb 27 14:30:20.102 2014]      Hash algo:    crc32
[Thu Feb 27 14:30:20.102 2014]      Hash value:   2bc1f2b1
[Thu Feb 27 14:30:20.102 2014]      Hash algo:    sha1
[Thu Feb 27 14:30:20.102 2014]      Hash value:   8f6945b1cfac1e2e978b1d61b9884419e61cc6f3
[Thu Feb 27 14:30:20.102 2014]    Verifying Hash Integrity ... crc32+ sha1+ OK
[Thu Feb 27 14:30:20.102 2014]    Booting using the fdt blob at 0x139f798
[Thu Feb 27 14:30:20.110 2014]    Uncompressing Kernel Image ... OK
[Thu Feb 27 14:30:20.425 2014]    Loading Device Tree to 07ffa000, end 07fffb98 ... OK
[Thu Feb 27 14:30:20.425 2014]  
[Thu Feb 27 14:30:20.425 2014] Starting kernel ...
[Thu Feb 27 14:30:20.425 2014] 

 

 

0 Kudos
2 Replies
heshsham
Adventurer
Adventurer
3,472 Views
Registered: ‎05-01-2012

Also this is the content of my BIF file:

 

 the_ROM_image:
{
[bootloader]/home/acme/Downloads/ug873-design-files/zynq_fsbl_0.elf
[offset = 0x80000]/home/acme/Downloads/ug873-design-files/u-boot.elf
[offset = 0x100000]/home/acme/Downloads/ug873-design-files/zImage.bin
[offset = 0x600000]/home/acme/Downloads/ug873-design-files/devicetree.dtb
[offset = 0x800000]/home/acme/Downloads/ug873-design-files/uramdisk.image.gz
}

 

 

 

0 Kudos
heshsham
Adventurer
Adventurer
3,467 Views
Registered: ‎05-01-2012

I can also see in the log that the in the begining the size to be read is 3810980 bytes, while actual Data Size: 3798517 Bytes = 3.6 MiB . Why it is different ? 

0 Kudos