RaspberryPi

From flashrom
Revision as of 21:36, 19 October 2014 by Stefanct (talk | contribs)
Jump to navigation Jump to search

This wiki is retired

Our website is https://www.flashrom.org, instructions on how to add or update documentation are here

All wiki content available in read-only mode at wiki.flashrom.org

RaspberryPi is a cheap single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of stimulating the teaching of basic computer science in schools. It can run a fully-functional GNU/Linux distribution and exposes SPI, I2C and several GPIOs on its expansion header.

Prerequisites

Use latest Raspbian (or any other distribution with a recent kernel). Run the following commands (or make sure these kernel modules are loaded successfully):

modprobe spi_bcm2708
modprobe spidev

Connecting the flash chip

To learn more about the RPi's expansion header refer to http://elinux.org/Rpi_Low-level_peripherals . Please do not try to draw more than 50mA from the 3.3V pin. If the flash chip is still placed in a foreign circuit (e.g. soldered to a PC mainboard) please refer to ISP for further details.

RPi header SPI flash
17 Vcc 3.3V
25 GND
19 DI
21 DO
23 SCK
24 /CS

In general all other pins (usually pin 3 is /WP and pin 7 is /HOLD) should be connected to Vcc unless they are required to be floating or connected to GND (both extremely uncommon for SPI flash chips). Please consult the datasheet for the flash chip in question.

Running flashrom

Flashrom uses the Linux-native SPI driver, which is implemented by flashrom's linux_spi module. To use the RaspberryPi with flashrom you have to specify that module followed by the Linux SPI device, e.g.

./flashrom -p linux_spi:dev=/dev/spidev0.0