I stumbled across this thread after having the same issues described by @Alex0220
. I flashed the wrong firmware and neither yaflash or socflash wouldt work. I very nearly bought a second module, but in the end I did manage to fix my issue using a Raspberry Pi that I had lying around. I'll post it here in case anyone else stumbles across it, but it's not the easiest thing to do. Unless you have experience with electronics, this is a 'try this if you have nothing else to lose' kind of job. You could easily fry the module by connecting it wrong.
The ASMB9 module that Asus sells is actually nothing more than a bog-standard 32k SPI flash chip, soldered onto a pcb with a keyed 2mm female pin header. The ".ima" firmware file is also 32k long and simply contains what needs to be flashed onto the chip, minus some persistent data such as MAC address and various persistent config variables. Nothing is encrypted or modified in any way.
I buzzed the pin header connections through to the chip with my multimeter and worked out which header pin connected to which pin on the chip. From that I was able to produce a pinout as below. This pinout has the 2mm header pointing upwards (i.e the module is upside down compared to where it would sit on the motherboard)
, and with the header connector on the right
N/C □ □ GND
N/C □ □ GND
N/C □ □ WP
CLK □ □ N/C
DO □ □ N/C
CS □ ■ KEY - no hole here
3.3v □ □ DI
Looking at the Raspberry Pi pinout
, connect the pins as follows:
3.3v <=> 3v3 Power
GND <=> Ground (only one is necessary)
CLK <=> SPI0 SCLK (GPIO 11)
CS <=> SPI0 CE0 (GPIO 8)
DO <=> SPI0 MISO (GPIO 9)
DI <=> SPI0 MOSI (GPIO10)
WP <=> Don't connect anywhere
You then can power the Pi and check that the led on the ASMB9 lights up, indicating that the power leads were connected correctly. If it doesn't light up, pull the plug and re-check your connections. It's likely that other connections are wrong too.
Once booted into the Raspberry Pi, you need a utility called "flashrom". It can be installed from the command line using
sudo apt update
sudo apt install flashrom
, but the version it installed was too old for me to flash this chip with. Depending on how old this post is, you might be able to simply install it and skip building it from source.
To build the latest version from source you need to run the following commands (from memory, apologies if there are mistakes)
sudo apt update
sudo apt remove flashrom
sudo apt install build-essential git libusb-1.0-0-dev libpci-dev libftdi-dev
git clone https://github.com/flashrom/flashrom.git
sudo make install
Ensure you have the correct kernel modules loaded:
sudo modprobe spi_bcm2835
sudo modprobe spidev
Check that everything is connected correctly:
sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=1000
If the above command fails, check your connections. If it works, backup your current firmware:
sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=1000 -r backup.ima
Flash the new firmware to the chip:
sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=1000 -w <new_fw_file>.ima
The process takes about 15 minutes. Once it's done, you still need to write the MAC addresses back into the chip as described by @Rand_ . In my case, the MAC address was printed on a sticker on the module itself. The second MAC address was identical to the first, but with 1 added to the final byte (1st MAC ended :FE, 2nd MAC ended :FF).
I hope that this is helpful to someone.