summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-11-24 00:20:03 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-11-24 00:20:03 +0000
commit5cca01f3943d888f9ee5f1efcf9faa0269bf8533 (patch)
tree1978ce52ae758b879635c7a8a9c2651f739844f8 /Makefile
parente51ea10a8889544b942d3490bb721f160fe09517 (diff)
downloadflashrom-5cca01f3943d888f9ee5f1efcf9faa0269bf8533.tar.gz
flashrom-5cca01f3943d888f9ee5f1efcf9faa0269bf8533.tar.bz2
flashrom-5cca01f3943d888f9ee5f1efcf9faa0269bf8533.zip
Cleanly validate ICH SPI preopcodes
The code should work on Linux/*BSD/MacOSX and relies on the serial code implementation in serial.c. Support for additional platforms (Windows) will have to be added to serial.c for this to work. For tests without a Bus Pirate (or with non-functional serial code) it is possible to #define FAKE_COMMUNICATION in buspirate_spi.c. Thanks to Sean Nelson for the SPI mode settings code. I tweaked it a bit to make configuration from a commandline easier should anybody want that feature. Tested-by: Sean Nelson <audiohacked@gmail.com> Corresponding to flashrom svn r772. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e12b7accd..430c8fd9e 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ INSTALL = install
DIFF = diff
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man
-CFLAGS ?= -Os -Wall -Werror
+CFLAGS ?= -Os -Wall -Werror -g
EXPORTDIR ?= .
OS_ARCH = $(shell uname)
@@ -89,6 +89,9 @@ CONFIG_DUMMY ?= yes
# Always enable Dr. Kaiser for now.
CONFIG_DRKAISER ?= yes
+# Always enable Bus Pirate SPI for now.
+CONFIG_BUSPIRATESPI ?= yes
+
# Disable wiki printing by default. It is only useful if you have wiki access.
CONFIG_PRINT_WIKI ?= no
@@ -138,8 +141,18 @@ FEATURE_CFLAGS += -D'DRKAISER_SUPPORT=1'
OBJS += drkaiser.o
endif
+ifeq ($(CONFIG_BUSPIRATESPI), yes)
+FEATURE_CFLAGS += -D'BUSPIRATE_SPI_SUPPORT=1'
+OBJS += buspirate_spi.o
+endif
+
+# Ugly, but there's no elif/elseif.
ifeq ($(CONFIG_SERPROG), yes)
OBJS += serial.o
+else
+ifeq ($(CONFIG_BUSPIRATESPI), yes)
+OBJS += serial.o
+endif
endif
ifeq ($(CONFIG_PRINT_WIKI), yes)