config BR2_PACKAGE_FLASHROM
bool "flashrom"
depends on BR2_i386 || BR2_x86_64
- depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
- select BR2_PACKAGE_LIBUSB
help
flashrom is a utility for identifying, reading, writing,
verifying and erasing flash chips. It is designed to flash
programmer devices.
http://flashrom.org/
-
-comment "flashrom needs a toolchain w/ threads"
- depends on BR2_i386 || BR2_x86_64
- depends on !BR2_TOOLCHAIN_HAS_THREADS
FLASHROM_VERSION = 1.0
FLASHROM_SOURCE = flashrom-$(FLASHROM_VERSION).tar.bz2
FLASHROM_SITE = https://download.flashrom.org/releases
-FLASHROM_DEPENDENCIES = libusb host-pkgconf
FLASHROM_LICENSE = GPL-2.0+
FLASHROM_LICENSE_FILES = COPYING
CONFIG_USBBLASTER_SPI=no
endif
+ifeq ($(BR2_PACKAGE_LIBUSB),y)
+FLASHROM_DEPENDENCIES += host-pkgconf libusb
+FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBUSB1_PROGRAMMERS=yes
+else
+FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBUSB1_PROGRAMMERS=no
+endif
+
ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
FLASHROM_DEPENDENCIES += host-pkgconf libusb-compat
FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=yes