Hello!
Do you have any idea why our flashrom v0.9.9 won't accept ft2232_spi as a programmer?
We want to use flashrom for our ft2232_spi devices and the website flashrom.org/Flashrom/0.9.9/Supported_Hardware claims that flashrom v0.9.9 supports ft2232_spi. However, for some reason it just won't accept ft2232_spi as a programmer:
- flashrom -p ft2232_spi flashrom v0.9.9-rc1-r1942 on Linux 4.15.0-45-generic (i686) flashrom is free software, get the source code at https://flashrom.org
Error: Unknown programmer "ft2232_spi". Valid choices are: internal, dummy, nic3com, nicrealtek, gfxnvidia, drkaiser, satasii, atavia, it8212, serprog, buspirate_spi, dediprog, rayer_spi, pony_spi, nicintel, nicintel_spi, nicintel_eeprom, ogp_spi, satamv, linux_spi, pickit2_spi, ch341a_spi. Please run "flashrom --help" for usage info.
Surprisingly, even the man page claims that ft2232_spi is supported:
- man flashrom ... -p, --programmer <name>[:parameter[,parameter[,parameter]]] Specify the programmer device. This is mandatory for all operations involving any chip access (probe/read/write/...). Currently supported are: ... * ft2232_spi (for SPI flash ROMs attached to an FT2232/FT4232H/FT232H family based USB SPI programmer), including the DLP Design DLP-USB1232H, FTDI FT2232H Mini-Module, FTDI FT4232H Mini-Module, openbiosprog-spi, Amontec JTAGkey/JTAGkey-tiny/JTAGkey-2, Dangerous Prototypes Bus Blaster, Olimex ARM-USB-TINY/-H, Olimex ARM-USB-OCD/-H, TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA), TUMPA Lite, GOEPEL PicoTAP and Google Servo v1/v2. ...
This is how we installed it: - sudo apt install flashrom Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: flashrom 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 169 kB of archives. After this operation, 868 kB of additional disk space will be used. Get:1 http://ch.archive.ubuntu.com/ubuntu xenial/universe i386 flashrom i386 0.9.9~rc1+r1942-1 [169 kB] Fetched 169 kB in 0s (1'116 kB/s) Selecting previously unselected package flashrom. (Reading database ... 165415 files and directories currently installed.) Preparing to unpack .../flashrom_0.9.9~rc1+r1942-1_i386.deb ... Unpacking flashrom (0.9.9~rc1+r1942-1) ... Processing triggers for man-db (2.7.5-1) ... Setting up flashrom (0.9.9~rc1+r1942-1) ...
This is our system: - cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS" - uname -m i686
We don't understand why our flashrom won't accept ft2232_spi or how to proceed. And would appreciate any assistance, if you have the resources to assist or even just point us in the right direction here we can fix this ourselves.
Freundliche Grüsse | Best regards, Michael Leukert | Software Developer R&D-ES
Direct +41 58 710 4469 michael.leukert@ampegon.com
Ampegon Power Electronics AG Kreuzweg 11 | 5400 Baden, Switzerland Tel.+ 41 58 710 44 00 | Fax +41 58 710 44 01 info@ampegon.com | ampegon.com
MWST Nr. CHE-310.342.455 MWST | UID: CHE-310.342.455
Follow Ampegon's latest news online via our websitehttps://ampegon.com/news/ or LinkedInhttps://ch.linkedin.com/company/ampegon group
Hello Michael,
On 05.07.21 18:54, Michael Leukert - AMPEGON wrote:
Do you have any idea why our flashrom v0.9.9 won't accept ft2232_spi as a programmer?
flashrom's build process is quite flexible. It's very likely that this Ubuntu package was simply build without FTDI support.
Surprisingly, even the man page claims that ft2232_spi is supported:
Alas, the manpage is not automatically adapted to the build options.
You can build flashrom from source, here are some hints[1]. Basically, after installing the mentioned prerequisites, you download the flashrom source
$ git clone https://review.coreboot.org/flashrom.git
and build it with
$ cd flashrom $ make
If you want to install it, also
$ sudo make install
If you don't install it, you'll have to always specify the path to the program, e.g.
$ ./flashrom -p ...
or
$ ~/flashrom/flashrom -p ...
Hope that helps, Nico
Hello Nico
Thank you for your assistance and the useful hints at your link (https://flashrom.org/Downloads). After some struggles with the prerequisites, we were finally able to install it from source (with FTDI support), and our program is now working.
I don't have a lot of experience with package managers, but it seems to me that we had to recursively uninstall and reinstall an unreasonably large number of packages by hand in order to satisfy the exact version requirements for each prerequisite of flashrom. In fact we destroyed our ubuntu installation several times and had to restore from image before finding our way through the recursive mess of dependencies to a working solution.
I specifically want to mention that it was actually impossible without manipulating one of the packages' recursive dependencies: libudev-dev (required by direct dependency libpci-dev). We literally had to unpack libudev-dev_229-4ubuntu21.27_i386.deb, manually edit the dependency version for libudev1 in the control file, and then re-pack it as a .deb file (see "My guess is..." and " This works, and probably..." at https://askubuntu.com/questions/779300/cant-install-libudev-dev-on-ubuntu-16...). It was simply impossible without manipulating this dependency. Is this normal? Or even safe? If yes on both questions, would it make sense to place a hint about this at https://flashrom.org/Downloads ?
In any case, thank you for providing this excellent software and the prompt support!
Cheers from Switzerland
Michael
-----Ursprüngliche Nachricht----- Von: Nico Huber nico.h@gmx.de Gesendet: Donnerstag, 8. Juli 2021 17:30 An: Michael Leukert - AMPEGON Michael.Leukert@ampegon.com; flashrom@flashrom.org Betreff: Re: [flashrom] Unknown programmer "ft2232_spi"
Hello Michael,
On 05.07.21 18:54, Michael Leukert - AMPEGON wrote:
Do you have any idea why our flashrom v0.9.9 won't accept ft2232_spi as a programmer?
flashrom's build process is quite flexible. It's very likely that this Ubuntu package was simply build without FTDI support.
Surprisingly, even the man page claims that ft2232_spi is supported:
Alas, the manpage is not automatically adapted to the build options.
You can build flashrom from source, here are some hints[1]. Basically, after installing the mentioned prerequisites, you download the flashrom source
$ git clone https://review.coreboot.org/flashrom.git
and build it with
$ cd flashrom $ make
If you want to install it, also
$ sudo make install
If you don't install it, you'll have to always specify the path to the program, e.g.
$ ./flashrom -p ...
or
$ ~/flashrom/flashrom -p ...
Hope that helps, Nico
Hi Michael,
Last time I set up environment to build flashrom, I installed all these in order:
pciutils libpci-dev libusb-dev libusb-1.0-0-dev libjaylink0 libjaylink-dev cmake libftdi1-dev
I haven’t flashed anything with ft2232_spi (however this programmer builds), maybe not entirely relevant to you? But this is sufficient to have the choice of ft2232_spi, as I can see:
-p | --programmer <name>[:<param>] specify the programmer device. One of internal, dummy, mec1308, nic3com, nicrealtek, nicnatsemi, gfxnvidia, raiden_debug_spi, drkaiser, satasii, atahpt, atavia, atapromise, it8212, ft2232_spi, serprog, buspirate_spi, dediprog, developerbox, ene_lpc, rayer_spi, pony_spi, nicintel, nicintel_spi, nicintel_eeprom, ogp_spi, satamv, linux_mtd, linux_spi, lspcon_i2c_spi, realtek_mst_i2c_spi, usbblaster_spi, mstarddc_spi, pickit2_spi, ch341a_spi, digilent_spi, jlink_spi, stlinkv3_spi.
Manually editing dependency in control file, wow this is so cool! I wouldn’t be able to do such a thing by myself. So I was looking for a sequence of packages that works.
Anastasia.
On Wed, Jul 14, 2021 at 2:03 AM Michael Leukert - AMPEGON < Michael.Leukert@ampegon.com> wrote:
Hello Nico
Thank you for your assistance and the useful hints at your link ( https://flashrom.org/Downloads). After some struggles with the prerequisites, we were finally able to install it from source (with FTDI support), and our program is now working.
I don't have a lot of experience with package managers, but it seems to me that we had to recursively uninstall and reinstall an unreasonably large number of packages by hand in order to satisfy the exact version requirements for each prerequisite of flashrom. In fact we destroyed our ubuntu installation several times and had to restore from image before finding our way through the recursive mess of dependencies to a working solution.
I specifically want to mention that it was actually impossible without manipulating one of the packages' recursive dependencies: libudev-dev (required by direct dependency libpci-dev). We literally had to unpack libudev-dev_229-4ubuntu21.27_i386.deb, manually edit the dependency version for libudev1 in the control file, and then re-pack it as a .deb file (see "My guess is..." and " This works, and probably..." at https://askubuntu.com/questions/779300/cant-install-libudev-dev-on-ubuntu-16...). It was simply impossible without manipulating this dependency. Is this normal? Or even safe? If yes on both questions, would it make sense to place a hint about this at https://flashrom.org/Downloads ?
In any case, thank you for providing this excellent software and the prompt support!
Cheers from Switzerland
Michael
-----Ursprüngliche Nachricht----- Von: Nico Huber nico.h@gmx.de Gesendet: Donnerstag, 8. Juli 2021 17:30 An: Michael Leukert - AMPEGON Michael.Leukert@ampegon.com; flashrom@flashrom.org Betreff: Re: [flashrom] Unknown programmer "ft2232_spi"
Hello Michael,
On 05.07.21 18:54, Michael Leukert - AMPEGON wrote:
Do you have any idea why our flashrom v0.9.9 won't accept ft2232_spi as
a programmer?
flashrom's build process is quite flexible. It's very likely that this Ubuntu package was simply build without FTDI support.
Surprisingly, even the man page claims that ft2232_spi is supported:
Alas, the manpage is not automatically adapted to the build options.
You can build flashrom from source, here are some hints[1]. Basically, after installing the mentioned prerequisites, you download the flashrom source
$ git clone https://review.coreboot.org/flashrom.git
and build it with
$ cd flashrom $ make
If you want to install it, also
$ sudo make install
If you don't install it, you'll have to always specify the path to the program, e.g.
$ ./flashrom -p ...
or
$ ~/flashrom/flashrom -p ...
Hope that helps, Nico
[1] https://flashrom.org/Download _______________________________________________ flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
Hi Anastasia
Ok, please just be aware that I have very little experience and no clue if it is safe to change the dependencies the way I did. It seems to be working fine so far, will let you know if it runs into problems.
Thank you for your support! Michael
Von: Anastasia Klimchuk aklm@chromium.org Gesendet: Mittwoch, 14. Juli 2021 11:47 An: Michael Leukert - AMPEGON Michael.Leukert@ampegon.com Cc: Nico Huber nico.h@gmx.de; flashrom@flashrom.org Betreff: Re: [flashrom] Re: Unknown programmer "ft2232_spi"
Hi Michael,
Last time I set up environment to build flashrom, I installed all these in order:
pciutils libpci-dev libusb-dev libusb-1.0-0-dev libjaylink0 libjaylink-dev cmake libftdi1-dev
I haven’t flashed anything with ft2232_spi (however this programmer builds), maybe not entirely relevant to you? But this is sufficient to have the choice of ft2232_spi, as I can see:
-p | --programmer <name>[:<param>] specify the programmer device. One of internal, dummy, mec1308, nic3com, nicrealtek, nicnatsemi, gfxnvidia, raiden_debug_spi, drkaiser, satasii, atahpt, atavia, atapromise, it8212, ft2232_spi, serprog, buspirate_spi, dediprog, developerbox, ene_lpc, rayer_spi, pony_spi, nicintel, nicintel_spi, nicintel_eeprom, ogp_spi, satamv, linux_mtd, linux_spi, lspcon_i2c_spi, realtek_mst_i2c_spi, usbblaster_spi, mstarddc_spi, pickit2_spi, ch341a_spi, digilent_spi, jlink_spi, stlinkv3_spi.
Manually editing dependency in control file, wow this is so cool! I wouldn’t be able to do such a thing by myself. So I was looking for a sequence of packages that works.
Anastasia.
On Wed, Jul 14, 2021 at 2:03 AM Michael Leukert - AMPEGON <Michael.Leukert@ampegon.commailto:Michael.Leukert@ampegon.com> wrote: Hello Nico
Thank you for your assistance and the useful hints at your link (https://flashrom.org/Downloads). After some struggles with the prerequisites, we were finally able to install it from source (with FTDI support), and our program is now working.
I don't have a lot of experience with package managers, but it seems to me that we had to recursively uninstall and reinstall an unreasonably large number of packages by hand in order to satisfy the exact version requirements for each prerequisite of flashrom. In fact we destroyed our ubuntu installation several times and had to restore from image before finding our way through the recursive mess of dependencies to a working solution.
I specifically want to mention that it was actually impossible without manipulating one of the packages' recursive dependencies: libudev-dev (required by direct dependency libpci-dev). We literally had to unpack libudev-dev_229-4ubuntu21.27_i386.deb, manually edit the dependency version for libudev1 in the control file, and then re-pack it as a .deb file (see "My guess is..." and " This works, and probably..." at https://askubuntu.com/questions/779300/cant-install-libudev-dev-on-ubuntu-16...). It was simply impossible without manipulating this dependency. Is this normal? Or even safe? If yes on both questions, would it make sense to place a hint about this at https://flashrom.org/Downloads ?
In any case, thank you for providing this excellent software and the prompt support!
Cheers from Switzerland
Michael
-----Ursprüngliche Nachricht----- Von: Nico Huber <nico.h@gmx.demailto:nico.h@gmx.de> Gesendet: Donnerstag, 8. Juli 2021 17:30 An: Michael Leukert - AMPEGON <Michael.Leukert@ampegon.commailto:Michael.Leukert@ampegon.com>; flashrom@flashrom.orgmailto:flashrom@flashrom.org Betreff: Re: [flashrom] Unknown programmer "ft2232_spi"
Hello Michael,
On 05.07.21 18:54, Michael Leukert - AMPEGON wrote:
Do you have any idea why our flashrom v0.9.9 won't accept ft2232_spi as a programmer?
flashrom's build process is quite flexible. It's very likely that this Ubuntu package was simply build without FTDI support.
Surprisingly, even the man page claims that ft2232_spi is supported:
Alas, the manpage is not automatically adapted to the build options.
You can build flashrom from source, here are some hints[1]. Basically, after installing the mentioned prerequisites, you download the flashrom source
$ git clone https://review.coreboot.org/flashrom.git
and build it with
$ cd flashrom $ make
If you want to install it, also
$ sudo make install
If you don't install it, you'll have to always specify the path to the program, e.g.
$ ./flashrom -p ...
or
$ ~/flashrom/flashrom -p ...
Hope that helps, Nico
[1] https://flashrom.org/Download _______________________________________________ flashrom mailing list -- flashrom@flashrom.orgmailto:flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.orgmailto:flashrom-leave@flashrom.org
Hi Michael,
On 13.07.21 09:06, Michael Leukert - AMPEGON wrote:
Thank you for your assistance and the useful hints at your link (https://flashrom.org/Downloads). After some struggles with the prerequisites, we were finally able to install it from source (with FTDI support), and our program is now working.
grats! :)
I don't have a lot of experience with package managers, but it seems to me that we had to recursively uninstall and reinstall an unreasonably large number of packages by hand in order to satisfy the exact version requirements for each prerequisite of flashrom. In fact we destroyed our ubuntu installation several times and had to restore from image before finding our way through the recursive mess of dependencies to a working solution.
wow, that seems odd. It's very unusual. I guess your Ubuntu was either not in a very original state (e.g. non-default package repositories) or in a very unlucky state. Or maybe you did use a high level program that got confused by the dependencies?
I just had to try and it worked in docker, log below. I ran `apt-get install` for each dependency in the order given in the wiki. For our build tests, we create a Docker image where we just pass everything at once to `apt-get` which works too.
Doing this by hand, I noticed that the wiki was outdated wrt. libusb. We use libusb-1.0 only by now.
Last but not least, I tried installing libudev-dev only. Turns out there is no dependency on libpci-dev. Maybe that was an error that got corrected sometime?
Nico
[icon@bob ~]$ docker run -it --rm ubuntu:xenial Unable to find image 'ubuntu:xenial' locally xenial: Pulling from library/ubuntu 61e03ba1d414: Pull complete 4afb39f216bd: Pull complete e489abdc9f90: Pull complete 999fff7bcc24: Pull complete Digest: sha256:1b733ff6c7c7aac32101a35cb2c6399ca8c399a9f6de62a386abe26c65b59b9e Status: Downloaded newer image for ubuntu:xenial root@9f4291ed0a07:/# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS" root@9f4291ed0a07:/# apt-get update Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB] Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [2051 kB] Get:9 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [15.9 kB] Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [984 kB] Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [8820 B] Get:12 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB] Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2559 kB] Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [16.4 kB] Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1544 kB] Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [26.2 kB] Get:17 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [10.9 kB] Get:18 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [12.7 kB] Fetched 19.4 MB in 3s (5301 kB/s) Reading package lists... Done root@9f4291ed0a07:/# apt-get install pciutils-dev Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libpci-dev' instead of 'pciutils-dev' The following additional packages will be installed: libc-dev-bin libc6-dev libpci3 libudev-dev linux-libc-dev manpages manpages-dev zlib1g-dev Suggested packages: glibc-doc man-browser The following NEW packages will be installed: libc-dev-bin libc6-dev libpci-dev libpci3 libudev-dev linux-libc-dev manpages manpages-dev zlib1g-dev 0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 6502 kB of archives. After this operation, 25.0 MB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev-dev amd64 229-4ubuntu21.31 [150 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpci3 amd64 1:3.3.1-1.1ubuntu1.3 [24.3 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 manpages all 4.04-2 [1087 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-dev-bin amd64 2.23-0ubuntu11.3 [68.6 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-210.242 [832 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6-dev amd64 2.23-0ubuntu11.3 [2083 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.3 [167 kB] Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpci-dev amd64 1:3.3.1-1.1ubuntu1.3 [42.8 kB] Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 manpages-dev all 4.04-2 [2048 kB] Fetched 6502 kB in 1s (5554 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libudev-dev:amd64. (Reading database ... 4785 files and directories currently installed.) Preparing to unpack .../libudev-dev_229-4ubuntu21.31_amd64.deb ... Unpacking libudev-dev:amd64 (229-4ubuntu21.31) ... Selecting previously unselected package libpci3:amd64. Preparing to unpack .../libpci3_1%3a3.3.1-1.1ubuntu1.3_amd64.deb ... Unpacking libpci3:amd64 (1:3.3.1-1.1ubuntu1.3) ... Selecting previously unselected package manpages. Preparing to unpack .../manpages_4.04-2_all.deb ... Unpacking manpages (4.04-2) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack .../libc-dev-bin_2.23-0ubuntu11.3_amd64.deb ... Unpacking libc-dev-bin (2.23-0ubuntu11.3) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../linux-libc-dev_4.4.0-210.242_amd64.deb ... Unpacking linux-libc-dev:amd64 (4.4.0-210.242) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../libc6-dev_2.23-0ubuntu11.3_amd64.deb ... Unpacking libc6-dev:amd64 (2.23-0ubuntu11.3) ... Selecting previously unselected package zlib1g-dev:amd64. Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.3_amd64.deb ... Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ... Selecting previously unselected package libpci-dev. Preparing to unpack .../libpci-dev_1%3a3.3.1-1.1ubuntu1.3_amd64.deb ... Unpacking libpci-dev (1:3.3.1-1.1ubuntu1.3) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../manpages-dev_4.04-2_all.deb ... Unpacking manpages-dev (4.04-2) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... Setting up libudev-dev:amd64 (229-4ubuntu21.31) ... Setting up libpci3:amd64 (1:3.3.1-1.1ubuntu1.3) ... Setting up manpages (4.04-2) ... Setting up libc-dev-bin (2.23-0ubuntu11.3) ... Setting up linux-libc-dev:amd64 (4.4.0-210.242) ... Setting up libc6-dev:amd64 (2.23-0ubuntu11.3) ... Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ... Setting up libpci-dev (1:3.3.1-1.1ubuntu1.3) ... Setting up manpages-dev (4.04-2) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... root@9f4291ed0a07:/# apt-get install zlib1g-dev Reading package lists... Done Building dependency tree Reading state information... Done zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.3). zlib1g-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@9f4291ed0a07:/# apt-get install libftdi-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libftdi1 libusb-dev The following NEW packages will be installed: libftdi-dev libftdi1 libusb-dev 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 211 kB of archives. After this operation, 2276 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libftdi1 amd64 0.20-4build1 [15.2 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-dev amd64 2:0.1.12-28 [29.9 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libftdi-dev amd64 0.20-4build1 [166 kB] Fetched 211 kB in 0s (1038 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libftdi1:amd64. (Reading database ... 8522 files and directories currently installed.) Preparing to unpack .../libftdi1_0.20-4build1_amd64.deb ... Unpacking libftdi1:amd64 (0.20-4build1) ... Selecting previously unselected package libusb-dev. Preparing to unpack .../libusb-dev_2%3a0.1.12-28_amd64.deb ... Unpacking libusb-dev (2:0.1.12-28) ... Selecting previously unselected package libftdi-dev. Preparing to unpack .../libftdi-dev_0.20-4build1_amd64.deb ... Unpacking libftdi-dev (0.20-4build1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... Setting up libftdi1:amd64 (0.20-4build1) ... Setting up libusb-dev (2:0.1.12-28) ... Setting up libftdi-dev (0.20-4build1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... root@9f4291ed0a07:/# apt-get install libusb-dev Reading package lists... Done Building dependency tree Reading state information... Done libusb-dev is already the newest version (2:0.1.12-28). libusb-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@9f4291ed0a07:/# apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libusb-1.0-0 libusb-1.0-doc The following NEW packages will be installed: libusb-1.0-0 libusb-1.0-0-dev libusb-1.0-doc 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 262 kB of archives. After this operation, 1808 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-1.0-0 amd64 2:1.0.20-1 [42.9 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-1.0-0-dev amd64 2:1.0.20-1 [58.5 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-1.0-doc all 2:1.0.20-1 [160 kB] Fetched 262 kB in 0s (1051 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libusb-1.0-0:amd64. (Reading database ... 8696 files and directories currently installed.) Preparing to unpack .../libusb-1.0-0_2%3a1.0.20-1_amd64.deb ... Unpacking libusb-1.0-0:amd64 (2:1.0.20-1) ... Selecting previously unselected package libusb-1.0-0-dev:amd64. Preparing to unpack .../libusb-1.0-0-dev_2%3a1.0.20-1_amd64.deb ... Unpacking libusb-1.0-0-dev:amd64 (2:1.0.20-1) ... Selecting previously unselected package libusb-1.0-doc. Preparing to unpack .../libusb-1.0-doc_2%3a1.0.20-1_all.deb ... Unpacking libusb-1.0-doc (2:1.0.20-1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... Setting up libusb-1.0-0:amd64 (2:1.0.20-1) ... Setting up libusb-1.0-0-dev:amd64 (2:1.0.20-1) ... Setting up libusb-1.0-doc (2:1.0.20-1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ...
Hi Nico
Wow, you are very thorough! So in case it is useful for you, I have included a text file with the steps I took that ended up finally working. This includes the libpci-dev and libudev-dev connection.
I used apt, and I do not have enough experience to tell you if it got confused. I'm already in way over my head at this point. A non-default package state seems likely to me. I also just realized that we had installed libftdi1 before libpci-dev, so in the wrong order: - sudo cat /var/log/dpkg.log* | grep -i libftdi | tail -n 1 2021-06-09 17:54:35 status installed libftdi1:i386 0.20-4build1 - sudo cat /var/log/dpkg.log* | grep -iE "libpci-dev" | tail -n 1 2021-07-06 17:24:19 status installed libpci-dev:i386 1:3.3.1-1.1ubuntu1
The task was to install flashrom 0.9.8 (with support for programmer ft2232_spi) on 32-bit Xubuntu 16.04 on 64-bit hardware: - uname -m i686 - cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
Ultimately, it ended up working and we've moved on to other issues now. If there's anything else I can get you from the image if you want to investigate this further, please let me know. I imagine it's very rare that someone tries to install such an old version of flashrom on such an old OS... and it seems increasingly likely to me that I just went about this the wrong way.
Cheers from Switzerland
Michael
-----Ursprüngliche Nachricht----- Von: Nico Huber nico.h@gmx.de Gesendet: Mittwoch, 14. Juli 2021 21:20 An: Michael Leukert - AMPEGON Michael.Leukert@ampegon.com; flashrom@flashrom.org Betreff: Re: AW: [flashrom] Unknown programmer "ft2232_spi"
Hi Michael,
On 13.07.21 09:06, Michael Leukert - AMPEGON wrote:
Thank you for your assistance and the useful hints at your link (https://flashrom.org/Downloads). After some struggles with the prerequisites, we were finally able to install it from source (with FTDI support), and our program is now working.
grats! :)
I don't have a lot of experience with package managers, but it seems to me that we had to recursively uninstall and reinstall an unreasonably large number of packages by hand in order to satisfy the exact version requirements for each prerequisite of flashrom. In fact we destroyed our ubuntu installation several times and had to restore from image before finding our way through the recursive mess of dependencies to a working solution.
wow, that seems odd. It's very unusual. I guess your Ubuntu was either not in a very original state (e.g. non-default package repositories) or in a very unlucky state. Or maybe you did use a high level program that got confused by the dependencies?
I just had to try and it worked in docker, log below. I ran `apt-get install` for each dependency in the order given in the wiki. For our build tests, we create a Docker image where we just pass everything at once to `apt-get` which works too.
Doing this by hand, I noticed that the wiki was outdated wrt. libusb. We use libusb-1.0 only by now.
Last but not least, I tried installing libudev-dev only. Turns out there is no dependency on libpci-dev. Maybe that was an error that got corrected sometime?
Nico
[icon@bob ~]$ docker run -it --rm ubuntu:xenial Unable to find image 'ubuntu:xenial' locally xenial: Pulling from library/ubuntu 61e03ba1d414: Pull complete 4afb39f216bd: Pull complete e489abdc9f90: Pull complete 999fff7bcc24: Pull complete Digest: sha256:1b733ff6c7c7aac32101a35cb2c6399ca8c399a9f6de62a386abe26c65b59b9 e Status: Downloaded newer image for ubuntu:xenial root@9f4291ed0a07:/# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS" root@9f4291ed0a07:/# apt-get update Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB] Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [2051 kB] Get:9 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [15.9 kB] Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [984 kB] Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [8820 B] Get:12 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB] Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2559 kB] Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [16.4 kB] Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1544 kB] Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [26.2 kB] Get:17 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [10.9 kB] Get:18 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [12.7 kB] Fetched 19.4 MB in 3s (5301 kB/s) Reading package lists... Done root@9f4291ed0a07:/# apt-get install pciutils-dev Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libpci-dev' instead of 'pciutils-dev' The following additional packages will be installed: libc-dev-bin libc6-dev libpci3 libudev-dev linux-libc-dev manpages manpages-dev zlib1g-dev Suggested packages: glibc-doc man-browser The following NEW packages will be installed: libc-dev-bin libc6-dev libpci-dev libpci3 libudev-dev linux-libc-dev manpages manpages-dev zlib1g-dev 0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 6502 kB of archives. After this operation, 25.0 MB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev-dev amd64 229-4ubuntu21.31 [150 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpci3 amd64 1:3.3.1-1.1ubuntu1.3 [24.3 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 manpages all 4.04-2 [1087 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-dev-bin amd64 2.23-0ubuntu11.3 [68.6 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-210.242 [832 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6-dev amd64 2.23-0ubuntu11.3 [2083 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.3 [167 kB] Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpci-dev amd64 1:3.3.1-1.1ubuntu1.3 [42.8 kB] Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 manpages-dev all 4.04-2 [2048 kB] Fetched 6502 kB in 1s (5554 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libudev-dev:amd64. (Reading database ... 4785 files and directories currently installed.) Preparing to unpack .../libudev-dev_229-4ubuntu21.31_amd64.deb ... Unpacking libudev-dev:amd64 (229-4ubuntu21.31) ... Selecting previously unselected package libpci3:amd64. Preparing to unpack .../libpci3_1%3a3.3.1-1.1ubuntu1.3_amd64.deb ... Unpacking libpci3:amd64 (1:3.3.1-1.1ubuntu1.3) ... Selecting previously unselected package manpages. Preparing to unpack .../manpages_4.04-2_all.deb ... Unpacking manpages (4.04-2) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack .../libc-dev-bin_2.23-0ubuntu11.3_amd64.deb ... Unpacking libc-dev-bin (2.23-0ubuntu11.3) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../linux-libc-dev_4.4.0-210.242_amd64.deb ... Unpacking linux-libc-dev:amd64 (4.4.0-210.242) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../libc6-dev_2.23-0ubuntu11.3_amd64.deb ... Unpacking libc6-dev:amd64 (2.23-0ubuntu11.3) ... Selecting previously unselected package zlib1g-dev:amd64. Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.3_amd64.deb ... Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ... Selecting previously unselected package libpci-dev. Preparing to unpack .../libpci-dev_1%3a3.3.1-1.1ubuntu1.3_amd64.deb ... Unpacking libpci-dev (1:3.3.1-1.1ubuntu1.3) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../manpages-dev_4.04-2_all.deb ... Unpacking manpages-dev (4.04-2) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... Setting up libudev-dev:amd64 (229-4ubuntu21.31) ... Setting up libpci3:amd64 (1:3.3.1-1.1ubuntu1.3) ... Setting up manpages (4.04-2) ... Setting up libc-dev-bin (2.23-0ubuntu11.3) ... Setting up linux-libc-dev:amd64 (4.4.0-210.242) ... Setting up libc6-dev:amd64 (2.23-0ubuntu11.3) ... Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ... Setting up libpci-dev (1:3.3.1-1.1ubuntu1.3) ... Setting up manpages-dev (4.04-2) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... root@9f4291ed0a07:/# apt-get install zlib1g-dev Reading package lists... Done Building dependency tree Reading state information... Done zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.3). zlib1g-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@9f4291ed0a07:/# apt-get install libftdi-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libftdi1 libusb-dev The following NEW packages will be installed: libftdi-dev libftdi1 libusb-dev 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 211 kB of archives. After this operation, 2276 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libftdi1 amd64 0.20-4build1 [15.2 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-dev amd64 2:0.1.12-28 [29.9 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libftdi-dev amd64 0.20-4build1 [166 kB] Fetched 211 kB in 0s (1038 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libftdi1:amd64. (Reading database ... 8522 files and directories currently installed.) Preparing to unpack .../libftdi1_0.20-4build1_amd64.deb ... Unpacking libftdi1:amd64 (0.20-4build1) ... Selecting previously unselected package libusb-dev. Preparing to unpack .../libusb-dev_2%3a0.1.12-28_amd64.deb ... Unpacking libusb-dev (2:0.1.12-28) ... Selecting previously unselected package libftdi-dev. Preparing to unpack .../libftdi-dev_0.20-4build1_amd64.deb ... Unpacking libftdi-dev (0.20-4build1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... Setting up libftdi1:amd64 (0.20-4build1) ... Setting up libusb-dev (2:0.1.12-28) ... Setting up libftdi-dev (0.20-4build1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... root@9f4291ed0a07:/# apt-get install libusb-dev Reading package lists... Done Building dependency tree Reading state information... Done libusb-dev is already the newest version (2:0.1.12-28). libusb-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@9f4291ed0a07:/# apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libusb-1.0-0 libusb-1.0-doc The following NEW packages will be installed: libusb-1.0-0 libusb-1.0-0-dev libusb-1.0-doc 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 262 kB of archives. After this operation, 1808 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-1.0-0 amd64 2:1.0.20-1 [42.9 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-1.0-0-dev amd64 2:1.0.20-1 [58.5 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libusb-1.0-doc all 2:1.0.20-1 [160 kB] Fetched 262 kB in 0s (1051 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libusb-1.0-0:amd64. (Reading database ... 8696 files and directories currently installed.) Preparing to unpack .../libusb-1.0-0_2%3a1.0.20-1_amd64.deb ... Unpacking libusb-1.0-0:amd64 (2:1.0.20-1) ... Selecting previously unselected package libusb-1.0-0-dev:amd64. Preparing to unpack .../libusb-1.0-0-dev_2%3a1.0.20-1_amd64.deb ... Unpacking libusb-1.0-0-dev:amd64 (2:1.0.20-1) ... Selecting previously unselected package libusb-1.0-doc. Preparing to unpack .../libusb-1.0-doc_2%3a1.0.20-1_all.deb ... Unpacking libusb-1.0-doc (2:1.0.20-1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ... Setting up libusb-1.0-0:amd64 (2:1.0.20-1) ... Setting up libusb-1.0-0-dev:amd64 (2:1.0.20-1) ... Setting up libusb-1.0-doc (2:1.0.20-1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3) ...