Using flashrom on PineA64(+)
#1
Hey guys, wasn't sure exactly where to post this, but I suppose it is an Armbian on PineA64(+) issue?

I'm trying to use my PINEA64 as a chip flasher to install coreboot on the ROM chip of my Thinkpad X220, as of these guides:

https://tylercipriani.com/blog/2016/11/1...pberry-pi/

https://karlcordes.com/coreboot-x220/

These guides use a Raspberry Pi with Raspbian however. I'm using the PineA64+ with 2GB RAM with Armbian buster (Linux 5.4.43-sunxi64)

Although flashrom successfully recognises the chip

Code:
sudo flashrom -p linux_spi:dev=/dev/spidev0.0

flashrom  on Linux 5.4.43-sunxi64 (aarch64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Macronix flash chip "MX25L6405" (8192 kB, SPI) on linux_spi.
Found Macronix flash chip "MX25L6405D" (8192 kB, SPI) on linux_spi.
Found Macronix flash chip "MX25L6406E/MX25L6408E" (8192 kB, SPI) on linux_spi.
Found Macronix flash chip "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E" (8192 kB, SPI) on linux_spi.
Multiple flash chip definitions match the detected chip(s): "MX25L6405", "MX25L6405D", "MX25L6406E/MX25L6408E", "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E"
Please specify which chip definition to use with the -c <chipname> option.

It fails to read:

Code:
sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -c MX25L6405 -r read01.bin
flashrom  on Linux 5.4.43-sunxi64 (aarch64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Macronix flash chip "MX25L6405" (8192 kB, SPI) on linux_spi.
Reading flash... linux_spi_send_command: ioctl: Connection timed out
Read operation failed!
FAILED.

I initially added this to /boot/armbianEnv.txt to get the SPI interface to work. (previously there was no /dev/spidev0.0 )

Code:
overlays=spi-spidev
param_spidev_spi_bus=0

The guide stated to do:

Code:
sudo modprobe spi_bcm2835

Which does not exist, so I loaded every module beginning with 'spi' into /etc/modules just to be sure.

I'm using the pinout here to connect the PI-2 interface: http://files.pine64.org/doc/Pine%20A64%2...160119.pdf

I don't really know where to go next in terms of troubleshooting.

Last night I disconnected all the jumpers and set it up again today from scratch with a totally different set of jumpers. I would imagine bad pinout\connections would stop it from recognising the chips also?

I'm using the Debian packaged version of flashrom, I didn't build it from source, in case that's relevant (as I'm having issues getting svn to work)

EDIT: Success! As soon as I posted this thread, I was like "Hmm, maybe I should actually try compiling flashrom from source, that'd be pretty dumb if that was the problem". Compiling flashrom from source fixed the problem and I have got successful reads.

For anyone reading googling this what I did was
Quote:
Code:
sudo mkdir flashrom && cd flashrom
sudo git clone https://github.com/flashrom/flashrom.git
cd flashrom
sudo make
sudo make install

I got a heap of errors but it worked fine.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PineA64+ Armbian not boot, black screen and log klode 3 1,475 10-14-2018, 04:02 AM
Last Post: evilbunny

Forum Jump:


Users browsing this thread: 1 Guest(s)