summaryrefslogtreecommitdiff
path: root/util/bincfg/Makefile
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2018-01-10 14:35:55 +0100
committerNico Huber <nico.h@gmx.de>2018-01-18 13:47:20 +0000
commit780e931eed8937bd8e304449913f487fa1d056c5 (patch)
tree24446641394bdabfee26130913eed808fe658ffa /util/bincfg/Makefile
parent86391f16054ff1aa8af75b552204d24f3c00d50e (diff)
util/blobtool: rename to bincfg
The name blobtool is confusing as 'blob' is also used to describe nonfree software in binary form. Since this utility deals with binary configurations it makes more sense to call it bincfg. Change-Id: I3339274f1c42df4bb4a6b30b9538d91c3c03d7d0 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/23239 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/bincfg/Makefile')
-rw-r--r--util/bincfg/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/util/bincfg/Makefile b/util/bincfg/Makefile
new file mode 100644
index 0000000000..1b3e93643e
--- /dev/null
+++ b/util/bincfg/Makefile
@@ -0,0 +1,29 @@
+CC = gcc
+YACC = bison
+LEX = flex
+TARGET=bincfg
+
+$(TARGET): $(TARGET).lex.o $(TARGET).tab.o
+ $(CC) $^ -Wall -Wno-unused-function -g -lfl -o $@
+
+$(TARGET).lex.c: $(TARGET).l $(TARGET).tab.h
+ $(LEX) -o $(patsubst $(TARGET).l,$(TARGET).lex.c,$<) $<
+
+$(TARGET).tab.c $(TARGET).tab.h: $(TARGET).y
+ $(YACC) -d $<
+
+# Use this target to generate GbE for X200
+gen-gbe-ich9m:
+ ./bincfg gbe-ich9m.spec gbe-ich9m.set gbe1.bin
+ # duplicate binary as per spec
+ cat gbe1.bin gbe1.bin > flashregion_3_gbe.bin
+ rm -f gbe1.bin
+
+# Use this target to generate IFD for X200
+gen-ifd-x200:
+ ./bincfg ifd-x200.spec ifd-x200.set flashregion_0_fd.bin
+
+.PHONY: clean gen-gbe-ich9m gen-ifd-x200
+
+clean:
+ rm -f *.lex.c *.tab.c *.tab.h *.o bincfg flashregion_0_fd.bin flashregion_3_gbe.bin