diff options
| author | Andrew Geissler <andrewg@us.ibm.com> | 2011-10-26 15:13:23 -0500 |
|---|---|---|
| committer | Andrew J. Geissler <andrewg@us.ibm.com> | 2011-11-01 07:38:46 -0500 |
| commit | beb8da45e9ad11796185bfb99f47fce35a090f9e (patch) | |
| tree | 28fce8583e987a2c61c631347174ef8c446557be | |
| parent | 80614655c4e9842e00d13ed0ad30fa23b3402f62 (diff) | |
| download | blackbird-hostboot-beb8da45e9ad11796185bfb99f47fce35a090f9e.tar.gz blackbird-hostboot-beb8da45e9ad11796185bfb99f47fce35a090f9e.zip | |
Initfile compile support
- Code review comments
- Second round of code review comments
- Fix for compiler failure due to last code review comments
Change-Id: Ic4356297a710e1bf1733b86dc47f459ee9c1533f
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/463
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
| -rw-r--r-- | src/build/ifcompiler/.gitignore | 3 | ||||
| -rwxr-xr-x | src/build/ifcompiler/makefile | 80 | ||||
| -rw-r--r-- | src/build/makefile | 24 | ||||
| -rw-r--r-- | src/makefile | 2 | ||||
| -rw-r--r-- | src/usr/hwpf/hwp/initfiles/makefile | 44 | ||||
| -rw-r--r-- | src/usr/hwpf/hwp/makefile | 1 |
6 files changed, 115 insertions, 39 deletions
diff --git a/src/build/ifcompiler/.gitignore b/src/build/ifcompiler/.gitignore new file mode 100644 index 000000000..1cafebabe --- /dev/null +++ b/src/build/ifcompiler/.gitignore @@ -0,0 +1,3 @@ +bin/* +lex.yy.c +y.tab.* diff --git a/src/build/ifcompiler/makefile b/src/build/ifcompiler/makefile index 6fe932a24..04bea5213 100755 --- a/src/build/ifcompiler/makefile +++ b/src/build/ifcompiler/makefile @@ -1,39 +1,45 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# fips730 src/engd/initfiles/ifcompiler/makefile 1.5 -# -# IBM CONFIDENTIAL -# -# OBJECT CODE ONLY SOURCE MATERIALS -# -# COPYRIGHT International Business Machines Corp. 2010 -# All Rights Reserved -# -# The source code for this program is not published or otherwise -# divested of its trade secrets, irrespective of what has been -# deposited with the U.S. Copyright Office. -# -# IBM_PROLOG_END_TAG -# -# Flag Reason Userid Date Description -# ---- ------- -------- -------- ----------- -# andrewg 05/24/11 Updated for VPL/PgP -# andrewg 10/07/11 Update based on review -# - -# To execute initCompiler against sample.initfile, run the following: -# ./initCompiler -init ./sample.initfile -outdir . --debug -attr ./fapiAttributeIds.H -# -# sample.if will be the binary compiled initfile, used as input to the hardware procedure which -# process it. -# -# sample.if.list will be a listing file describing the binary content of the initfile -# -# add a "-d" to flex command line to get debug output. - -all: - yacc -d initCompiler.y; flex initCompiler.lex; g++ initCompiler.C lex.yy.c y.tab.c initRpn.C initScom.C initSymbols.C -I./ -o initCompiler +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/build/ifcompiler/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2011 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END +# add a -d to flex for debug output + +y.tab.%: initCompiler.y + yacc -d initCompiler.y + +lex.yy.c: initCompiler.lex + flex initCompiler.lex + +bin/initCompiler: y.tab.c y.tab.h lex.yy.c initCompiler.C initCompiler.H initRpn.C initRpn.H initScom.C initScom.H initSymbols.C initSymbols.H + mkdir -p bin; g++ initCompiler.C lex.yy.c y.tab.c initRpn.C initScom.C initSymbols.C -I./ -o ./bin/initCompiler + +ifcompiler: bin/initCompiler + +all: gen_pass + +code_pass: + +gen_pass: ifcompiler clean: - rm -f initCompiler lex.yy.c *.if *.list y.tab.* *.dbg + rm -f ./bin/initCompiler lex.yy.c y.tab.* +beam: + diff --git a/src/build/makefile b/src/build/makefile index d9ef1d792..bcbe5f5ec 100644 --- a/src/build/makefile +++ b/src/build/makefile @@ -1,5 +1,27 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/build/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2010 - 2011 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END ROOTPATH = ../.. -SUBDIRS = linker.d tocgen.d +SUBDIRS = linker.d tocgen.d ifcompiler.d include ${ROOTPATH}/config.mk diff --git a/src/makefile b/src/makefile index 0cbcc9440..bfd6a8d60 100644 --- a/src/makefile +++ b/src/makefile @@ -62,7 +62,7 @@ RELOCATABLE_IMAGE_LDFLAGS = -pie --export-dynamic hbicore_OBJECTS = ${BASE_OBJECTS} ${DIRECT_BOOT_OBJECTS} ${STUB_TESTCASE_OBJECT} hbicore_MODULES = ${BASE_MODULES} ${DIRECT_BOOT_MODULES} hbicore_EXTENDED_MODULES = ${EXTENDED_MODULES} -hbicore_DATA_MODULES = +hbicore_DATA_MODULES = sample.if hbicore_LIDNUMBER = 80f00100 diff --git a/src/usr/hwpf/hwp/initfiles/makefile b/src/usr/hwpf/hwp/initfiles/makefile new file mode 100644 index 000000000..504deb982 --- /dev/null +++ b/src/usr/hwpf/hwp/initfiles/makefile @@ -0,0 +1,44 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/initfiles/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2011 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END +ROOTPATH = ../../../../../ + +INITFILES_INPUT = sample.initfile +INITFILES_OUTPUT = sample.if + +INITCOMPILER = ${ROOTPATH}/src/build/ifcompiler/bin/initCompiler +ATTR_HEADER = ${ROOTPATH}/obj/genfiles/fapiAttributeIds.H + +EXTRA_PARTS = $(addprefix ${IMGDIR}/, ${INITFILES_OUTPUT}) + +include ${ROOTPATH}/config.mk + +${EXTRA_PARTS}: ${IMGDIR}/% : ${GENDIR}/% + cp -f $^ $@ + +${GENDIR}/%.if: ${INITCOMPILER} ${ATTR_HEADER} %.initfile + ${INITCOMPILER} -init ${INITFILES_INPUT} -outdir ${GENDIR} -attr ${ATTR_HEADER} + + + + + diff --git a/src/usr/hwpf/hwp/makefile b/src/usr/hwpf/hwp/makefile index cc6d32303..d027e4b15 100644 --- a/src/usr/hwpf/hwp/makefile +++ b/src/usr/hwpf/hwp/makefile @@ -20,6 +20,7 @@ # Origin: 30 # # IBM_PROLOG_END +SUBDIRS = initfiles.d ROOTPATH = ../../../.. MODULE = hwp |

