b8c6437811
This splits up the ROM Write enable code into chipset specific and board specific parts. This of course means that a lot of code is plainly moved about. * Allows for linuxbios name matching and pci-subsystem id matching. The latter uses a double set to properly distuinguish boards despite of some known vendors being lax about it. * Fixes GPIO15 being raised on every VT8235 southbridge, regardless of what that line actually controls; rom on EPIA-M, backlight on mitac 8999 laptop. * Adds flashrom support for Asus A7V400-MX (KM400 + VT8235) * Island aruma was renamed agami aruma, the board specific code now got adjusted. A set of pci-ids was retrieved from source code. Signed-off-by: Luc Verhaegen <libv@skynet.be> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2581 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
63 lines
1.5 KiB
Makefile
63 lines
1.5 KiB
Makefile
#
|
|
# Makefile for flash_rom
|
|
#
|
|
# redone by Stefan Reinauer <stepan@openbios.org>
|
|
#
|
|
|
|
PROGRAM = flashrom
|
|
|
|
CC = gcc
|
|
STRIP = strip
|
|
INSTALL = /usr/bin/install
|
|
PREFIX = /usr/local
|
|
#CFLAGS = -O2 -g -Wall -Werror
|
|
CFLAGS = -Os -Wall -Werror -DDISABLE_DOC # -DTS5300
|
|
OS_ARCH = $(shell uname)
|
|
ifeq ($(OS_ARCH), SunOS)
|
|
LDFLAGS = -lpci -lz
|
|
else
|
|
LDFLAGS = -lpci -lz -static
|
|
STRIP_ARGS = -s
|
|
endif
|
|
|
|
OBJS = chipset_enable.o board_enable.o udelay.o jedec.o sst28sf040.o \
|
|
am29f040b.o mx29f002.o sst39sf020.o m29f400bt.o w49f002u.o \
|
|
82802ab.o msys_doc.o pm49fl004.o sst49lf040.o sst49lfxxxc.o \
|
|
sst_fwhub.o layout.o lbtable.o flashchips.o flash_rom.o \
|
|
sharplhf00l04.o
|
|
|
|
all: pciutils dep $(PROGRAM)
|
|
|
|
$(PROGRAM): $(OBJS)
|
|
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
|
|
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
|
|
|
|
clean:
|
|
rm -f *.o *~
|
|
|
|
distclean: clean
|
|
rm -f $(PROGRAM) .dependencies
|
|
|
|
dep:
|
|
@$(CC) -MM *.c > .dependencies
|
|
|
|
pciutils:
|
|
@echo; echo -n "Checking for pciutils and zlib... "
|
|
@$(shell ( echo "#include <pci/pci.h>"; \
|
|
echo "struct pci_access *pacc;"; \
|
|
echo "int main(int argc, char **argv)"; \
|
|
echo "{ pacc = pci_alloc(); return 0; }"; ) > .test.c )
|
|
@$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null && \
|
|
echo "found." || ( echo "not found."; echo; \
|
|
echo "Please install pciutils-devel and zlib-devel."; \
|
|
echo "See README for more information."; echo; \
|
|
rm -f .test.c .test; exit 1)
|
|
@rm -f .test.c .test
|
|
|
|
install: $(PROGRAM)
|
|
$(INSTALL) flashrom $(PREFIX)/bin
|
|
|
|
.PHONY: all clean distclean dep pciutils
|
|
|
|
-include .dependencies
|
|
|