75xx spiflash restore: Difference between revisions
From embeddedTS Manuals
No edit summary |
m (FTP links auto-updated (ftp://ftp.embeddedarm.com/ → https://files.embeddedarm.com/)) |
||
Line 1: | Line 1: | ||
This needs to be done directly on the SBC. You can find the latest SPI image [ | This needs to be done directly on the SBC. You can find the latest SPI image [https://files.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-images/4mb-spiflash-latest.dd.bz2 here]. Once downloaded you can decompress the image using bzip2: | ||
<source lang=bash> | <source lang=bash> | ||
bzip2 -d 4mb-spiflash-latest.dd.bz2 | bzip2 -d 4mb-spiflash-latest.dd.bz2 |
Revision as of 09:36, 12 January 2021
This needs to be done directly on the SBC. You can find the latest SPI image here. Once downloaded you can decompress the image using bzip2:
bzip2 -d 4mb-spiflash-latest.dd.bz2
Some of this series contains a 4MB SPIflash embedded on the board that can be written to by specifying lun 0, or "-l 0" which will use that chip select. The offboard flash found on various baseboards, or console boards like the TS-9448 or TS-9449 can be written to using lun 1, or "-l 1".
Backup
Backup the entire SPI flash containing the MBR, Kernel, and initrd
spiflashctl -l 1 -R 64 -z 65536 > spiflash.dd
Backup only the Kernel
spiflashctl -l 1 -R 4095 -z 512 -k part1 > /temp/zImage
Backup only the Initrd
spiflashctl -l 1 -R 32 -z 65536 -k part2 > /temp/initrd
Restore
Write the entire SPI flash containing the MBR, Kernel, and initrd
spiflashctl -l 1 -W 64 -z 65536 -i /path/to/4mb-spiflash-latest.dd
Write a new Kernel
spiflashctl -l 1 -W 4095 -z 512 -k part1 -i /temp/zImage
Write a new Initrd
spiflashctl -l 1 -W 32 -z 65536 -k part2 -i /temp/initrd