devices:pi_flashrom
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| devices:pi_flashrom [2018/12/14 15:09] – external edit 127.0.0.1 | devices:pi_flashrom [2024/08/13 20:06] (current) – removed Sean Rhone | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Information ====== | ||
| - | |||
| - | * Using a Raspberry Pi to read and write to a 8-pin chip using flashrom | ||
| - | |||
| - | ====== Requirements ====== | ||
| - | |||
| - | * Raspberry Pi ((https:// | ||
| - | * Raspbian ((https:// | ||
| - | * flashrom ((in Raspbian repos or can be compiled)) | ||
| - | * Pomona SOIC Clip Model 5250, 8 Pin ((https:// | ||
| - | * Male to Female Breadboard wires ((to connect the SOIC clip to the Pi's GPIO pins)) | ||
| - | * TODO: Separate notes for 16-pin if needed | ||
| - | |||
| - | ====== Pi ====== | ||
| - | |||
| - | ===== Configuration ===== | ||
| - | |||
| - | * Install Raspbian | ||
| - | * Update Raspbian packages | ||
| - | * Enable SPI ((TODO: Is this needed? May be enabled out-the-box)) | ||
| - | |||
| - | ===== Pins ===== | ||
| - | |||
| - | ==== Physical ==== | ||
| - | |||
| - | * The physical numbering and order of the pins on a Pi | ||
| - | * '' | ||
| - | * '' | ||
| - | * The ASCII art assumes the I/O ports are on the right-side and the pins are at the top | ||
| - | * 1, 2, 3, 4, 37, 38, 39, and 40 are unused and only provided for reference as to pin order | ||
| - | |||
| - | < | ||
| - | | ||
| - | | [ 2] [ 4] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [24] [ ] [ ] [ ] [ ] [ ] [ ] [38] [40] | | | | ||
| - | O [ 1] [ 3] [ ] [ ] [ ] [ ] [ ] [ ] [17] [19] [21] [23] [25] [ ] [ ] [ ] [ ] [ ] [37] [39] O | | ||
| - | | | | | | ||
| - | VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV (chips and other stuff below) VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV</ | ||
| - | |||
| - | ==== GPIO ==== | ||
| - | |||
| - | * https:// | ||
| - | * The GPIO numbering and order of the pins on a Pi | ||
| - | * '' | ||
| - | * '' | ||
| - | * The ASCII art assumes the I/O ports are on the right-side and the pins are at the top | ||
| - | * 5v, far-left 3.3v, 21, and far-right GND are unused and only provided for reference | ||
| - | |||
| - | < | ||
| - | | ||
| - | | [5v ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ 8] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [21 ] | | | | ||
| - | O [3.3V] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [3.3V] [10] [ 9] [11] [GND] [ ] [ ] [ ] [ ] [ ] [ ] [GND] O | | ||
| - | | | | | | ||
| - | VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV (chips and other stuff below) VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV</ | ||
| - | |||
| - | ====== W25Q64FV ====== | ||
| - | |||
| - | ===== Information ===== | ||
| - | |||
| - | * [[https:// | ||
| - | * This chip is commonly used as a BIOS chip on computer motherboards | ||
| - | * Detects as a '' | ||
| - | * :!: On a XPS 13, the chip identifies as a '' | ||
| - | |||
| - | ===== Pins ===== | ||
| - | |||
| - | * Numbering of the pins on the chip according to the spec sheet | ||
| - | |||
| - | < | ||
| - | -------- | ||
| - | [1]__|O | ||
| - | [2]__| | ||
| - | [3]__| | ||
| - | [4]__| | ||
| - | --------</ | ||
| - | |||
| - | ===== Pin Descriptions ===== | ||
| - | |||
| - | * What the pins on the chip do | ||
| - | |||
| - | < | ||
| - | -------- | ||
| - | [/ | ||
| - | | ||
| - | [/ | ||
| - | [GND]__| | ||
| - | --------</ | ||
| - | |||
| - | ===== SOIC Clip to Pi Pins ===== | ||
| - | |||
| - | * The '' | ||
| - | * This image assumes the clip's pins are on the left and right side in the same orientation as the above pictures ((the circle notch on the chip is top-left)) | ||
| - | * The numbers here refer to the [[# | ||
| - | |||
| - | < | ||
| - | [24] [17] | ||
| - | [21] \ \ [ ] | ||
| - | [ ] \ \ [23] | ||
| - | [25] [19]</ | ||
| - | |||
| - | ====== flashrom ====== | ||
| - | |||
| - | ===== Install ===== | ||
| - | |||
| - | ==== Pre-compiled ==== | ||
| - | |||
| - | * As of 2018/04/27, this supports a '' | ||
| - | * As of 2018/12/09, this does not support a '' | ||
| - | |||
| - | sudo apt install ' | ||
| - | |||
| - | ==== Git Compile ==== | ||
| - | |||
| - | === Dependencies === | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo apt install libpci-dev libftdi-dev libusb-1.0-0-dev git-core build-essential | ||
| - | |||
| - | === Get Source === | ||
| - | |||
| - | **** | ||
| - | |||
| - | rm -Rf ~/' | ||
| - | |||
| - | === Build === | ||
| - | |||
| - | **** | ||
| - | |||
| - | cd ~/' | ||
| - | |||
| - | ===== Test Chip Read ===== | ||
| - | |||
| - | * Assumes the SOIC clip is connected to the Pi correctly and that SPI is enabled | ||
| - | * All 3 md5sums **need** to match to ensure consistent read/write to the chip | ||
| - | * '' | ||
| - | |||
| - | sudo flashrom --programmer ' | ||
| - | |||
| - | md5sum ~/' | ||
| - | |||
| - | rm -fv ~/' | ||
| - | |||
| - | ===== Backup ===== | ||
| - | |||
| - | * :!: Super-important to have a checksum-verified back-up to fall-back to when doing BIOS modifications | ||
| - | * **Back this up somewhere external before doing anything else** | ||
| - | * To be extra safe, also md5sum it and compare to above tests | ||
| - | * :!: '' | ||
| - | |||
| - | sudo flashrom --programmer ' | ||
| - | |||
| - | md5sum ~/' | ||
| - | |||
| - | rm -fv ~/' | ||
| - | |||
| - | ===== Flash ===== | ||
| - | |||
| - | * Change '' | ||
| - | * :!: '' | ||
| - | * :!: Change '' | ||
| - | |||
| - | sync && sudo flashrom --programmer ' | ||
| - | |||
| - | ====== me_cleaner ====== | ||
| - | |||
| - | * TODO: Is ifdtool better for HAP bit? | ||
| - | |||
| - | ===== Get Source ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | git clone -b ' | ||
| - | |||
| - | ===== Check Original BIOS ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | python ~/' | ||
| - | |||
| - | ===== Clean ME ===== | ||
| - | |||
| - | * https:// | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | * Use no arguments in order to remove partitions and not touch MeAltDisable or HAP bit | ||
| - | |||
| - | python ~/' | ||
| - | |||
| - | ===== Flash Modified BIOS ===== | ||
| - | |||
| - | * Change '' | ||
| - | |||
| - | sync && sudo flashrom --programmer ' | ||
| - | |||
| - | ===== Clean-up ===== | ||
| - | |||
| - | **** | ||
| - | |||
| - | cd ~ && rm -Rf ~/' | ||
| - | |||
| - | ====== Verifying ME ====== | ||
| - | |||
| - | ===== Windows ===== | ||
| - | |||
| - | * TODO: Involves MEManuf and -VERBOSE flag | ||
| - | |||
| - | ===== Linux ===== | ||
| - | |||
| - | ==== Coreboot ==== | ||
| - | |||
| - | * Need Coreboot sources for some utilities | ||
| - | |||
| - | cd ~ && mkdir -p ~/' | ||
| - | |||
| - | === intelmetool === | ||
| - | |||
| - | == Dependencies == | ||
| - | |||
| - | * [[distros: | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | == Compile == | ||
| - | |||
| - | **** | ||
| - | |||
| - | cd ~/' | ||
| - | |||
| - | == Run == | ||
| - | |||
| - | **** | ||
| - | |||
| - | cd ~/' | ||
| - | |||
| - | === ifdtool === | ||
| - | |||
| - | == Dependencies == | ||
| - | |||
| - | * [[distros: | ||
| - | |||
| - | sudo dnf install ' | ||
| - | |||
| - | == Compile == | ||
| - | |||
| - | **** | ||
| - | |||
| - | cd ~/' | ||
| - | |||
| - | == Notes == | ||
| - | |||
| - | * Can be used to set the HAP bit, similar to '' | ||
| - | * Can be used to dump information about ME on a BIOS image, good for checking if it's a valid dump like '' | ||
| - | * Can unlock R/W on chip areas much more thoroughly than '' | ||
| - | |||
| - | == Run == | ||
| - | |||
| - | **** | ||
| - | |||
| - | cd ~/' | ||
/srv/www/wiki/data/attic/devices/pi_flashrom.1544818176.txt.gz · Last modified: (external edit)
