lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1285255197-9262-3-git-send-email-dbaryshkov@gmail.com>
Date:	Thu, 23 Sep 2010 19:19:55 +0400
From:	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	linux-pcmcia@...ts.infradead.org,
	David Woodhouse <dwmw2@...radead.org>
Subject: [PATCH 3/5] firmware: enable usage of mkcis

Enable usage of mkcis for generation of cis files

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
---
 firmware/Makefile |   44 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index 9c2d194..04ecf8c 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -156,6 +156,9 @@ quiet_cmd_ihex2fw  = IHEX2FW $@
 quiet_cmd_h16tofw  = H16TOFW $@
       cmd_h16tofw  = $(objtree)/$(obj)/ihex2fw -w $< $@
 
+quiet_cmd_mkcis	= MKCIS   $@
+      cmd_mkcis = $(objtree)/$(obj)/mkcis -o $@ $<
+
 quiet_cmd_fwbin = MK_FW   $@
       cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)";		     \
 		  FWSTR="$(subst /,_,$(subst .,_,$(subst -,_,$(patsubst	     \
@@ -224,6 +227,11 @@ ihex2fw_dep :=
 else
 ihex2fw_dep := $(obj)/ihex2fw
 endif
+ifeq ($(INSTALL):$(wildcard $(obj)/mkcis),install:$(obj)/mkcis)
+mkcis_dep :=
+else
+mkcis_dep := $(obj)/mkcis
+endif
 
 # .HEX is also Intel HEX, but where the offset and length in each record
 # is actually meaningful, because the firmware has to be loaded in a certain
@@ -236,6 +244,10 @@ $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
 $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
 	$(call cmd,h16tofw)
 
+# .ct is a text representation of CIS files, as originally developed by pcmcia-cs
+$(obj)/%.cis: $(obj)/%.ct $(mkcis_dep) | $(objtree)/$(obj)/$$(dir %)
+	$(call cmd,mkcis)
+
 $(firmware-dirs):
 	$(call cmd,mkdir)
 
@@ -251,4 +263,34 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
 # final vmlinux link will fail.
 obj-n := dummy
 
-hostprogs-y := ihex2fw
+hostprogs-y := ihex2fw mkcis
+
+mkcis-objs := mkcis.o mkcis-lexer.lex.o mkcis-parser.tab.o
+$(obj)/mkcis-parser.tab.o: $(obj)/mkcis-parser.tab.c $(obj)/mkcis-parser.tab.h
+$(obj)/mkcis-lexer.lex.o:  $(obj)/mkcis-lexer.lex.c $(obj)/mkcis-parser.tab.h
+HOSTCFLAGS_mkcis.o += -Iinclude/pcmcia
+HOSTCFLAGS_mkcis-lexer.lex.o += -Iinclude/pcmcia -Ifirmware/
+HOSTCFLAGS_mkcis-parser.tab.o += -Iinclude/pcmcia -Ifirmware/
+HOSTLOADLIBES_mkcis := -lm
+
+# GENERATE_PARSER := 1		# Uncomment to rebuild flex/bison output
+
+ifdef GENERATE_PARSER
+
+BISON = bison
+FLEX = flex
+
+quiet_cmd_bison = BISON   $@
+      cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@...ipped
+quiet_cmd_flex = FLEX    $@
+      cmd_flex = $(FLEX) -o$@ $<; cp $@ $@...ipped
+
+$(obj)/mkcis-parser.tab.c: $(src)/mkcis-parser.y FORCE
+	$(call if_changed,bison)
+
+$(obj)/mkcis-parser.tab.h: $(obj)/mkcis-parser.tab.c
+
+$(obj)/mkcis-lexer.lex.c: $(src)/mkcis-lexer.l FORCE
+	$(call if_changed,flex)
+
+endif
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ