Flashing a BIOS chip with Bus Pirate

From DP

Revision as of 13:44, 5 October 2016 by Mikeb (Talk | contribs)
Jump to: navigation , search

Let's assume that your starting conditions are the following:

1) You have a computer with installed GNU/Linux or BSD operating system

2) You want to start flashing the BIOS images to the motherboards of other computers - either to restore their closed source proprietary BIOS after a failed update; or to replace it with a free/open source alternative, which is:

coreboot + SeaBIOS payload. You could check Supported Motherboards list to see if your board is supported or what board it is better to buy

3) You already have a Bus Pirate, doesn't matter if it is v3 or v4

This article will help you to set up a working BIOS flashing environment by providing the advanced description of hardware side of the question

Contents

Getting the right tools

NOTE: although this part could be viewed as a kind of advertisement by some of the readers, it just gives you an example of what tools could be suitable and where you could buy them (and I am giving multiple examples, not focusing at one seller or product!) It is strongly encouraged that you additionally research before making the final purchase decisions, because:

1) the prices could change

2) the seller's rating could drop

3) better tools could appear

Also, this article describes flashing SOIC8 chips as an example. There could be a slightly different method of connectivity to other types of BIOS chips, especially for those types of chips which don't have available-for-purchase test clips and/or whose pins are not physically exposed to a user, so that a user can't connect to them without soldering...

Soldering iron tool (temperature adjustable)

While trying to reduce the expenses as much as possible I found two great choices:

1) Cheap soldering tool, stand and set of iron tips ($6.56)

2) ATTEN AT-SS-50, true ceramic core, stand and 1 iron tip (~$27.72)

Although 1) is a great cost effective choice, its' "ceramic" core is pseudoceramic in fact - nichrome spiral; that means: slower time to heat, no thermal stabilization (you would need to control a temperature switch constantly to remain near your desired temperature), also it heats a lot after 15-20 mins of usage - uncomfortable for fingers - so need to make a break

2) is the cheapest true ceramic core soldering tool with adjustable temperature that I was able to find. It has a great quality, quick starting time, working temperture stabilization and does not overheat your fingers. But it is more expensive than "1)", so you need to decide if "1)" is enough for your projects or you need a better "2)" tool

Soldering tips

If you feel that the soldering tips which came with a soldering tool are too large, or just not satisfied: Hakko soldering station tips are compatible. 900M-T-0.5C is a great choice for soldering the tiny SMD parts, 1P wires and almost everything else:

[*] 10 pcs of 900M-T-0.5C (~$4.53)

[*] 1 pcs of 900M-T-0.5C (~$1.84)

It is more efficient to buy 10 pcs rather than 1, you could resell the extra or gift to friends. There are also a lot of great sets with the different types of tips, like this (see below), but sadly they do not include 900M-T-0.5C :

[*] 10 pcs soldering tips set for Hakko (~$2.89)

Solder, flux and desoldering wire

The diameter and type of solder, as well as type of flux and width of desoldering wire - are the matter of personal preferences, so feel free to research for yourself. I am using this:

[*] 150g big spool of 0.3mm diameter soldering wire, 60 Sn 40 Pb, 1.2% flux (~$5.24)

[*] 5 pcs of RMA-223 10ml famous flux (~$2.20)

[*] 5 pcs of 1.5mm - 3.5mm width desoldering wires, 1.5m length (~$4.89)

1P wires

Copper has 1.65x times better electrical conductivity than aluminium

Many people are using 1P aluminium wires and are happy with them. But this BIOS flashing is very important task, so why settle for less? Here are some 12 strands pure copper 1P wires:

[*] 40 pcs of 20cm copper wires (~$2.25)

[*] 40 * 10 = 400 pcs of 20cm copper wires (~$13.80)

As you see it is possible to get 400 for a price of 200 by buying at bulk, so if you need a long lasting supply or would like to share with friends - it could be a good idea to consider 400 pcs option.

It is recommended that the wires used for BIOS flashing are less than 20 cm length. But 20 cm copper wire would be the same electrical conductivity as 20/1.65 = 12 cm aluminium wire, good enough; and if you still have some problems while flashing - you wouldn't need to shorten a copper wire as much as you would have needed to shorten an aluminium wire

1P pins

Better to buy 800 pins - that is cheaper per pin and would be enough for a long time ;)

[*] 800 pins, gold plated (?) (~$4.34)

[*] 800 pins, copper plated (~$3.70)

Gold is more resistant to corrosion, but copper has 1.4x times better electrical conductivity. Also, these items could be both copper in fact, so you might go for a cheaper option

SOIC8 test clip

There are at least five types of possible options for SOIC8 test clip:

[*] Standard type 1 - clamp only (~$2.15)

[*] Standard type 2 - "cheap and good" (~$2.60)

[*] Standard type 3 - "updated version, updated quality" (~$3.85)

[*] Standard type 4 - "wider gold plated needle" (~$6)

[*] Advanced type - high quality with bent 1.27mm 1P pins (~$9)

Standard types 2/3/4 already have the long and thin aluminium wires attached to them - not good for BIOS flashing. "Advanced type" is more expensive, but it has 1.27mm 1P pins that you could easily connect copper wires to, while for the standard types you will have to solder them.

You could just buy a clamp (standard type 1) if your soldering skills are good - but these pins are too close to each other so it's inconvenient to solder. If not advanced type, it is better to get a standard type 2/3/4 then you cut these aluminium wires leaving about 2 cm part that is soldered to a test clip, then you remove the insulation and solder a copper wire to each of the aluminium wires individually

Shrinking tubes

If you encountered some problems while flashing and want to shorten your 20 cm copper wires to 10cm (by cutting the wire in 3 parts: 6cm + 8cm + 6cm, and soldering two 6cm parts together) electrical insulation is a good idea to prevent a possibility that a soldering joint in the middle of your wire could touch a motherboard (possibly causing a hardware damage by shortening) or a soldering joint of another wire (causing a failed BIOS flashing)

328 pcs packs (5 colors, 8 sizes) are quite a cost effective solution:

[*] 1st example (~$3.42, Malaysian post - slower than Chinese post)

[*] 2nd example (~$4.25, Chinese post)

Multimeter

Multimeter could be useful to test if you soldered good (e.g. copper wires to a test clip) or not. You test this by placing the multimeter probes at the ends (e.g. one probe at the end of 1P wire, another probe at the corresponding pin at SOIC8 test clip) and measuring the resistance - if it is infinity or very high, you need to re-solder. Probably all the multimeters have this function, so you might go for the cheapest options. Price ranges from about ~$2.5 to ~$5 :

[*] Black (~$2.69) or Yellow (~$2.64) DT-830B

[*] DT-832 (~$3.47)

[*] DT-838 (~$4.48)

Multimeter probes

Those probes included with the multimeters are bad quality and also too large - making it difficult to probe the small pins without shortening the neighbour pins. It is advised that you additionally get these precision probes:

[*] Slightly worse precision probes (~$1.89)

[*] Slightly better precision probes (~$2.10)

POST card

In the cases of BIOS failure or a minor hardware malfunction, POST codes could be really helpful to find out why your computer is not booting, at what booting stage it is stuck. You could write down these codes and look them up online or ask knowledgeable people.

Example: incomplete list of coreboot POST codes . Other codes could be found by running

cd ./coreboot/
find . -type f -print0 | xargs -0 grep "post_code"


Many desktop motherboards have a POST display for these codes, but probably there are no laptops with it. If you have a laptop and would like to see its' POST codes, you need to buy a special POST card. For example, the laptops with Compal manufactured motherboard are compatible with this card:

[*] Compal POST diagnostic card (~$10-$15 depending on when you buy)

Alternative CH341A programmer

In a case you would have some problems with Bus Pirate, it is a good idea to have Plan B :

[*] CH341A programmer (~$2.35)

CH341A programmer is very cheap and supported by flashrom since 0.9.9 version

Total expenses

Header 2

Header 3

Header 4