75xx spiflash restore: Difference between revisions
From embeddedTS Manuals
(Created page with "This needs to be done directly on the SBC. You can find the latest SPI image [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-images/4mb-spiflash-latest.dd.bz2 he...") |
No edit summary |
||
Line 1: | Line 1: | ||
This needs to be done directly on the SBC. You can find the latest SPI image [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-images/4mb-spiflash-latest.dd.bz2 here]. | This needs to be done directly on the SBC. You can find the latest SPI image [ftp://ftp.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> | |||
bzip2 -d 4mb-spiflash-latest.dd.bz2 | |||
</source> | |||
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''' | ||
Backup the entire SPI flash containing the MBR, Kernel, and initrd | |||
<source lang=bash> | <source lang=bash> | ||
spiflashctl -l 1 -R 64 -z 65536 > spiflash.dd | spiflashctl -l 1 -R 64 -z 65536 > spiflash.dd | ||
</source> | </source> | ||
Kernel | Backup only the Kernel | ||
<source lang=bash> | <source lang=bash> | ||
spiflashctl -l 1 -R 4095 -z 512 -k part1 > /temp/zImage | spiflashctl -l 1 -R 4095 -z 512 -k part1 > /temp/zImage | ||
</source> | </source> | ||
Initrd | Backup only the Initrd | ||
<source lang=bash> | <source lang=bash> | ||
spiflashctl -l 1 -R 32 -z 65536 -k part2 > /temp/initrd | spiflashctl -l 1 -R 32 -z 65536 -k part2 > /temp/initrd | ||
Line 22: | Line 25: | ||
'''Restore''' | '''Restore''' | ||
Write the entire SPI flash containing the MBR, Kernel, and initrd | |||
<source lang=bash> | <source lang=bash> | ||
spiflashctl -l 1 -W 64 -z 65536 -i /path/to/4mb-spiflash-latest.dd | spiflashctl -l 1 -W 64 -z 65536 -i /path/to/4mb-spiflash-latest.dd | ||
</source> | </source> | ||
Kernel | Write a new Kernel | ||
<source lang=bash> | <source lang=bash> | ||
spiflashctl -l 1 -W 4095 -z 512 -k part1 -i /temp/zImage | spiflashctl -l 1 -W 4095 -z 512 -k part1 -i /temp/zImage | ||
</source> | </source> | ||
Initrd | Write a new Initrd | ||
<source lang=bash> | <source lang=bash> | ||
spiflashctl -l 1 -W 32 -z 65536 -k part2 -i /temp/initrd | spiflashctl -l 1 -W 32 -z 65536 -k part2 -i /temp/initrd | ||
</source> | </source> |
Revision as of 12:50, 29 August 2012
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