Trouble reading the flash chip


Rendering Error in layout Widget/Social: Call to a member function exists() on null. Please enable debug mode for more information.
More
7 years 10 months ago - 7 years 10 months ago #3822 by DuHasst0
I have a Mac Mini a1347 EMC 2442, trying to read the firmware flash n25q064a
chip. I have everything wired up the way it is posted from the How to Hack Apple
EFI Blog post, yet i get this error when trying to read the chip.


pi@raspberrypi:~ $ sudo flashrom -r ~/efi/read1.bin -V -p liunx_spi:dev=dev/spidev0.0
flashrom v0.9.9-unknown on Linux 4.4.13+ (armv6l)
flashrom is free software, get the source code at flashrom.org

Error: Unknown programmer "liunx_spi:dev=dev/spidev0.0". Valid choices are:
internal, dummy, gfxnvidia, drkaiser, satasii, atavia, it8212, ft2232_spi,
serprog, buspirate_spi, dediprog, pony_spi, nicintel, nicintel_spi,
nicintel_eeprom, ogp_spi, linux_spi, usbblaster_spi, pickit2_spi, ch341a_spi.
Please run "flashrom --help" for usage info.


and this


pi@raspberrypi:~ $ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 flashrom v0.9.9-unknown on Linux 4.4.13+ (armv6l)
flashrom is free software, get the source code at flashrom.org

Calibrating delay loop... delay loop is unreliable, trying to continue OK.
Found Micron/Numonyx/ST flash chip "N25Q064..3E" (8192 kB, SPI) on linux_spi.
No operations were specified.


Right now I have the logic board out plugged into the power supply and the cord to the wall is
also plugged in. I did have an issued with a usb library needing reinstalled for the header info
but flashrom compiled just fine after. I can't seem to find this any where so I was just seeing
if you guys could help out. If not I guess I will have to find a flash chip.

Thanks
John
Last edit: 7 years 10 months ago by DuHasst0.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3823 by CygnusX1
Did you turn on the "SPI" in the Raspberry config? Are you running the command from the Flashrom dir?

If I helped you buy me a latte!

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3844 by DuHasst0
Yes I have SPI turned on, and I have installed flash rom via make and make install, so it should be able to be ran from the shell at any time.

I'm pretty sure I'm not missing anything.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3846 by CygnusX1

DuHasst0 wrote: Yes I have SPI turned on, and I have installed flash rom via make and make install, so it should be able to be ran from the shell at any time.

I'm pretty sure I'm not missing anything.


What programmer are you using? Are your wires less then 10cm? What clip are you using? What is the voltage and amp's of the power supply?

If I helped you buy me a latte!

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #3847 by DuHasst0

CygnusX1 wrote:

DuHasst0 wrote: Yes I have SPI turned on, and I have installed flash rom via make and make install, so it should be able to be ran from the shell at any time.

I'm pretty sure I'm not missing anything.


What programmer are you using? Are your wires less then 10cm? What clip are you using? What is the voltage and amp's of the power supply?


I am using a raspberry pi as the device.

Should all wires be 10cm or less? I tried first with all of the 5cm and was getting errors about there being no flash chip
so I made 2 wires 8cm for the input and output of the chip.

No clip, directly soldered to the chip.

The power to the pi is a 2 amp 5v Samsung Note4 phone charger, and the logic board should be getting a 5v standby from the
minis powers supply unless it doesn't work that way on this mini.

EDIT: I am in chat as well if anyeone is able to help quicker.
Last edit: 7 years 10 months ago by DuHasst0.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3851 by DuHasst0
Ok CygnusX1 and I talked over chat. Seems I had the command off a bit.

flashrom -r ~/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c "N25Q064..3E"

is what I should have been using. So karma +1, and when I can I will buy a round of "coffee" or "beer" to the gang.


pi@raspberrypi:~/flashrom $ sudo flashrom -r ~/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c "N25Q064..3E"
flashrom v0.9.9-unknown on Linux 4.4.13+ (armv6l)
flashrom is free software, get the source code at flashrom.org

flashrom was built with libpci 3.2.1, GCC 4.9.2, little endian
Command line (7 args): flashrom -r /home/pi/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c N25Q064..3E
Calibrating delay loop... OS timer resolution is 3 usecs, 198M loops per second, delay more than 10% too short (got 85% of expected delay), recalculating... 198M loops per second, delay more than 10% too short (got 87% of expected delay), recalculating... 198M loops per second, delay more than 10% too short (got 86% of expected delay), recalculating... 198M loops per second, delay more than 10% too short (got 86% of expected delay), recalculating... 199M loops per second, delay loop is unreliable, trying to continue 10 myus = 12 us, 100 myus = 104 us, 1000 myus = 1208 us, 10000 myus = 10358 us, 12 myus = 14 us, OK.
Initializing linux_spi programmer
Using device /dev/spidev0.0
The following protocols are supported: SPI.
Probing for Micron/Numonyx/ST N25Q064..3E, 8192 kB: probe_spi_rdid_generic: id1 0x20, id2 0xba17
Found Micron/Numonyx/ST flash chip "N25Q064..3E" (8192 kB, SPI) on linux_spi.
Chip status register is 0x00.
Chip status register: Status Register Write Disable (SRWD, SRP, ...) is not set
Chip status register: Block Protect 3 (BP3) is not set
Chip status register: Top/Bottom (TB) is top
Chip status register: Block Protect 2 (BP2) is not set
Chip status register: Block Protect 1 (BP1) is not set
Chip status register: Block Protect 0 (BP0) is not set
Chip status register: Write Enable Latch (WEL) is not set
Chip status register: Write In Progress (WIP/BUSY) is not set
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... done.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3852 by DuHasst0
Here is the dump of the flash chip.



File Attachment:

File Name: read1.zip
File Size:3,900 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3853 by darknezz19
Nice DuHasst0. I got mine as well, finally.

Had a bit of a scare though As I soldered mine too and tied /WP to ground just to ensure no accidental flashing or erasure could happen. Thought at first i needed to plug magsafe in because it wouldn't find the chip and it kicked on, and of a few times before I realized what it was.

Ground was of course crossing into imac 3.3v because of the /WP being on ground. YEaoch!

At this point also regularized I was using a different chip than the one on this board. I tried it first on a donor board to make sure it would work okay. Anyway after fixing that got 3 dumps and all 3 passed md5sum, and they had the serial in the hex.

Took the spi wires off to make sure it would still boot and nothing got hammered with a short. She still turns on, phew. Going to sleep soon'ish and hopefully can finish up tomorrow, I need a fresh head><

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #3854 by DuHasst0
Hey man you got this, especially if you can tell the serial in the file. I am actually
typing this in on the mac mini I just got working.

So I want to thank everyone who has put forth effort in this cause, especially THAGhost.
Without this website I would have gotten burned on craigslist.

Also, Thanks to CygnusX1 for the hands on help over the very nice chat system installed
as part of these forums, with in mins of talking we got the data needed and everything
was ready to go, just needed to uninstall my wires, rebuild the unit, clear PRAM and turn
this thing on. I had already deleted the .AppleSetupDone file before hand. Originally I had
been beating my head against a wall trying to figure out why single user was not working.
I even flashed a usb stick with kali linux to get into the drive and delete the file. When that
wasn't working I didn't know what to do. So started thinking. Well asked a friend and he said
it had a firmware password and without it I was SOL. Then I found this site and bam, here we
are. Thanks again guys and when I get caught up with life I will buy some "coffee" and "beer".

John
The following user(s) said Thank You: darknezz19

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #4608 by poppadopp
I'm also having trouble and do not know what to do next. I have tried different commands and I'm still getting nothing. Please Help!

pi@raspberrypi:~/flashrom $ flashrom -r /efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -cN25Q064..3E
flashrom v0.9.9-unknown on Linux 4.4.13-v7+ (armv7l)
flashrom is free software, get the source code at flashrom.org

flashrom was built with libpci 3.2.1, GCC 4.9.2, little endian
Command line (6 args): flashrom -r /efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -cN25Q064..3E
Calibrating delay loop... OS timer resolution is 2 usecs, 597M loops per second, 10 myus = 10 us, 100 myus = 101 us, 1000 myus = 1001 us, 10000 myus = 10135 us, 8 myus = 9 us, OK.
Initializing linux_spi programmer
Using device /dev/spidev0.0
The following protocols are supported: SPI.
Probing for Micron/Numonyx/ST N25Q064..3E, 8192 kB: probe_spi_rdid_generic: id1 0x20, id2 0xba17
Found Micron/Numonyx/ST flash chip "N25Q064..3E" (8192 kB, SPI) on linux_spi.
Chip status register is 0x00.
Chip status register: Status Register Write Disable (SRWD, SRP, ...) is not set
Chip status register: Block Protect 3 (BP3) is not set
Chip status register: Top/Bottom (TB) is top
Chip status register: Block Protect 2 (BP2) is not set
Chip status register: Block Protect 1 (BP1) is not set
Chip status register: Block Protect 0 (BP0) is not set
Chip status register: Write Enable Latch (WEL) is not set
Chip status register: Write In Progress (WIP/BUSY) is not set
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... Error: opening file "/efi/read1.bin" failed: Permission denied
FAILED.
pi@raspberrypi:~/flashrom $

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago - 7 years 7 months ago #4609 by DuHasst0
You don't have the chip in write enabled mode. Make sure you have the WE pin attached to the correct spot. I can't remember if it needs to be shorted to ground or if it needs 3.3v, that can be verified by looking thru a tutorial again or waiting for a mod to help, as I really can't since I'm at work.

John


Edit, looked closer, you might need to change the directory in which you are saving your file. It's not saving it because you dont have permission to write to the folder you have chosen, use the ~ character before the /efi/flash.bin so that it reads ~/efi/flash.bin. the it will be in your home directory.

Sorry like I said at work.

John
Last edit: 7 years 7 months ago by DuHasst0. Reason: Reread post, gave bad info

Please Log in or Create an account to join the conversation.

Who's Online

We have 249 guests and no members online

N00BZ

  • ljamal
  • ljamal74
  • mikeg2atest
  • ducchinhbui
  • anjarezt

Cookies