From 006e4a70ffd7fa5eec27a3d4d5ff195bedb600bb Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Thu, 3 Aug 2017 16:46:33 +0200 Subject: [PATCH] user-doc: add spispeed=2M --- user-doc/user-doc.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user-doc/user-doc.tex b/user-doc/user-doc.tex index 0105cc8..d3c218d 100644 --- a/user-doc/user-doc.tex +++ b/user-doc/user-doc.tex @@ -180,7 +180,7 @@ To speed up the process of writing these images, we have to disable parsing the Furthermore, to maintain an optimal stability, an SPI speed of no more than 2 MHz is recommended when using the BusPirate v3.6a: \begin{minted}{text} -./flashrom --programmer=buspirate_spi:dev=/dev/buspirate -l layout.txt -i uboot:u-boot.bin linux:bzImage initramfs:initramfs.cpio.gz -w --ignore-fmap --fast-verify +./flashrom --programmer=buspirate_spi:spispeed=2M,dev=/dev/buspirate -l layout.txt -i uboot:u-boot.bin linux:bzImage initramfs:initramfs.cpio.gz -w --ignore-fmap --fast-verify \end{minted} Now that the images have been written to their respective regions, we can look at the write-protect ranges supported by the chip: @@ -211,14 +211,14 @@ Since we don't want our images to be tampered with, we want to enable write-prot We can configure the write-protected range as follows: \begin{minted}{text} -./flashrom --programmer=buspirate_spi:dev=/dev/buspirate --wp-range 0x000000 0x800000 +./flashrom --programmer=buspirate_spi:spispeed=2M,dev=/dev/buspirate --wp-range 0x000000 0x800000 \end{minted} After setting the range, we are still able to modify the contents of the entire SPI NOR flash chip. To protect the range, we have to enable write protection as follows: \begin{minted}{text} -./flashrom --programmer=buspirate_spi:dev=/dev/buspirate --wp-enable +./flashrom --programmer=buspirate_spi:spispeed=2M,dev=/dev/buspirate --wp-enable \end{minted} Upon enabling write-protection, the \emph{Write-Protect} (WP) pin has to be pulled low for the write-protection to be effective.