Skip to main content
Topic: Pirate Bus and ASUS laptop bios (Read 21605 times) previous topic - next topic

Pirate Bus and ASUS laptop bios

Hi all, i plan to connect my bricked asus g74sx bios chip to the bus pirate.
Could i please get some advice regarding the setup eg. of cables any other info that would be helpful in this endeavour?
I plan to copy the contents of the bios chip and reflash a fixed bios.
Thank you kindly, Nabs

Re: Pirate Bus and ASUS laptop bios

Reply #1
is an SOIC 8 clip suitable?

Re: Pirate Bus and ASUS laptop bios

Reply #2
Yes, a SOIC8 clip should work. Before you buy, make sure to check whether you need SOIC8 or SOIC8W, i.e. you have to check the chip size and pin-to-pin distance.

Besides that, you should check whether there is still some SPI traffic to the flash chip. The Bus Pirate can sniff, and you should really sniff SPI over an extended period of time (few minutes) before you decide to access the flash chip with the Bus Pirate. If you see SPI activity, you have to stop that somehow (e.g. by keeping the board in reset). It is also advisable to supply power to the board before attaching the Bus Pirate. While a powered board might start sending stuff over SPI, a non-powered board may suck too much current from the Bus Pirate and render the available voltage too low to work with the flash chip.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: Pirate Bus and ASUS laptop bios

Reply #3
Thanks mate!
Sorry for the trouble, how does one 'sniff' with the buspirate? Do I need a separate program?
Cheers

Re: Pirate Bus and ASUS laptop bios

Reply #4
Also, is there a particular way I need to attach the soic 8 clip to the BIOS chip?
Thanks much appreciated, and sorry for all the questions, I'm new to all this :s

Re: Pirate Bus and ASUS laptop bios

Reply #5
Ok i think i've figured out everything i need to know, but there's one problem - getting the bus pirate to be recognised by my windows pc.
The bus pirate lights up, but it is not listed under the Ports section of device manager, neither does a message pop up asking for drivers etc.
Any suggestions for troubleshooting? I'll try buying a new mini usb to usb cable tomorrow, the one i have is 6years old - here's hoping thats the problem here and i won't need to exchange my BP....

Re: Pirate Bus and ASUS laptop bios

Reply #6
Ok so the new cable did the trick!

I've run into a few problems though.
The 1st time i tried reading, i waited over 4hours (literally) and it still didn't finish. I ended up closing command prompt (windows) and disconnecting the bus pirate.

I tried again and i get the following message:
"Found Generiic flash chip "unknown SPI cjip <RDID>" <0 kB, SPI> on buspirate_spi.
===
This flash part has status NOT WORKING for operations: PROBE READ ERASE WRITE"
...etc...

What can i do? Please i really need help! Let me know if you need any more info, thanks so much!

Re: Pirate Bus and ASUS laptop bios

Reply #7
New update!
Tried on a linux pc, i'm trying to resurrect a dead laptop so i used the command:
"flashrom -p internal:laptop=force_I_want_a_brick"
but it doesn't stick, so how can i combine the above with:
"flashrom -r bios_img.bin -p buspirate_spi:dev=/dev/tty8,spispeed=1M"
into 1 line? I can't get the syntax correct, please help!

btw the chip is: W25Q32 (4096 kB, SPI)

Re: Pirate Bus and ASUS laptop bios

Reply #8
Making progress....

Tried the following:
"flashrom -p internal:laptop=force_I_want_a_brick, -Vr bios.img.bin,buspirate_spi:dev=/dev/tty8,spispeed=1M"

Got this message:
"Found Winbond flash chip "W25Q32" (4096 kB, SPI).
This chip may contain one-time programmable memory. flashrom cannot read
and may never be able to write it, hence it may not be able to completely
clone the contents of this chip (see man page for details).
Reading flash... Transaction error!
SSFS: SCIP=0, FDONE=1, FCERR=1, AEL=0
SSFC: SCGO=0, ACS=0, SPOP=0, COP=1, DBC=63, SME=0, SCF=0
Running OPCODE 0x03 failed at address 0x001000 (payload length was 64).
Read operation failed!
FAILED.
Restoring MMIO space at 0x7f50d8d218a0
Restoring MMIO space at 0x7f50d8d2189c
Restoring MMIO space at 0x7f50d8d21898
Restoring MMIO space at 0x7f50d8d21896
Restoring MMIO space at 0x7f50d8d21894
Restoring PCI config space for 00:1f:0 reg 0xdc"

Now what??

Re: Pirate Bus and ASUS laptop bios

Reply #9
Code: [Select]
flashrom -p buspirate_spi:dev=/dev/ttyUSB0 -Vr oldbios.bin
That should do the trick. You may have to try /dev/ttyUSB1 if /dev/ttyUSB0 doesn't work.

NOTE: "-p internal" should only be used if you want to reflash the BIOS flash chip on the mainboard where flashrom is running. Since you want to use the Bus Pirate as programmer, "-p buspirate_spi" is the correct choice.

If you are using a flashrom version older than v0.9.6.1-r1621, please upgrade flashrom to get a reasonable speed out of your Bus Pirate. I have a pending speedup patch for flashrom, but it only works for certain Bus Pirate hardware/firmware versions.
Code: [Select]
flashrom -p buspirate_spi:dev=/dev/ttyUSB0 -V
will spit out some debug info I can use to tell you if the speedup patch would work for you.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.

Re: Pirate Bus and ASUS laptop bios

Reply #10
Thanks for the reply.
Regarding the speed patch.
I'm running bus piratev3.6, bootloaderv4.4, firmwarev6.1 on flashrom-0.9.6.1, i plan to run the BP at 1M, will the patch make a difference?

When i run the command "flashrom -p buspirate_spi:dev=/dev/ttyUSB0 -Vr oldbios.bin"
I get:
"
Found Generic flash chip "unknown SPI chip (RDID)" (0 kB, SPI) on buspirate_spi.
Probing for Generic unknown SPI chip (REMS), 0 kB: probe_spi_rems: id1 0x0, id2 0x0
Found Generic flash chip "unknown SPI chip (RDID)" (0 kB, SPI).
===
This flash part has status NOT WORKING for operations: PROBE READ ERASE WRITE
" etc...


I think i have the wiring incorrect which is why i get that error, i wonder if you could help me as its my first time?
I'm trying to use In-circuit programming with a soldered bios chip using an 'SOIC 8 clip' and it has 8 wires. But the bus pirate has 10 pins.

From another thread, these are the connections i need:
Bus Pirate "MISO" (Pin 1) <----- SPI Device "DO" (Wire/Pin 2)
Bus Pirate "CS" (Pin 2) -----> SPI Device "CS" (Wire/Pin 1)
Bus Pirate "MOSI" (Pin 3) -----> SPI Device "DI" (Wire/Pin 5)
Bus Pirate "CLK" (Pin 4) -----> SPI Device "CLK" (Wire/Pin 6)
Bus Pirate "GND" (Pin 10) <----> SPI Device "GND" (Wire/Pin 4)

It appears to me that GND is pin 10 and that the wires of the SOIC8 clip only contact pins 1-8, so how can this work?

Also, could i just check the layout of the pins on the bus pirate if i'm reading it correctly on BPv3.6:
10  9
8    7
6    5
4    3
2    1

Corresponding to:
GND  3V3
+5V    ADC
VPU  AUX
CLK    MOSI
CS    MISO

Or are the pin numbers read in the opposite direction?
ie
9  10
7  8
5  6
3  4
1  2

Here's an image of my bus pirate if it helps: http://dangerousprototypes.com/wp-conte ... 1-W600.jpg

Your help is much appreciated!

Re: Pirate Bus and ASUS laptop bios

Reply #11
Your pinout looks right to me, not sure about flashrom stuff though, sorry.
Got a question? Please ask in the forum for the fastest answers.

Re: Pirate Bus and ASUS laptop bios

Reply #12
Sorry I'm not sure I understand.
Is it possible to adjust the locations of the wires of the soic clip so they match up with the correct pinouts?
I just dont get how gnd (pin 10) can be connected to the soic clip (only 8 cables which connect to pins 1-8)
there's something I'm missing here i think, could you explain how to use an soic clip in detail, sorry for the trouble, much obliged. Nabs

Re: Pirate Bus and ASUS laptop bios

Reply #13
Just had a Eureka moment.
I think what confused me was the fact that the cables were soldered onto the actual soic clip!
So all I need to do is desolder and resolder them into their correct layouts, or desolder and use alligator clips instead?
Is that right? Cheers, Nabs.

Re: Pirate Bus and ASUS laptop bios

Reply #14
Yes. The big problem is that there is no standard for SPI cables, and the pinout of your SOIC clip cable is apparently not compatible with the Bus Pirate Pinout. If you have a cable with a connector which fits the Bus Pirate connector, you could solder that onto the SOIC clip. Please don't use alligator clips, they have a tendency to mess with the signal.

Please note that we've seen issues with cables longer than 10 cm (4 in), so keeping the cable short is a very good idea. If you use a longer cable, you have to reduce the SPI bus frequency to get stable operation.
If you have any flashrom problems, please mail flashrom@flashrom.org and include "Bus Pirate" in the subject line. As an alternative, you can send me a private message.
It is recommended to use at least flashrom 0.9.2 or later, and latest flashrom from svn if you want a 3x speedup.