2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-06-02 08:13:58 +02:00
|
|
|
#
|
|
|
|
# flashrom
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2018-03-13 13:45:58 +01:00
|
|
|
FLASHROM_VERSION = 1.0
|
2013-12-11 14:23:46 +01:00
|
|
|
FLASHROM_SOURCE = flashrom-$(FLASHROM_VERSION).tar.bz2
|
2018-03-21 21:13:16 +01:00
|
|
|
FLASHROM_SITE = https://download.flashrom.org/releases
|
2017-03-30 15:43:32 +02:00
|
|
|
FLASHROM_LICENSE = GPL-2.0+
|
2013-12-11 14:23:46 +01:00
|
|
|
FLASHROM_LICENSE_FILES = COPYING
|
2012-06-02 08:13:58 +02:00
|
|
|
|
2019-02-28 20:26:10 +01:00
|
|
|
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
|
|
|
|
|
2019-02-28 20:26:12 +01:00
|
|
|
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
|
|
|
|
|
2019-02-28 20:26:11 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
|
|
|
|
FLASHROM_DEPENDENCIES += host-pkgconf libusb-compat
|
|
|
|
FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=yes
|
|
|
|
else
|
|
|
|
FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no
|
|
|
|
endif
|
|
|
|
|
2019-02-28 20:26:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PCIUTILS),y)
|
|
|
|
FLASHROM_DEPENDENCIES += pciutils
|
|
|
|
FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBPCI_PROGRAMMERS=yes
|
|
|
|
else
|
|
|
|
FLASHROM_MAKE_OPTS += CONFIG_ENABLE_LIBPCI_PROGRAMMERS=no
|
|
|
|
endif
|
|
|
|
|
2012-06-02 08:13:58 +02:00
|
|
|
define FLASHROM_BUILD_CMDS
|
2017-09-20 10:17:18 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
2019-02-28 20:26:09 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) -DHAVE_STRNLEN" \
|
|
|
|
$(FLASHROM_MAKE_OPTS) -C $(@D)
|
2012-06-02 08:13:58 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define FLASHROM_INSTALL_TARGET_CMDS
|
|
|
|
$(INSTALL) -m 0755 -D $(@D)/flashrom $(TARGET_DIR)/usr/sbin/flashrom
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|