Page 1 of 1

SPI Firmware Dumping

Posted: Sat Jul 28, 2018 11:29 am
by adig
Has anyone been successful in using either SPIFlash (https://github.com/devttys0/libmpsse/bl ... piflash.py) or FlashRom to dump the firmware from VoCore2?

I am using Attify Badge https://www.attify-store.com/products/attify-badge-assess-security-of-iot-devices to communicate over SPI with the below pins.

Here are my connections connected directly between VoCore2 and Attify Badge:

GND - GND
CLK - CLK
MOSI - MISO
MISO - MOSI
CS - CS

Are there any other connections that needs to be made in order to get the firmware?

Re: SPI Firmware Dumping

Posted: Mon Jul 30, 2018 12:42 pm
by Vonger
MOSI - MOSI
MISO - MISO
CS0 - CS

CS0 is the SPI chip select, do not use CS1

Also need connect RESET to GND to avoid main chip bootup noise the flash.

Re: SPI Firmware Dumping

Posted: Wed Oct 17, 2018 12:35 pm
by bedi
I have tried with similar connection with attify badge but I am getting this error
Traceback (most recent call last):
File "spiflash.py", line 233, in <module>
main()
File "spiflash.py", line 174, in main
spi = SPIFlash(freq)
File "spiflash.py", line 25, in __init__
self.flash = MPSSE(SPI0, speed, MSB)
File "/home/attify/.local/lib/python2.7/site-packages/mpsse.py", line 70, in __init__
raise Exception, self.ErrorString()
Exception: device not found

Re: SPI Firmware Dumping

Posted: Thu Oct 18, 2018 3:59 pm
by Vonger
For simple, you can dump flash by "cp /dev/mtd0 /tmp/" and use scp or other command get it to your hard disk.

You will need mtd0 , mtd1, mtd2 ,mtd3, then combine them into one file, you get the flash.

root@OpenWrt:/tmp# cat /proc/mtd
dev: size erasesize name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 00fb0000 00010000 "firmware"
mtd4: 0017cc86 00010000 "kernel"
mtd5: 00e3337a 00010000 "rootfs"
mtd6: 00bd0000 00010000 "rootfs_data"