Pirate Bus and ASUS laptop bios

Bus Pirate support for the Flashrom project

Pirate Bus and ASUS laptop bios

Postby nbssss » Mon Oct 29, 2012 12:22 am

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
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Mon Oct 29, 2012 5:52 pm

is an SOIC 8 clip suitable?
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby biosflasher » Thu Nov 01, 2012 8:17 pm

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.
biosflasher
Full Member
Full Member
 
Posts: 118
Joined: Mon Nov 16, 2009 7:14 pm

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Wed Nov 21, 2012 9:37 pm

Thanks mate!
Sorry for the trouble, how does one 'sniff' with the buspirate? Do I need a separate program?
Cheers
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Thu Nov 22, 2012 12:21 pm

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
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Sun Dec 02, 2012 7:15 pm

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....
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Tue Dec 04, 2012 6:01 am

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!
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Tue Dec 04, 2012 6:45 am

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)
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Tue Dec 04, 2012 8:38 am

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??
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby biosflasher » Tue Dec 04, 2012 4:42 pm

Code: Select all
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 all
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.
biosflasher
Full Member
Full Member
 
Posts: 118
Joined: Mon Nov 16, 2009 7:14 pm

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Wed Dec 05, 2012 12:49 am

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!
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby ian » Wed Dec 05, 2012 1:23 am

Your pinout looks right to me, not sure about flashrom stuff though, sorry.
User avatar
ian
Crew
Crew
 
Posts: 10571
Joined: Mon Jul 06, 2009 6:14 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Wed Dec 05, 2012 7:22 am

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
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby nbssss » Wed Dec 05, 2012 7:43 am

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.
nbssss
Newbie
Newbie
 
Posts: 16
Joined: Mon Oct 29, 2012 12:11 am

Re: Pirate Bus and ASUS laptop bios

Postby biosflasher » Wed Dec 05, 2012 5:10 pm

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.
biosflasher
Full Member
Full Member
 
Posts: 118
Joined: Mon Nov 16, 2009 7:14 pm

Next

Return to Flashrom