User Tools

Site Tools


tutorials:hardware_hacking:rayer_spipgm_breadboard

Table of Contents

Building a RayeR SPIPGM BIOS Flasher Using a Breadboard

Notes

Before preceding with this tutorial read my disclaimer
I AM NOT RESPONSIBLE FOR ANYTHING


Introduction

The RayeR SPIPGM hardware flasher is an external SPI flasher that uses your computers parallel port to reflash SPI chips.
For example flashing Libreboot/Coreboot to a Laptop or BIOS Recovery and it is fully supported by Flashrom.
Note: Your going to need a PC with a parallel port to use this hardware flasher.
Preferably running some type of linux/*nix system.

In this tutorial we will be building a basic but semi reliable version of the RayeR SPIPGM hardware flasher using a breadboard
and a few other components.

A basic design of The RayeR SPIPGM hardware presented in this tutorial consists of:

  • 4x 100 ohm resistors
  • 1x D Sub Connector, 25 Contacts
  • Hookup wire 22 AWG or an IDE cable
  • 6x 10cm Jumper Wire “Male to Female”
  • 1x Breadboard
  • 1x POMONA IC Test Clip 8 or 16 Pins (Based on chip to be flashed)

The RayeR SPIPGM “hardware/driver software” was originally designed by Martin Rehak of the Czech Republic.
An english version of his website can be found here. http://rayer.g6.cz/programm/programe.htm

NOTE - Some basic soldering skills will be required on Part 2 of this tutorial.
Don't be intimidated by soldering it's super easy and fun to learn. :-P


If you are new to electronics then I highly recommend that you take a look at the following links.
You should have a basic understanding of electronics before proceeding with this tutorial.
Basic Electronics
What is Electricity?
Voltage, Current, Resistance, and Ohm's Law
What is a Circuit
How to Use a Multimeter
Resistors
Serial Peripheral Interface

How to Solder:
How to Solder: Through-Hole Soldering
Soldering Tutorial for Beginners: Five Easy Steps
YouTube: SparkFun How to Solder with David Stillman

How to Solder in-depth:
I found an amazing video series developed by a company called PACE, Inc
It has an “old school” style and a straight to the point, no BS explanation to soldering.
The video series looks a bit dated but is still very relevant today.

I highly recommend that you watch this video series this is how I started learning soldering.
YouTube: PACE, Inc Educational soldering video series

*I have no affiliation with any of the above individuals/companies
I have added them simply because I find the information very useful and relevant to this tutorial.
All trademarks are property of their registered owners.


Part 1: Identify Tools and Components

In this part of the tutorial we will be looking at required and recommended tools and components.

PLEASE NOTE:
All Manufacturer Part Numbers in this tutorial are simply parts that I have used when building this project.
They have been added for reference. I have no affiliation with any of the manufacturers listed.

Required Components

Breadboard

An electronics Breadboard is an essential component in prototype development.
Using a breadboard you can test out new designs to see how they work before transferring the design to PCB.
We will be using a breadboard in this tutorial for it's ease of use.

Information How to Use a Breadboard
Price: £2 - £3
Where to buy: eBay AliExpress Amazon “RS Components” Farnell “CPC UK” Mouser Digi-Key”
Quantity Required: 1x


100 Ohm resistors

You will need 4x 100 Ohm resistors for Part 2: Building the Parallel Port Cable of this tutorial.
I used 1% 100 Ohm resistors “Part No LR1F100R” in this tutorial but in all honesty this is over-kill 5% tolerance will work just as well..
I recommend you don't go over 5% tolerance.

Information Resistors
Price: £0.42 per pack of 10x
Where to buy: “RS Components” Farnell “CPC UK” Mouser Digi-Key“
Quantity Required: 4x recommend you get 20x
Manufacturer Part No: LR1F100R


6x 10cm Jumper Wire “Male to Female”

Information Jumper Wire
Price: £0.48 - £2.39 per pack of 40x
Where to buy: “eBay aliexpress”
Quantity Required: 6x recommend you get 40x


Hookup wire 22-24 AWG or an IDE cable

You will need some wire I personally prefer 22AWG but 24AGW will work stranded or solid core.
I used 22AWG stranded wire in this tutorial.

Information Hookup wire
Price: £3 - £10 For a Multi Color Pack of hookup wire
Where to buy: “eBay aliexpress”
Quantity Required: You will need 5 wires cut at 17cm and 1 wire cut at 17.5cm.
Just buy a Multi Color Pack or use an old IDE cable


(Alternative option) (40-Conductor) IDE/ATA Cable

Another option is the use an old (40-Conductor) IDE/ATA Cable.
They can be cut and striped to required length with ease.
So if you have an old cable sitting around that you don't mind destroying it would be cheaper than buying wire.
I just used 22AWG wire in this tutorial for colour coding connections.


D-SUB Male DB25 25 Pin Solder Connector

Information D-SUB Male DB25 25 Pin Solder Connector
Price: £0.45 - £2 per connector
Where to buy: “RS Components” Farnell “CPC UK” Mouser Digi-Key eBay AliExpress”
Quantity Required: 1x recommend you get 2x
Manufacturer Part No: DB25P064HTXLF


Make sure that you get a connector with solder cups on the back like the picture below.


POMONA IC Test Clip 8 or 16 Pins

Information POMONA IC Test Clip
Price: £0.45 - £2 per connector
Where to buy: “ Farnell Mouser Digi-Key”
Quantity Required: 1x
Manufacturer Part No: 5250 SOIC 8 pin, 5252 SOIC 16 pin


Power Supply ATX

Information ATX PSU
Price: £5 - £15
Where to buy: “eBay amazon, Your Home PC?”
Quantity Required: 1x

We will need a power supply to power the RayeR SPIPGM hardware flasher.
An old/cheap ATX PSU will work although I personally prefer using a Bench Power Supply.
if your reading this tutorial you most likely have a desktop computer with an ATX PSU you can take out and temporarily use.


Power Supply Bench (Alternative option)

Bench PSU (Alternative option)
Information Bench PSU
Price: £55 - £100
Where to buy: “Farnell, RS Components, Digi-Key, Mouser”
Quantity: 1x

A bench PSU is very nice to have if you can afford it.
You can adjust the voltage and current to suit your needs.
If you do get a bench PSU buy one from a reputable company.

This is the bench PSU that I use to power all my projects
Tenma 72-10480 - Cost £59


Required Tools

Soldering Iron/Station

Information Soldering Guide
Price: £20 - £55
Where to buy: “ Farnell Mouser Digi-Key”
Quantity Required: 1x
Manufacturer Part No: 21-10115 UK

Your going to need an an iron with 30 Watts or more. (you might get away with using a 25…)
More Watts = easier to work with and less damaged components :-)

For this tutorial I used a 60 Watt TENMA* Soldering Station it cost me about £45.
It seems to work well for what I need it to do.

*I have no affiliation with TENMA.


It should go without saying but your going to need some solder…
60/40 rosin core solder will do nicely.


Multimeter

Having a multimeter is absolutely essential to this tutorial.
I can't stress this enough.

At a minimum your going to need to check the voltage of your power source before connecting it.
Typically anything beyond 3.6v will permanently kill most BIOS chips.
We will go into more detail about powering the Hardware flasher latter on in this tutorial.

Information How to Use a Multimeter
Price: £20 - £50
Where to buy: “ Farnell Mouser Digi-Key”
Quantity Required: 1x


Wire stripper

Information Wire stripper
Price: £5 - £10
Where to buy: “Amazon eBay AliExpress Farnell Mouser Digi-Key”
Quantity Required: 1x


Safety glasses

Good to have if you are just learning how to solder.

Information Safety glasses
Price: £3 - £10
Where to buy: “Amazon Farnell Mouser Digi-Key”
Quantity Recommended: 1x


Helping Hand

As the name implies the Helping Hand also known as a third hand is a very handy tool.8-)
It's a good tool for holding components and wires when soldering.

Information Helping Hand
Price: £5 - £10
Where to buy: “Amazon eBay AliExpress Farnell Mouser Digi-Key”
Quantity Required: 1x

Warning:
A lot of Helping Hands come with a magnifying glass to help you see small components.
This seems like a good idea…..expert when your workstation faces a window….
One sunny day the light was shining through my window and focused through the magnifying glass and started a fire on my desk.
If I had not been in my room at the time this could have caused a house fire.
So I removed the magnifying glass and all is fine.

magnifying glass+window+sunny day = fire
This is just something to be aware of.


Step 2: Power Supply & Testing

WARNING!
Before powering our Hardware Flasher we need to test the voltage of the power source we will be using.
In my experience most BIOS flash chips use 2.7v - 3.6v like the one I will be flashing in this tutorial.

It's very important that your power source does not output more voltage than what your flash chip is rated for.
Doing so will in most cases permanently destroy the flash chip!

Aka 100% DEAD Laptop/Motherboard/Whatever Chip


We have a few options for powering our RayeR SPIPGM Hardware

ATX PSU (Cheep and easy to find)
Bench PSU (More expensive but you can set custom voltage and current)

Useful links
How To: Turn on PSU without motherboard
ATX PSU Pinouts
How to use a Multimeter

1: Power ATX PSU
2: Find correct pins for GROUND and 3.3v
3: Measure voltage using a multimeter

On an ATX PSU you will find that the 3.3v lines output about 3.38v.
This is fine for a flash chip rated between 2.7v - 3.6v as long as the voltage does not go over 3.6v

Bench PSU Power and Testing

Testing a Bench PSU is very straightforward set your voltage and test with a multimeter.
A good quality bench PSU should always output the correct voltage but it's good practice to always check.

1: Power on and set voltage
2: Measure voltage using a multimeter


Part 2: Building the Parallel Port Cable

Getting Started

Cable Build Overview

What you need to know in a nutshell
The SPI Interface in our design uses the following logic signals.

  • Slave Select (SS)
  • Serial ClocK (CLK)
  • Master Out Slave I (MOSI)
  • Master In / Slave Out (MISO)

Notice that I have given each logic signal it's own colour coded wire so that I know what wire does what.

You don't have to use the exact same colour wires that I have or any colour coding at all for that matter.
I just used colour coding because it makes wire identification easy.

Right this is where the real work begins =)
Your going to need a Soldering Iron for this part. :-)

In this part of the tutorial we will be building the parallel port cable.
This cable is critical to our design as it will be reading and writing data to whatever chip we will be flashing.

So we need to make sure that we get this part right.


RayeR SPIPGM Wiring Guide

The Wiring Guide below shows all the details needed to build the parallel port cable for use in our design.
e.g max wire length,resister values,color coding,pin numbers.

The wiring guide also lists other names that SPI logic signals may go by in different chip manufacturer manuals.


Confused?

If after looking at the above Wiring Guide you find yourself confused or not 100% sure what you are doing. Don't worry!=)

I have written a 12 step guide with awesome high resolution pictures of what you need to solder and put together.
We will take it step by step together :-)

So read on and let's get started with Step 1! Gathering Components :-D

P.S. If you have completed the cable build using the above wiring guide you can skip to Part 3 of this tutorial.
Part 3: Building the Circuit - Putting It All Together


Step 1: Gathering Components

You will need
1x D-SUB Male DB25 25 Pin Solder Connector
4x 100 Ohm Resistors

When you have the following components in front of you move on to Step 2: Strip/Cut and Tin Required Wires


Step 2: Strip/Cut and Tin Required Wires

Ok now that we have our resistors and D-SUB connector.
We now need to strip,cut and tin our wires. (Note: if you are using solid core wire tinning your wire is unnecessary)

We will need 5x wires. 4 wires for SPI and 1 wire for GROUND (You can use any colour coding you like.)

  • The following 4 wires should be cut at 17cm or less (Note: The length of all 4 wires must match)
  • Slave Select (SS)
  • Serial ClocK (CLK)
  • Master Out Slave I (MOSI)
  • Master In / Slave Out (MISO)
  • The GROUND wire should be cut 0.5cm longer than the 4 wires listed above.
  • So if you cut 4 wires at 17cm then your ground wire needs to be 17.5cm in length.
  • This will make sense latter on

Now that you have all 5 wires cut and stripped you will need to tin your wires.

Take a look at the following links if you need help with tinning your wire or soldering.
How to tin a wire
Youtube how to tin a wire
How to Solder

  • When you have the following items in front of you move on to Step 3: Position your D-SUB connector for soldering
  • 1x D-SUB Male DB25 25 Pin Solder Connector
  • 4x 100 Ohm Resistors
  • 4x Stripped wires cut at 17cm and tinned if using stranded wire.
  • 1x Stripped wire cut 0.5cm longer than the other 4 wires and tinned if using stranded wire.


Step 3: Position your D-SUB connector for soldering

You will need something to hold your D-SUB connector in place for soldering.
A helping hand works well for this

If you don't have a helping hand then you will need to get creative=) and find a way to hold it in place.

When this is done move on to Step 4: Trim resistor leg


Step 4: Trim resistor leg

You will need to trim one leg on each resistor so that they should just fit into the D-SUB connector solder cup.
Have a look at the image on Step 5: Positioning resistor to D-SUB connector solder cup for an example of what a good fit looks like.


Step 5: Positioning resistor to D-SUB connector solder cup

Now that we have our resistor leg trimmed just right we need to insert and hold the leg into the solder cup for pin# 10
Each solder cup should have a pin number printed above it.
You might need to get out a magnifying glass to see the printed numbers.

I have also included a D-SUB pin-out diagram that should help you find the right pins.
(Note: Looking at the image below you can see how useful the helping hand becomes)

When you have your resistor positioned just right move on to Step 6: Soldering resistors to the D-SUB Connector

D-SUB pin-out diagram (Click image to enlarge)


Step 6: Soldering resistors to the D-SUB Connector

Now that we have positioned our resistor into the solder cup for pin# 10
We are now going to solder the connection. (You did read the Recommended Reading right…)

You should now have something that looks like the picture below.
When you have completed this step move on to Step 7:Soldering the remaining resistors

D-SUB pin-out diagram (Click image to enlarge)


Step 7: Soldering the remaining resistors

Solder the remaining resistors to pins 9,8 and 7
Use the D-SUB pin-out diagram if needed.

When you have completed this step move on to Step 8: Trim remaining resistor legs and line up wire

D-SUB pin-out diagram (Click image to enlarge)


Step 8: Trim remaining resistor legs and line up wire

  1. Trim the remaining resistor legs to prepare for soldering. (I trimmed the legs to about 0.5cm )
  2. Trim one end on each of your 5x wires that you cut and stripped earlier in this tutorial to match the leg length of your resistors. (In my case 0.5cm)
  3. Line up your wire to the resistor leg. (In the image below I started with the resistor connected to pin 7)

When you have completed this step move on to Step 9: Solder wire to resistor

D-SUB pin-out diagram (Click image to enlarge)


Step 9: Solder wire to resistor

Solder the wire to the resistor
The image below shows the wire being soldered to the resistor connected to pin 7

When you have completed this step move on to Step 10: Solder the remaining SPI related wires

D-SUB pin-out diagram (Click image to enlarge)


So now we need to solder the remaining SPI wires to the resistors connected to pins 8,9,10
(Refer to the D-SUB pin-out diagram if needed)

You should have something that looks like the image below.
When you have completed this step move on to Step 11: Soldering the Ground wire

D-SUB pin-out diagram (Click image to enlarge)


Step 11: Soldering the Ground wire

Now you need to solder the ground wire to the solder cup for pin 18
(Obvious Note: to access the solder cup for pin 18 you need to turn over the D-SUB connector)

(Refer to the D-SUB pin-out diagram if needed)
When you have completed this step move on to Step 12: Completed Parallel Port Cable

D-SUB pin-out diagram (Click image to enlarge)


Step 12: Completed Parallel Port Cable

Congratulations! =) You have now finished building the parallel port cable.

Note: I highly recommended that you check the connections of the parallel port cable
using a Multimeter before preceding to Part3 of this tutorial. (Refer to: Recommended Reading if needed.)

It's time to move on to Part 3: Building the Circuit - Putting It All Together


Part 3: Building the Circuit - Putting It All Together

Final Prep Work

Welcome to Part 3 of this tutorial =) (Building the Circuit - Putting It All Together)

At the end of Part3 with a little luck will have a broken working RayeR SPIPGM BIOS flasher.
Note: There will be a Troubleshooting Section at the end of this tutorial if needed. 8-)

Before we get started building our circuit we need to make some custom jumper wires.
Ideally if possible one black and one red wire as the jumper wires will be used in the power rails of our breadboard.

Custom Jumper Cable 3cm

Cut strip and tin 2x 22 or 24 AWG wires at 3cm

Note: You only need to tin your wire if using stranded wire.


Bend your 2 wires into a U shape like the picture below.

Final Prep Work Complete! :-D


Parts: Check List

Before we preceded lets run a check list of what we have to make sure we have everything that is needed.
If you have been following this tutorial correctly you should have the following Items ready.

  • 1x Parallel Port Cable with soldered wires and resistors (Preferably colour coded) e.g.(SS) (CLK) (MOSI) (MISO) (GROUND)
  • 1x Breadboard
  • 6x 10cm “Male to Female” Jumper Wire (Preferably colour coded) e.g.(SS) (CLK) (MOSI) (MISO) (POWER) (GROUND)
  • 2x 3cm Custom Made Jumper Wires (Preferably colour coded) e.g. (POWER) (GROUND)
  • 1x Pomona IC Test Clip (5252 SOIC 16 pin or 5250 SOIC 8 pin) or equivalent IC Test Clip

You should have everything pictured below.


RayeR SPIPGM Overview

Congratulations! You are now at the End Game :-D

We now have everything that we need to complete our RayeR SPIPGM design.

The Schematic and Wiring Diagram below shows all the details you will need to complete the RayeR SPIPGM design. e.g wiring, resister values, colour coding, pin numbers, SPI logic names.

RayeR SPIPGM Schematic

Think of this Schematic as a logical overview of the electronic circuit showing pin and wire configurations.
The Schematic also shows an example of the RayeR SPIPGM connected to a flash chip and power source.


RayeR SPIPGM Breadboard Wiring Diagram

This Wiring Diagram is a physical overview our RayeR SPIPGM BIOS flasher design showing physical connections.
The Wiring Diagram also shows how the RayeR SPIPGM is connected to a flash chip and power source.


Confused?

If after looking at the above schematic and wiring diagram you find yourself confused or not 100% sure what you are doing. Don't worry!=)

I have written a 5 step guide RayeR SPIPGM Step by Step Build Guide
With awesome high resolution pictures of what you need to do to complete this project.
We will take it step by step together :-)


RayeR SPIPGM Step by Step Build Guide

Step 1: Connecting positive (Power) jumper wire

You will need the 2x Custom Jumper Wires 3cm that we made in the Final Prep Work Section

Using the red 3cm Jumper Wire make a connection from the positive power rail on the breadboard to one of the terminal strips like the image below.
Notice that I have added red and black shaded lines to indicate positive and negative voltage/current flow.

Step 2: Connecting Negative (Ground) jumper wire

Using the black 3cm Jumper Wire make a connection from the negative power rail on the breadboard to one of the terminal strips.

Use the image below as a guide.
Notice that I have added red and black shaded lines to indicate positive and negative voltage flow.

Step 3: Connect Male to Female jumper wires for Power and Ground

We will need 2x or our 6x 10cm Jumper Wire “Male to Female” (Preferably colour coded) e.g. (POWER) (GROUND)

Connect the male end of the (POWER) jumper wire like the image below.

Connect the male end of the (GROUND) jumper wire like the image below.

You should now have something that looks like this.

Step 4: Connecting the Parallel Port Cable to the Breadboard

Using our Parallel Port Cable that we built in Part 2: Building the Parallel Port Cable
We are now going to connect the parallel port cable to the breadboard

Parallel Port Cable

Connect the (GROUND) and data wires e.g.(SS) (CLK) (MOSI) (MISO) of the Parallel Port Cable to the breadboard like the image below.
The 4 data wires should be connected to there own terminal strips next to the positive and negative terminal strips like the image below.

Note: make sure to leave one row of space free when connecting the 4 data wires. (This will make sense latter on)

Using the last of our 10cm “Male to Female” Jumper Wires we are going to connect our data line wires to the breadboard.

Connect the last 4x “Male to Female” Jumper Wires like the image below.
Make sure that the data wires and terminal strips of the breadboard match.

This is why I use colour coded wire.

So now you should have something that looks like this.

Step 5: Connecting the IC Test Clip

The last step in our design is to connect an appropriate IC test clip depending on the SPI chip that is to be flashed.
Since I will be flashing a T400 ThinkPad with a 16 pin SOIC BIOS flash chip I will be using a POMONA Model 5252 IC test clip.

NOTE: Before you can connect an appropriate IC test clip will need to read the manufacturers documentation for your flash chip to determine wiring

Congratulations!:-P You have now built a Rayer Spipgm Hardware Flasher.


How to use the RayeR SPIPGM hardware flasher

Step 1: Review the RayeR SPIPGM Breadboard Wiring Diagram

The RayeR SPIPGM Breadboard Wiring Diagram shows all the physical wiring connections of our design.

Have a good look at this physical wiring diagram and double check it against
what you have built to ensure everything is connected as it should be.

Try using the below physical wiring diagram and see of you can figure out how to use
the RayeR SPIPGM flasher without Having to look at the rest of the tutorial.

Before preceding read my disclaimer
I AM NOT RESPONSIBLE FOR ANYTHING

WARNING: ONLY APPLY POWER TO THE RayeR SPIPGM HARDWARE WHEN EVERYTHING IS CONNECTED AND DOUBLE CHECKED

If your still unsure scroll down to step 2.


WARNING: DO NOT APPLY POWER TO THE RayeR SPIPGM HARDWARE UNTIL YOU HAVE READ AND UNDERSTOOD “Step 6: Review and Connect Power”


Step 2: Using The RayeR SPIPGM Hardware

We should have a working and tested power source.
We can now test our RayeR SPIPGM Hardware.

Before we connect everything up just a reminder that we are going to need.

  • Computer with a working parallel port running a linux/*nix system.
  • Flashrom - Software we will be using to READ/WRITE/ERASE flash chips

Note: If your flashing Coreboot/Libreboot
I recommend you download a patched copy of flashrom from the libreboot website.
A patched copy of flashrom can can be found in the libreboot util.tar.xz archive file.


Step 3: Connecting The Parallel Port Cable

Connect the Parallel Port Cable to your system like the image below.
Make sure none of the solder joints are touching.
In an ideal world I should be using electrical tape or heat shrink tubing to cover bare parts.


Step 4: Find Flash Chip

In this tutorial I will be flashing a T400 Thinkpad with libreboot firmware as an example.

  1. Find your flash chip
  2. Read manufacturers documentation for your chip (You will need this information to wire the IC Test Clip)

BIOS Flash Chip on a T400 Thinkpad


Step 5: Connect IC Test Clip

Connect your IC Test clip like the image below.
Make sure the clip is well connected.

Read the flash chip manufactures documentation to determine appropriate wiring for the IC test clip


Step 6: Review and Connect Power

DO NOT CONNECT POWER YET!

NOTE: Disconnect the NVRAM/CMOS Battery before proceeding if your flashing BIOS

In this tutorial I will be using an ATX PSU to power the RayeR SPIPGM Hardware.
I will be flashing Libreboot firmware to a T400 Thinkpad

Checklist Before Applying Power

  1. Make sure your PSU is not plugged in
  2. Triple check all connections/wires - Refer to RayeR SPIPGM Overview If needed
  3. IC Test Clip should be attached to flash chip and wired correctly.
  4. Go ahead and connect the 3.3v and GROUND from the PSU to the breadboard power rails (With PSU Still unplugged)
  5. When you are 99.99% sure everything is correct plug in your ATX PSU/Bench PSU

Image showing correct connections for flashing a T400 Thinkpad With a SOIC 16 Flash Chip (Your IC Test Clip wiring may be different)


Step 7: Using Flashrom

Testing

With everything connected and powered up run the following command from your terminal. (You may need to be root)

flashrom --programmer rayer_spi

1 of 2 things will happen

  1. It will fail to detect anything e.g (No EEPROM/flash device found.)
  2. It will detect and display chip information e.g (Found (ChipBrand) flash chip “Model#” (size kB, SPI) on rayer_spi.)

If you see “No EEPROM/flash device found” in the output then congratulations you have failed!:-) F.A.I.L = First attempt in learning (It's ok to fail) (I do it all the time)
Check out the Troubleshooting Section

flashrom v0.9.9-unknown on Linux 3.16.0-4-686-pae (i686)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Using RayeR SPIPGM pinout.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.

Example of failed detection of flashchip.


2. SUCCESS: If by some miracle you are successful the first time then congratulations. (This has never happened to me yet)

If everything is connected correctly then you should see output displaying the Brand Name, Model# and Size of the flashchip.
In my case flashrom detected a Winbond flash chip Model# W25X64 with 8192 kB of memory.

flashrom v0.9.9-unknown on Linux 3.16.0-4-686-pae (i686)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Using RayeR SPIPGM pinout.
Found Winbond flash chip "W25X64" (8192 kB, SPI) on rayer_spi.
No operations were specified.

Read image from flash

Now that flashrom has successfully identified our flashchip we will do 3 READ operations on the chip so we will have (bios1.rom bios2.rom and bios3.rom)
We will then run an md5sum on all 3 roms to make sure they all match.

So let's try reading some flash data.

Run the following command from the terminal.

This command will read the data from the flashchip and save it as bios1.rom
In my experience it takes 6 minutes and 19 seconds to read a 8192 kB chip using RayeR SPIPGM Hardware (3x reads should = 18 minutes 57 Seconds)

flashrom --programmer rayer_spi --read bios1.rom
flashrom v0.9.9-unknown on Linux 3.16.0-4-686-pae (i686)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Using RayeR SPIPGM pinout.
Found Winbond flash chip "W25X64" (8192 kB, SPI) on rayer_spi.
Reading flash... done.

When the first read has completed run the command below.

flashrom --programmer rayer_spi --read bios2.rom

When the second read has completed run the command below.

flashrom --programmer rayer_spi --read bios3.rom

You should have 3 files now

  • bios1.rom
  • bios3.rom
  • bios3.rom

Run the following command from the terminal.

md5sum bios*.rom

md5sum output

ca60c57ec4a5a219657e7f09c062ef2a  bios1.rom
ca60c57ec4a5a219657e7f09c062ef2a  bios2.rom
ca60c57ec4a5a219657e7f09c062ef2a  bios3.rom

If all the hashes match your good to go.
If not refer to the Troubleshooting Section


Write image to flash

Example of successful write.

flashrom --programmer rayer_spi --write bios1.rom
flashrom v0.9.9-unknown on Linux 3.16.0-4-686-pae (i686)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Using RayeR SPIPGM pinout.
Found Winbond flash chip "W25X64" (8192 kB, SPI) on rayer_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.

Example of failed write.

flashrom v0.9.9-unknown on Linux 3.16.0-4-686-pae (i686)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Using RayeR SPIPGM pinout.
Found Winbond flash chip "W25X64" (8192 kB, SPI) on rayer_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... FAILED at 0x0000003f! Expected=0x00, Found=0x80, failed byte count from 0x00000000-0x001fffff: 0x1ff9d
Your flash chip is in an unknown state.
Please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org, thanks!
programmer_unmap_flash_region: unmapped 0x00000000

Troubleshooting:

Some text should go here…

tutorials/hardware_hacking/rayer_spipgm_breadboard.txt · Last modified: 2019/09/23 20:10 by lonniemason