DESK-XZ7-L/Deployment/Restoring U-Boot on NOR flash

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2022/11/22 DESK-XZ7-L-1.0.0-rc1 release


Restoring U-Boot on SPI NOR flash[edit | edit source]

This article describes how to restore U-Boot on SPI NOR flash in case it gets corrupted or it is deleted accidentally.

Instructions[edit | edit source]

First of all, create a bootable microSD card as described here.

Then, boot the board with the microSD card and stop the automatic boot process of U-Boot in order to access the console.

U-Boot 2021.01 (Oct 12 2021 - 09:28:42 +0000)

CPU:   Zynq 7z020
Silicon: v3.1
DRAM:  ECC disabled 1 GiB
Flash: 0 Bytes
NAND:  0 MiB
MMC:   mmc@e0100000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Net:
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr -1, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot:  0
Zynq>

Programming U-Boot from ethernet[edit | edit source]

Properly define the ethernet configuration parameter:

Zynq> setenv ipaddr 192.168.0.90
Zynq> setenv serverip 192.168.0.23
  • download via TFTP the BOOT.BIN binary image. Then, burn them in NOR flash memory:
Zynq> setenv boot_addr_r 0x1000000
Zynq> tftpboot ${boot_addr_r} desk-xz7/BOOT.BIN
Using ethernet@e000b000 device
TFTP from server 192.168.0.23; our IP address is 192.168.0.90
Filename 'desk-xz7/BOOT.BIN'.
ERROR: reserving fdt memory region failed (addr=3e000000 size=1000000)
Load address: 0x1000000
Loading: #################################################################
...
...
#####################################
         1.7 MiB/s
done
Bytes transferred = 22149396 (151f914 hex)
Zynq>

Select the SPI NOR flash as boot device, remove the microSD card, and reset the board. The board should boot off the NOR flash as shown in the following image.

Zynq> reset
resetting ...

U-Boot 2021.01 (Oct 12 2021 - 09:28:42 +0000)

CPU:   Zynq 7z020
Silicon: v3.1
DRAM:  ECC disabled 1 GiB
Flash: 0 Bytes
NAND:  0 MiB
MMC:   mmc@e0100000: 0
Loading Environment from SPIFlash... SF: Detected s25fl256s1 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Net:
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr -1, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot:  0