From 13121a1daa0de24934c2e53adeab919d60e317f3 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 28 Feb 2019 20:26:10 +0100 Subject: [PATCH] package/flashrom: libftdi is optional, not mandatory Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/flashrom/Config.in | 1 - package/flashrom/flashrom.mk | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package/flashrom/Config.in b/package/flashrom/Config.in index 66fe359724..0a5a7248e1 100644 --- a/package/flashrom/Config.in +++ b/package/flashrom/Config.in @@ -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 diff --git a/package/flashrom/flashrom.mk b/package/flashrom/flashrom.mk index 73d56f7f80..40198bac60 100644 --- a/package/flashrom/flashrom.mk +++ b/package/flashrom/flashrom.mk @@ -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 -- 2.30.2