beautypg.com

Digilent Embedded Linux User Manual

Page 12

background image

Using Zynq with Linux

www.digilentinc.com

page 12 of 23

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

Example 9.


The sf subsystem allows U-Boot to load a system from SPI Flash. The functions sf subsystem
provides include probe, erase, read and write.

Probe will probe the FLASH device on the corresponding flash controller into the system (the
following codes probe the flash connected to QSPI0. (See Example 10.)

Example 10.


Erase will erase the data from FLASH memory. Example 11 erases 0x40000 bytes data starting from
address 0 in FLASH.

Example 11.


Read will read the data from FLASH memory into processor memory. Example 12 reads 0x2c0000
bytes of data from offset 0x100000 in Flash memory into 0x8000 in main memory.


Example 12.


Write will write the data to FLASH memory from processor memory. Example 13 writes 0x3E444
bytes of data from 0x8000000 in main memory into Flash memory with 0 offset.

Example 13.


Customize U-Boot Yourself


If you want to customize U-Boot, download the source files from the git repository u-boot-
digilent at

https://github.com/Digilent/u-boot-digilent

. (See Example 14.)


Example 14.


The settings of the board you have are located under include/configs/.h. For
example, the configure header file for the ZedBoard

is named “zynq_zed.h”.

zed-boot> fatload mmc 0 0x8000 zImage
reading zImage

2479640 bytes read
zed-boot>

zed-boot> sf probe 0
SF: Detected S25FL256S_4KB_64KB with page size 256, total 128 KiB
128 KiB S25FL256S_4KB_64KB at 0:0 is now current device

$git clone https://github.com/Digilent/u-boot-digilent

sf erase 0 0x40000

sf write 0x08000000 0 0x3E444

sf read 0x8000 0x100000 0x2c0000