diff options
author | James Laird <jhl@mafipulation.org> | 2013-03-27 13:00:23 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-03-27 13:00:23 +0000 |
commit | c60de0e87faa631887821892547f0554eed2727f (patch) | |
tree | 54b9eb93e87ead0498bdacd22f4a3cd3e0ffd2ae /Makefile | |
parent | 226037da3d274fdf65e477e9ef1082356830b2c7 (diff) | |
download | flashrom-c60de0e87faa631887821892547f0554eed2727f.tar.gz flashrom-c60de0e87faa631887821892547f0554eed2727f.tar.bz2 flashrom-c60de0e87faa631887821892547f0554eed2727f.zip |
Add Altera USB-Blaster SPI programmer
Adds support for the Altera USB-Blaster programming dongle in Active
Serial (AS) mode. Tested on both original product and a clone dongle.
Corresponding to flashrom svn r1658.
Signed-off-by: James Laird <jhl@mafipulation.org>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -128,6 +128,11 @@ UNSUPPORTED_FEATURES += CONFIG_FT2232_SPI=yes else override CONFIG_FT2232_SPI = no endif +ifeq ($(CONFIG_USBBLASTER_SPI), yes) +UNSUPPORTED_FEATURES += CONFIG_USBBLASTER_SPI=yes +else +override CONFIG_USBBLASTER_SPI = no +endif endif # FIXME: Should we check for Cygwin/MSVC as well? @@ -240,6 +245,11 @@ UNSUPPORTED_FEATURES += CONFIG_FT2232_SPI=yes else override CONFIG_FT2232_SPI = no endif +ifeq ($(CONFIG_USBBLASTER_SPI), yes) +UNSUPPORTED_FEATURES += CONFIG_USBBLASTER_SPI=yes +else +override CONFIG_USBBLASTER_SPI = no +endif endif ifneq ($(TARGET_OS), Linux) @@ -349,6 +359,9 @@ CONFIG_ATAHPT ?= no # Always enable FT2232 SPI dongles for now. CONFIG_FT2232_SPI ?= yes +# Always enable Altera USB-Blaster dongles for now. +CONFIG_USBBLASTER_SPI ?= yes + # Always enable dummy tracing for now. CONFIG_DUMMY ?= yes @@ -474,12 +487,23 @@ NEED_PCI := yes endif ifeq ($(CONFIG_FT2232_SPI), yes) -FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb") # This is a totally ugly hack. FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_FT2232_SPI=1'") +NEED_FTDI := yes +PROGRAMMER_OBJS += ft2232_spi.o +endif + +ifeq ($(CONFIG_USBBLASTER_SPI), yes) +# This is a totally ugly hack. +FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_USBBLASTER_SPI=1'") +NEED_FTDI := yes +PROGRAMMER_OBJS += usbblaster_spi.o +endif + +ifeq ($(NEED_FTDI), yes) +FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb") FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'") FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)") -PROGRAMMER_OBJS += ft2232_spi.o # We can't set NEED_USB here because that would transform libftdi auto-enabling # into a hard requirement for libusb, defeating the purpose of auto-enabling. endif @@ -799,7 +823,7 @@ export LINUX_SPI_TEST features: compiler @echo "FEATURES := yes" > .features.tmp -ifeq ($(CONFIG_FT2232_SPI), yes) +ifeq ($(NEED_FTDI), yes) @printf "Checking for FTDI support... " @echo "$$FTDI_TEST" > .featuretest.c @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \ |