I have a Banana Pi M1 and wanted to flash libreboot on a ThinkPad T400. I followed Raspberry Pi (ThinkPad X200), as RPi's GPIO pins are almost the same as BPi's and T400's chip is the same as X200. The only problem is that when it comes to flash the device, it doesn't appear
$ flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512 --chip MX25L6405D -r romread1.rom flashrom v0.9.9-r1955 on Linux 4.10.9-gnu-1 (armv7l) flashrom is free software, get the source code at https://flashrom.org Calibrating delay loop... OK. linux_spi_init: failed to open /dev/spidev0.0: No such file or directory Error: Programmer initialization failed.
Of course, if the devices /dev/spidev* do not exist!!
$ ls /dev/spidev* ls: cannot access '/dev/spidev*': No such file or directory $ lsmod|grep spi spidev 7364 0 spi_sun4i 4955 0
I've tried everything: loading spidev, spi-gpio, spi_sun4i kernels modules, different pinouts, etc. Maybe I've not got the right pinout? /dev/spidev* devices show up if there's nothing connected to the GPIO pins? how can I test them with sth. easier?
In almost all of the problems, people solve it by editing /boot/config.txt but that's only for RPi afaik. Anyways, the kernel I've installed in it does not have that file.
SoC: Allwinner A20
OS: Parabola GNU/Linux-libre (Arch Linux and ALARM based, without proprietary software packages)
BPi's GPIO pins: https://bananapi.gitbooks.io/bpi-m1/content/en/Banana-Pi-GIPO.png
More specs: https://bananapi.gitbooks.io/bpi-m1/en/
EDIT: There are some devices in /dev which look like sth. near to /dev/spidev* devices:
/dev/gpiochip0 /dev/gpiochip1 /dev/hidraw0 /dev/hidraw1 /dev/iio:device0 /dev/iio:device1
I say "near" because flashrom says:
# flashrom -p linux_spi:dev=/dev/gpiochip0 flashrom v0.9.9-r1955 on Linux 4.13.5-gnu-1 (armv7l) flashrom is free software, get the source code at https://flashrom.org Calibrating delay loop... OK. linux_spi_init: failed to set SPI mode to 0x00: Invalid argument Error: Programmer initialization failed.
For all those devices it says
Invalid argument with whatever I put in "spispeed" (better than
Inappropriate ioctl for device). I suspect that
/dev/gpiochip0 might be the chip? However, if it is, IDK how to solve the problem of "Invalid argument"