package/flashrom: libftdi is optional, not mandatory
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 28 Feb 2019 19:26:10 +0000 (20:26 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 5 Mar 2019 20:45:04 +0000 (21:45 +0100)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/flashrom/Config.in
package/flashrom/flashrom.mk

index 66fe35972467770269e56b05fea3c938db25a70b..0a5a7248e158dfa45232bff9ac37aba19d3bd910 100644 (file)
@@ -4,7 +4,6 @@ config BR2_PACKAGE_FLASHROM
        depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
        select BR2_PACKAGE_LIBUSB
        select BR2_PACKAGE_LIBUSB_COMPAT
-       select BR2_PACKAGE_LIBFTDI
        help
          flashrom is a utility for identifying, reading, writing,
          verifying and erasing flash chips. It is designed to flash
index 73d56f7f80246330ed1c3846776ed6e322194fd4..40198bac60894046dd5a641509309da25eed3c5f 100644 (file)
@@ -7,10 +7,21 @@
 FLASHROM_VERSION = 1.0
 FLASHROM_SOURCE = flashrom-$(FLASHROM_VERSION).tar.bz2
 FLASHROM_SITE = https://download.flashrom.org/releases
-FLASHROM_DEPENDENCIES = libusb libusb-compat libftdi host-pkgconf
+FLASHROM_DEPENDENCIES = libusb libusb-compat host-pkgconf
 FLASHROM_LICENSE = GPL-2.0+
 FLASHROM_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_LIBFTDI),y)
+FLASHROM_DEPENDENCIES += host-pkgconf libftdi
+FLASHROM_MAKE_OPTS += \
+       CONFIG_FT2232_SPI=yes \
+       CONFIG_USBBLASTER_SPI=yes
+else
+FLASHROM_MAKE_OPTS += \
+       CONFIG_FT2232_SPI=no \
+       CONFIG_USBBLASTER_SPI=no
+endif
+
 ifeq ($(BR2_PACKAGE_PCIUTILS),y)
 FLASHROM_DEPENDENCIES += pciutils
 FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBPCI_PROGRAMMERS=yes