Open main menu

DAVE Developer's Wiki β

Changes

DESK-XZ7-L/Deployment/Standalone boot

6,211 bytes added, 07:49, 22 November 2022
Program the NOR flash
=== Program boot images into internal storage ===
==== Program the NOR flash ====
=====u-BootBOOT.BIN=====Update to the latest u-boot <code>BOOT.BIN</code> version: in the following example, the binary files are present in file is loaded from the SD card FAT32 first partition.''tftp server'':
<pre class="workstation-terminal">
Zynq> fatload mmc setenv boot_addr_r 0x1000000Zynq> tftpboot ${boot_addr_r} desk-xz7/BOOT.BINUsing ethernet@e000b000 deviceTFTP from server 192.168.0.23; our IP address is 192.168.0:1 0x10000000 .90Filename 'desk-xz7/BOOT.BIN'.Load address: 0x1000000Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# #################################################################22149396 bytes read in 1840 ms (11 ##################################### 1.5 9 MiB/sdoneBytes transferred = 22149396 (151f914 hex)
</pre>
then erase and program the <code>BOOT.BIN</code> binary image:
 
<pre class="workstation-terminal">
Zynq> sf probe; sf erase 0 2000000
SF: Detected s25fl256s1 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
SF: 33554432 bytes @ 0x0 Erased: OK
Zynq> sf write 0x10000000 ${boot_addr_r} 0 ${filesize}
device 0 offset 0x0, size 0x151f914
SF: 22149396 bytes @ 0x0 Written: OK
Zynq>
</pre>
 
<div class="mw-collapsible mw-collapsed">
=====fit image =====
<pre>loadk=tftpboot ${loadaddr} ${serverip}* program the FIT image on NOR flash with the following U-Boot commands:${bootfile}loadfdt=tftpboot ${fdtaddr} ${serverip}:${fdtfile}spi_updatek=sf erase 200000 800000; sf write ${loadaddr} 200000 ${filesize}spi_updatefdt=sf erase 180000 80000; sf write ${fdtaddr} 180000 ${filesize}spi_loadk=sf read ${loadaddr} 200000 800000spi_loadfdt=sf read ${fdtaddr} 180000 80000spi_nand=sf probe; run spi_loadk spi_loadfdt nandargs addcons addmisc; if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi</pre>
* Update the <codepre class="workstation-terminal">fit image</codeZynq> and <code>fdtfile<tftpboot ${kernel_addr_r} ${serverip}:desk-xz7/code> environment variables to fit the filename as found inside the image.ubUsing ethernet@e000b000 deviceTFTP from server192.168.0.23; our IP address is 192.168.0.90* Program kernel and device tree on NOR flash with the following UFilename 'desk-Boot commandxz7/image.ub'.Load address: 0x2000000Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ##################################### 670.9 KiB/sdone<pre classBytes transferred ="board-terminal"4847892 (49f914 hex)Zynq>sf probe; run loadk spi_updatek loadfdt spi_updatefdt
</pre>
E.g.* then erase and program the <code>image-ub</code> FIT image in NOR:
<pre class="workstation-terminal">
=Zynq> sf probe; run loadk spi_updatek loadfdt spi_updatefdtsf erase 1800000 800000; sf write ${kernel_addr_r} 1800000 ${filesize}SF: Detected s25fl256s1 with page size 256 Bytes, erase size 64 KiB, total 32 MiBdevice 0 offset 0x1000000, size 0x49f914SF: 4847892 bytes @ 0x1000000 Written: OKZynq>
</pre>
Reboot the system and * configure U-Boot to apply the new configuration:
<pre class="workstation-terminal">
=Zynq> setenv spi_nand 'sf probe; sf read ${kernel_addr_r} 1800000 800000; bootm ${kernel_addr_r}'Zynq> setenv bootcmd 'run spi_nand'=Zynq> saveenv
</pre>
 
</div>
==== Program root file system into NAND flash ====
8,256
edits