*I used this procedure in Ubuntu:*
*sudo apt-get install -y bison build-essential curl flex git gnat libncurses5-dev m4 zlib1g-devgit clone https://github.com/flashrom/flashrom.git https://github.com/flashrom/flashrom.gitCloning into 'flashrom'...remote: Enumerating objects: 80, done.remote: Counting objects: 100% (80/80), done.remote: Compressing objects: 100% (58/58), done.remote: Total 11610 (delta 39), reused 52 (delta 22), pack-reused 11530Receiving objects: 100% (11610/11610), 4.07 MiB | 19.58 MiB/s, done.Resolving deltas: 100% (8812/8812), done.clay@clay-MS-7C37:~$ ls -alcd flashromclay@clay-MS-7C37:~/flashrom$ sudo make install...cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Werror -I/usr/include/libusb-1.0 -D'CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="''"' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_ENE_LPC=1' -D'CONFIG_MEC1308=1' -D'CONFIG_SERPROG=1' -D'CONFIG_RAYER_SPI=1' -D'CONFIG_RAIDEN=1' -D'CONFIG_PONY_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_NIC3COM=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_ATAVIA=1' -D'CONFIG_IT8212=1' -D'CONFIG_PICKIT2_SPI=1' -D'CONFIG_STLINKV3_SPI=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICREALTEK=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_NICINTEL_EEPROM=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_DEDIPROG=1' -D'CONFIG_DEVELOPERBOX_SPI=1' -D'CONFIG_SATAMV=1' -D'CONFIG_LINUX_MTD=1' -D'CONFIG_LINUX_SPI=1' -D'CONFIG_CH341A_SPI=1' -D'CONFIG_DIGILENT_SPI=1' -D'CONFIG_I2C_SUPPORT=1' -D'NEED_PCI=1' -D'NEED_RAW_ACCESS=1' -D'NEED_LIBUSB1=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="v1.2-131-g74fd030"' -o chipset_enable.o -c chipset_enable.cIn file included from chipset_enable.c:36:hwaccess.h:34:10: fatal error: pci/pci.h: No such file or directory 34 | #include <pci/pci.h> | ^~~~~~~~~~~compilation terminated.make: *** [Makefile:1271: chipset_enable.o] Error 1clay@clay-MS-7C37:~/flashrom$*
*Looking at https://review.coreboot.org/cgit/flashrom.git/tree/ https://review.coreboot.org/cgit/flashrom.git/tree/ * *I don't find a pci.h file either. Any suggestions?*
Clay
Never mind, Ubuntu has an obsolete version of pciutils. Will try Fedora...
root@clay-MS-7C37:~# apt info pciutils Package: pciutils Version: 1:3.7.0-2 root@clay-MS-7C37:~# apt install pciutils Reading package lists... Done Building dependency tree Reading state information... Done pciutils is already the newest version (1:3.7.0-2).
On Fri, Oct 30, 2020 at 1:05 AM Clay Daniels clay.daniels.jr@gmail.com wrote:
*I used this procedure in Ubuntu:*
*sudo apt-get install -y bison build-essential curl flex git gnat libncurses5-dev m4 zlib1g-devgit clone https://github.com/flashrom/flashrom.git https://github.com/flashrom/flashrom.gitCloning into 'flashrom'...remote: Enumerating objects: 80, done.remote: Counting objects: 100% (80/80), done.remote: Compressing objects: 100% (58/58), done.remote: Total 11610 (delta 39), reused 52 (delta 22), pack-reused 11530Receiving objects: 100% (11610/11610), 4.07 MiB | 19.58 MiB/s, done.Resolving deltas: 100% (8812/8812), done.clay@clay-MS-7C37:~$ ls -alcd flashromclay@clay-MS-7C37:~/flashrom$ sudo make install...cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Werror -I/usr/include/libusb-1.0 -D'CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="''"' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_ENE_LPC=1' -D'CONFIG_MEC1308=1' -D'CONFIG_SERPROG=1' -D'CONFIG_RAYER_SPI=1' -D'CONFIG_RAIDEN=1' -D'CONFIG_PONY_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_NIC3COM=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_ATAVIA=1' -D'CONFIG_IT8212=1' -D'CONFIG_PICKIT2_SPI=1' -D'CONFIG_STLINKV3_SPI=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICREALTEK=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_NICINTEL_EEPROM=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_DEDIPROG=1' -D'CONFIG_DEVELOPERBOX_SPI=1' -D'CONFIG_SATAMV=1' -D'CONFIG_LINUX_MTD=1' -D'CONFIG_LINUX_SPI=1' -D'CONFIG_CH341A_SPI=1' -D'CONFIG_DIGILENT_SPI=1' -D'CONFIG_I2C_SUPPORT=1' -D'NEED_PCI=1' -D'NEED_RAW_ACCESS=1' -D'NEED_LIBUSB1=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="v1.2-131-g74fd030"' -o chipset_enable.o -c chipset_enable.cIn file included from chipset_enable.c:36:hwaccess.h:34:10: fatal error: pci/pci.h: No such file or directory 34 | #include <pci/pci.h> | ^~~~~~~~~~~compilation terminated.make: *** [Makefile:1271: chipset_enable.o] Error 1clay@clay-MS-7C37:~/flashrom$*
*Looking at https://review.coreboot.org/cgit/flashrom.git/tree/ https://review.coreboot.org/cgit/flashrom.git/tree/ * *I don't find a pci.h file either. Any suggestions?*
Clay
Hello Clay,
On 30.10.20 19:15, Clay Daniels wrote:
Never mind, Ubuntu has an obsolete version of pciutils. Will try Fedora...
you might just need pciutils-devel or pciutils-dev or something like that. It should actually fail earlier and tell you that. Not sure what went wrong (I assume you cut the interesting output).
Nico
Thanks, Nico. I tried Fedora, and had the same problem, so I returned to Ubuntu and in summary:
removed old pciutils installed pci.ids per: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/7 installed libpci-dev Got past: pci/pci.h: No such file or directory
Then failed: "In file included from raiden_debug_spi.c:343: usb_device.h:28:10: fatal error: libusb.h: No such file or directory 28 | #include <libusb.h> | ^~~~~~~~~~ compilation terminated. make: *** [Makefile:1271: raiden_debug_spi.o] Error 1"
root@clay-MS-7C37:~# apt install libusb-dev
But same error: libusb.h missing :(
per: https://github.com/UltimateHackingKeyboard/agent/issues/407 "Thinking out loud here if I post this... libusb.h is missing... libusb-dev version is 2:0.1.12-30 There also exists the package libusb-1.0-0-dev OK, install libusb-1.0-0-dev"
IT COMPILED !!! root@clay-MS-7C37:~/flashrom# flashrom --version flashrom v1.2-132-gdd81c9a on Linux 5.8.0-25-generic (x86_64) flashrom is free software, get the source code at https://flashrom.org root@clay-MS-7C37:~/flashrom#
Now I have a working self-compiled install of flashrom to play with. It does not seem to find my spi flash chip yet, but I'm working on it. Just being able to build the latest git version is a big step forward.
Thanks all, clay
On Fri, Oct 30, 2020 at 2:50 PM Nico Huber nico.h@gmx.de wrote:
Hello Clay,
On 30.10.20 19:15, Clay Daniels wrote:
Never mind, Ubuntu has an obsolete version of pciutils. Will try
Fedora...
you might just need pciutils-devel or pciutils-dev or something like that. It should actually fail earlier and tell you that. Not sure what went wrong (I assume you cut the interesting output).
Nico