Skip to content

Repair broken SPI flash images from U Boot

Tomas Hlavacek edited this page Apr 7, 2022 · 8 revisions

This is outdated (04/2022). Please refer to the U-Boot update procedure in the official Turris web and/or to the home Wiki page.

Omnia

Stop U-Boot to prompt and run the following (assuming we want to update the rescue image and we have the image on USB flash disk in path usr/share/rescue-image/image.fit.lzma).

=> usb start
=> load usb 0 $kernel_addr_r usr/share/rescue-image/image.fit.lzma
6152382 bytes read in 477 ms (12.3 MiB/s)
=> sf probe
SF: Detected mx25l6405d with page size 256 Bytes, erase size 4 KiB, total 8 MiB
=> sf update $kernel_addr_r 0x100000 ${filesize}
device 0 offset 0x100000, size 0x5de0be

To repair U-Boot start from serial (using the official guide) and run:

=> usb start
=> load usb 0 $kernel_addr_r usr/share/omnia/uboot-devel
784988 bytes read in 121 ms (6.2 MiB/s)
=> sf probe
SF: Detected mx25l6405d with page size 256 Bytes, erase size 4 KiB, total 8 MiB
=> sf update $kernel_addr_r 0x0 ${filesize}
760412 bytes written, 24576 bytes skipped in 8.189s, speed 98123 B/s