summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.mk415
-rw-r--r--makefile20
-rw-r--r--src/build/buildpnor/makefile30
-rw-r--r--src/build/lids/81e00301.lidhdr21
-rwxr-xr-xsrc/build/lids/apyfipshdr494
-rwxr-xr-xsrc/build/lids/apyruhhdrbin210460 -> 0 bytes
-rwxr-xr-xsrc/build/lids/crc32bin5367 -> 0 bytes
-rw-r--r--src/build/lids/dslid.lidhdr10
-rw-r--r--src/build/lids/halruntime.lidhdr10
-rw-r--r--src/build/lids/hbicore.lidhdr10
-rw-r--r--src/build/lids/phal.vpdinfo35
-rw-r--r--src/build/linker/makefile33
-rw-r--r--src/build/mkrules/beam.env.mk43
-rw-r--r--src/build/mkrules/beam.rules.mk56
-rw-r--r--src/build/mkrules/binfile.env.mk30
-rw-r--r--src/build/mkrules/binfile.rules.mk67
-rw-r--r--src/build/mkrules/cc.env.mk41
-rw-r--r--src/build/mkrules/cc.rules.mk69
-rw-r--r--src/build/mkrules/cflags.env.mk45
-rw-r--r--src/build/mkrules/cscope.rules.mk42
-rw-r--r--src/build/mkrules/cxxtest.rules.mk45
-rw-r--r--src/build/mkrules/dep.rules.mk61
-rw-r--r--src/build/mkrules/dist.rules.mk (renamed from src/build/mkrules/dist_rules.mk)54
-rw-r--r--src/build/mkrules/dist.targets.mk (renamed from src/build/mkrules/dist_targets.mk)6
-rw-r--r--src/build/mkrules/env.mk77
-rw-r--r--src/build/mkrules/gcov.env.mk63
-rw-r--r--src/build/mkrules/gcov.rules.mk46
-rw-r--r--src/build/mkrules/images.rules.mk64
-rw-r--r--src/build/mkrules/passes.env.mk78
-rw-r--r--src/build/mkrules/passes.mk33
-rw-r--r--src/build/mkrules/passes.rules.mk133
-rw-r--r--src/build/mkrules/rules.mk37
-rw-r--r--src/build/mkrules/util.mk36
-rw-r--r--src/build/mkrules/verbose.rules.mk46
-rwxr-xr-xsrc/build/tools/hbDistribute32
-rw-r--r--src/lib/makefile46
-rw-r--r--src/makefile11
-rwxr-xr-xsrc/usr/cxxtest/TestSuite.C48
-rwxr-xr-xsrc/usr/cxxtest/cxxtestgen.pl5
-rwxr-xr-xsrc/usr/diag/prdf/framework/rule/makefile2
-rw-r--r--src/usr/ecmddatabuffer/makefile32
-rw-r--r--src/usr/errl/parser/makefile23
-rw-r--r--src/usr/hwpf/fapi/makefile4
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/makefile3
-rw-r--r--src/usr/hwpf/makefile4
-rw-r--r--src/usr/initservice/build/makefile39
-rw-r--r--src/usr/parser.mk29
-rw-r--r--src/usr/pore/poreve/makefile30
-rw-r--r--src/usr/targeting/xmltohb/makefile2
49 files changed, 1367 insertions, 1193 deletions
diff --git a/config.mk b/config.mk
index 834d730a4..83c1e7a3a 100644
--- a/config.mk
+++ b/config.mk
@@ -20,415 +20,12 @@
# Origin: 30
#
# IBM_PROLOG_END_TAG
-all:
- ${MAKE} gen_pass
- ${MAKE} code_pass
-## output libs, objs for userdetails parsers
-UD_DIR = ${ROOTPATH}/obj/modules/userdetails
-UD_OBJS = ${UD_DIR}*.o ${UD_DIR}/*.so ${UD_DIR}/*.a
+.DEFAULT_GOAL = all
-ifdef MODULE
-OBJDIR = ${ROOTPATH}/obj/modules/${MODULE}
-BEAMDIR = ${ROOTPATH}/obj/beam/${MODULE}
-GENDIR = ${ROOTPATH}/obj/genfiles
-GENDIR_PLUGINS = ${ROOTPATH}/obj/genfiles/plugins
-IMGDIR = ${ROOTPATH}/img
-GCOVNAME = ${MODULE}.lcov
-EXTRACOMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions
-ifdef STRICT
- EXTRACOMMONFLAGS += -Weffc++
-endif
-CUSTOMFLAGS += -D__HOSTBOOT_MODULE=${MODULE}
-ifndef TESTS
-ifdef HOSTBOOT_PROFILE
-vpath %.C ${ROOTPATH}/src/sys/prof
-OBJS := gcov.o ${OBJS}
-endif
-endif
-LIBS += $(addsuffix .so, $(addprefix lib, ${MODULE}))
-MODULE_INIT = ${ROOTPATH}/obj/core/module_init.o
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr ${GENDIR}
-else
-OBJDIR = ${ROOTPATH}/obj/core
-BEAMDIR = ${ROOTPATH}/obj/beam/core
-GENDIR = ${ROOTPATH}/obj/genfiles
-GENDIR_PLUGINS = ${ROOTPATH}/obj/genfiles/plugins
-IMGDIR = ${ROOTPATH}/img
-EXTRAINCDIR += ${GENDIR}
-GCOVNAME = $(notdir $(shell pwd)).lcov
-endif
-GCOVDIR = ${ROOTPATH}/obj/gcov
+MKRULESDIR = $(ROOTPATH)/src/build/mkrules
-__internal__comma= ,
-__internal__empty=
-__internal__space=$(__internal__empty) $(__internal__empty)
-MAKE_SPACE_LIST = $(subst $(__internal__comma),$(__internal__space),$(1))
-
-ifdef HOSTBOOT_DEBUG
-ifeq ($(HOSTBOOT_DEBUG),1)
- CUSTOMFLAGS += -DHOSTBOOT_DEBUG=1
-else
-ifndef MODULE
-ifneq (,$(filter kernel,$(call MAKE_SPACE_LIST, $(HOSTBOOT_DEBUG))))
- CUSTOMFLAGS += -DHOSTBOOT_DEBUG=kernel
-endif
-else
-ifneq (,$(filter $(MODULE), $(call MAKE_SPACE_LIST, $(HOSTBOOT_DEBUG))))
- CUSTOMFLAGS += -DHOSTBOOT_DEBUG=$(MODULE)
-endif
-endif
-endif
-endif
-
-ifndef TESTS
-ifdef HOSTBOOT_PROFILE
-ifndef HOSTBOOT_PROFILE_NO_INSTRUMENT
-CUSTOMFLAGS += --coverage
-endif
-endif
-endif
-
-# Current MCP version
-MCP_VER = mcp6
-
-TRACEPP = ${ROOTPATH}/src/build/trace/tracepp
-CUSTOM_LINKER_EXE = ${ROOTPATH}/src/build/linker/linker
-CUSTOM_LINKER = i686-mcp6-jail ${CUSTOM_LINKER_EXE}
-
-CC_RAW = ppc64-mcp6-gcc -std=c99
-CXX_RAW = ppc64-mcp6-g++
-CC = ${TRACEPP} ${CC_RAW}
-CXX = ${TRACEPP} ${CXX_RAW}
-
-LD = ppc64-mcp6-ld
-OBJDUMP = ppc64-mcp6-objdump
-GCOV = ppc64-mcp6-gcov
-APYFIPSHDR = apyfipshdr
-APYRUHHDR = apyruhhdr
-
-BINFILE_CACHE_LOCALDIR = ${ROOTPATH}/.git/hb_cache/data/
-BINFILE_CACHE_REMOTEDIR = /gsa/ausgsa/projects/h/hostboot/.binary_cache/data/
-
-BEAMVER = beam-3.5.2
-BEAMPATH = /afs/rch/projects/esw/beam/${BEAMVER}
-BEAMCMD = i686-mcp6-jail ${BEAMPATH}/bin/beam_compile
-BEAMFLAGS = \
- --beam::source=${BEAMPATH}/tcl/beam_default_parms.tcl \
- --beam::source=${ROOTPATH}/src/build/beam/compiler_c_config.tcl \
- --beam::source=${ROOTPATH}/src/build/beam/compiler_cpp_config.tcl \
- --beam::exit0 \
- -o /dev/null
-
-ifdef HOSTBOOT_PROFILE
-COMMONFLAGS = -Os
-else
-COMMONFLAGS = -O3
-endif
-COMMONFLAGS += -nostdlib ${EXTRACOMMONFLAGS}
-CFLAGS = ${COMMONFLAGS} -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\
- -Wall -Werror -mtraceback=no ${CUSTOMFLAGS}
-ASMFLAGS = ${COMMONFLAGS} -mcpu=power7
-CXXFLAGS = ${CFLAGS} -nostdinc++ -fno-rtti -fno-exceptions -Wall
-LDFLAGS = --nostdlib --sort-common ${COMMONFLAGS}
-
-ifdef HOSTBOOT_PROFILE
- PROFILE_FLAGS_FILTER = $(if $(findstring gcov,$(2)),\
- $(filter-out --coverage,$(1)),\
- $(1))
-else
- PROFILE_FLAGS_FILTER = $(1)
-endif
-
-FLAGS_FILTER = $(call PROFILE_FLAGS_FILTER, $(1), $(2))
-
-ifdef USE_PYTHON
- TESTGEN = ${ROOTPATH}/src/usr/cxxtest/cxxtestgen.py
-else
- TESTGEN = ${ROOTPATH}/src/usr/cxxtest/cxxtestgen.pl
-endif
-
-ifdef TESTS
-ifdef MODULE
-OBJS += ${MODULE}.o
-EXTRA_OBJS += ${OBJDIR}/${MODULE}.C
-vpath %.C ${OBJDIR} $(shell mkdir -p ${OBJDIR})
-else
-$(error MODULE must be defined for a testcase.)
-endif
-endif
-
-
-INCDIR = ${ROOTPATH}/src/include/
-_INCDIRS = ${INCDIR} ${EXTRAINCDIR}
-INCFLAGS = $(addprefix -I, ${_INCDIRS} )
-ASMINCFLAGS = $(addprefix $(lastword -Wa,-I), ${_INCDIRS})
-
-OBJECTS = $(addprefix ${OBJDIR}/, ${OBJS})
-LIBRARIES = $(addprefix ${IMGDIR}/, ${LIBS})
-
-ifdef IMGS
-IMGS_ = $(addprefix ${IMGDIR}/, ${IMGS})
-LIDS = $(foreach lid,$(addsuffix _LIDNUMBER, $(IMGS)),$(addprefix ${IMGDIR}/,$(addsuffix .ruhx, $($(lid)))))
-IMAGES = $(addsuffix .bin, ${IMGS_}) $(addsuffix .elf, ${IMGS_}) ${LIDS}
-#$(addsuffix .ruhx, ${IMGS_})
-IMAGE_EXTRAS = $(addprefix ${IMGDIR}/, hbotStringFile)
-endif
-
-ifdef EXTRA_LIDS
-EXTRA_LIDS_ = $(foreach lid,$(addsuffix _LIDNUMBER, $(EXTRA_LIDS)),$(addprefix ${IMGDIR}/,$(addsuffix .lidhdr, $($(lid)))))
-endif
-
-${OBJDIR}/%.o ${OBJDIR}/%.list : %.C
- mkdir -p ${OBJDIR}
- ${CXX} -c $(call FLAGS_FILTER, ${CXXFLAGS}, $<) $< \
- -o $@ ${INCFLAGS} -iquote .
- ${OBJDUMP} -rdlCS $@ > $(basename $@).list
-
-# Compiling *.cc files
-${OBJDIR}/%.o ${OBJDIR}/%.list : %.cc
- mkdir -p ${OBJDIR}
- ${CXX} -c ${CXXFLAGS} $< -o $@ ${INCFLAGS} -iquote .
- ${OBJDUMP} -rdlCS $@ > $(basename $@).list
-
-${OBJDIR}/%.o ${OBJDIR}/%.list : %.c
- mkdir -p ${OBJDIR}
- # Override to use C++ compiler in place of C compiler
- # CC_OVERRIDE is set in the makefile of the component
-ifndef CC_OVERRIDE
- ${CC} -c $(call FLAGS_FILTER, ${CFLAGS}, $<) $< \
- -o $@ ${INCFLAGS} -iquote .
-else
- ${CXX} -c $(call FLAGS_FILTER, ${CXXFLAGS}, $<) $< \
- -o $@ ${INCFLAGS} -iquote .
-endif
- ${OBJDUMP} -rdlCS $@ > $(basename $@).list
-
-${OBJDIR}/%.o : %.S
- mkdir -p ${OBJDIR}
- ${CC} -c ${ASMFLAGS} $< -o $@ ${ASMINCFLAGS} ${INCFLAGS} -iquote .
-
-${OBJDIR}/%.dep : %.C
- mkdir -p ${OBJDIR}; \
- rm -f $@; \
- ${CXX_RAW} -M $(call FLAGS_FILTER, ${CXXFLAGS}, $<) $< \
- -o $@.$$$$ ${INCFLAGS} -iquote .; \
- sed 's,\($*\)\.o[ :]*,${OBJDIR}/\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-${OBJDIR}/%.dep : %.cc
- mkdir -p ${OBJDIR}; \
- rm -f $@; \
- ${CXX_RAW} -M ${CXXFLAGS} $< -o $@.$$$$ ${INCFLAGS} -iquote .; \
- sed 's,\($*\)\.o[ :]*,${OBJDIR}/\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-${OBJDIR}/%.dep : %.c
- mkdir -p ${OBJDIR}; \
- rm -f $@; \
- ${CC_RAW} -M $(call FLAGS_FILTER, ${CFLAGS}, $<) $< \
- -o $@.$$$$ ${INCFLAGS} -iquote .; \
- sed 's,\($*\)\.o[ :]*,${OBJDIR}/\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-${OBJDIR}/%.dep : %.S
- mkdir -p ${OBJDIR}; \
- rm -f $@; \
- ${CC_RAW} -M ${ASMFLAGS} $< -o $@.$$$$ ${ASMINCFLAGS} ${INCFLAGS} -iquote .; \
- sed 's,\($*\)\.o[ :]*,${OBJDIR}/\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-ifdef MODULE
-${IMGDIR}/%.so : ${OBJECTS} ${ROOTPATH}/src/module.ld ${MODULE_INIT}
- ${LD} -shared -z now ${LDFLAGS} \
- $(filter-out ${ROOTPATH}/src/module.ld,$^) \
- -T ${ROOTPATH}/src/module.ld -o $@
-endif
-
-ifdef TESTS
-${OBJDIR}/${MODULE}.C: ${TESTS}
- mkdir -p ${OBJDIR}
- ${TESTGEN} --hostboot -o $@ ${TESTS}
-endif
-
-# Rules for BINARY_FILES directive.
-#
-# The BINARY_FILES directives are used to include files out of the binary
-# files cache (see 'hb cacheadd' command). This cache exists to keep
-# binary files outside of git, because they take a larger space in the git
-# database, especially if they change frequently.
-#
-# The BINARY_FILES variable is a set of <destination>:<hash_value> pairs.
-# The destination is where the make system should put the file. The hash
-# value tells which version of a file to use and it comes from the
-# 'hb cacheadd' tool when a version of the file is added to the binary
-# files cache.
-#
-define __BINARY_CACHE_FILE
-_BINARYFILES += $(1)
-
-ifneq "$(wildcard $(addprefix ${BINFILE_CACHE_LOCALDIR},$(2)))" ""
-$(1) : $(addprefix $${BINFILE_CACHE_LOCALDIR},$(2))
- echo "$(2) $$<" | sha1sum --check
- cp $$< $$@
-else
-$(1) : $(addprefix $${BINFILE_CACHE_REMOTEDIR},$(2))
- echo "$(2) $$<" | sha1sum --check
- cp $$< $$@
-endif
-endef
-ifdef BINARY_FILES
-$(foreach file,$(BINARY_FILES), \
- $(eval $(call __BINARY_CACHE_FILE, \
- $(firstword $(subst :, ,$(file))), \
- $(lastword $(subst :, ,$(file))) \
- )) \
-)
-endif
-# end BINARY_FILES rules.
-
-define ELF_template
-$${IMGDIR}/$(1).elf: $$(addprefix $${OBJDIR}/, $$($(1)_OBJECTS)) \
- $${ROOTPATH}/src/kernel.ld
- $${LD} -static $${LDFLAGS} \
- $$(addprefix $${OBJDIR}/, $$($(1)_OBJECTS)) \
- $$($(1)_LDFLAGS) -T $${ROOTPATH}/src/kernel.ld -o $$@
-endef
-$(foreach img,$(IMGS),$(eval $(call ELF_template,$(img))))
-
-${IMGDIR}/%.bin ${IMGDIR}/%.list ${IMGDIR}/%.syms: ${IMGDIR}/%.elf \
- $(wildcard ${IMGDIR}/*.so) $(addprefix ${IMGDIR}/, $($*_DATA_MODULES)) \
- ${CUSTOM_LINKER_EXE}
- ${CUSTOM_LINKER} $@ $< \
- $(addprefix ${IMGDIR}/lib, $(addsuffix .so, $($*_MODULES))) \
- --extended=0x40000 ${IMGDIR}/$*_extended.bin \
- $(addprefix ${IMGDIR}/lib, $(addsuffix .so, $($*_EXTENDED_MODULES))) \
- $(addprefix ${IMGDIR}/, $($*_DATA_MODULES)) \
- > ${IMGDIR}/.$*.lnkout
- ${ROOTPATH}/src/build/tools/addimgid $@ $<
- (cd ${ROOTPATH}; \
- src/build/tools/gensyms $*.bin $*_extended.bin 0x40000000 > ./img/$*.syms ; \
- src/build/tools/genlist $*.bin > ./img/$*.list)
-
-
-define RUHX_template
-${IMGDIR}/$$($(1)_LIDNUMBER).ruhx: $${ROOTPATH}/src/build/lids/$(1).lidhdr \
- $${IMGDIR}/$(1).bin
- $${APYFIPSHDR} -r $$< -l $${IMGDIR}/$(1).bin -o $${IMGDIR}/$(1).fips
- $${APYRUHHDR} -r $$< -l ${IMGDIR}/$(1).fips -o $${IMGDIR}/$$($(1)_LIDNUMBER).ruhx
- (rm -f $${IMGDIR}/$(1).fips)
- ln -sf $${IMGDIR}/$(1).bin $${IMGDIR}/$$($(1)_LIDNUMBER).lid
- ln -sf $${ROOTPATH}/src/build/lids/$(1).lidhdr $${IMGDIR}/$$($(1)_LIDNUMBER).lidhdr
-endef
-$(foreach img,$(IMGS),$(eval $(call RUHX_template,$(img))))
-
-define LIDHDR_template
-${IMGDIR}/$$($(1)_LIDNUMBER).lidhdr: $${ROOTPATH}/src/build/lids/$(1).lidhdr
- ln -sf $$^ $$@
-endef
-$(foreach lid,$(EXTRA_LIDS),$(eval $(call LIDHDR_template,$(lid))))
-
-${IMGDIR}/hbotStringFile : ${IMAGES}
- ${ROOTPATH}/src/build/trace/tracehash_hb.pl -c -d ${ROOTPATH}/obj -s $@
-
-${GENDIR}/hwp_id.html : ${SUBDIRS}
- ${ROOTPATH}/src/build/tools/hwp_id.pl -i -l > $@
-
-%.d: ${OBJECTS}
- cd ${basename $@} && ${MAKE} code_pass
-
-%.gen_pass:
- cd ${basename $@} && ${MAKE} gen_pass
-
-%.gcov_pass:
- cd ${basename $@} && ${MAKE} gcov_pass -ik
-
-%.clean:
- cd ${basename $@} && ${MAKE} clean
-
-%.beamdir:
- cd ${basename $@} && ${MAKE} beam
-
-code_pass: ${OBJECTS} ${SUBDIRS} ${LIBRARIES} ${EXTRA_LIDS_} ${EXTRA_PARTS}
-ifdef IMAGES
- ${MAKE} ${IMAGES} ${IMAGE_EXTRAS} ${IMAGE_EXTRA_TARGETS}
-endif
-
-gen_pass:
- mkdir -p ${GENDIR}
- mkdir -p ${GENDIR_PLUGINS}
- ${MAKE} GEN_PASS
-
-_GENFILES = $(addprefix ${GENDIR}/, $(GENFILES))
-_GENFILES += $(addprefix ${GENDIR_PLUGINS}/, $(GENFILES_PLUGINS))
-GEN_PASS: $(_GENFILES) $(_BINARYFILES) ${SUBDIRS:.d=.gen_pass}
-
-GENTARGET = $(addprefix %/, $(1))
-
-${BEAMDIR}/%.beam : %.C
- mkdir -p ${BEAMDIR}
- ${BEAMCMD} -I ${INCDIR} ${CXXFLAGS} ${BEAMFLAGS} $< \
- --beam::complaint_file=$@ --beam::parser_file=/dev/null
-
-${BEAMDIR}/%.beam : %.cc
- mkdir -p ${BEAMDIR}
- ${BEAMCMD} -I ${INCDIR} ${CXXFLAGS} ${BEAMFLAGS} $< \
- --beam::complaint_file=$@ --beam::parser_file=/dev/null
-
-${BEAMDIR}/%.beam : %.c
- mkdir -p ${BEAMDIR}
- ${BEAMCMD} -I ${INCDIR} ${CFLAGS} ${BEAMFLAGS} $< \
- --beam::complaint_file=$@ --beam::parser_file=/dev/null
-
-${BEAMDIR}/%.beam : %.S
- echo Skipping ASM file.
-
-BEAMOBJS = $(addprefix ${BEAMDIR}/, ${OBJS:.o=.beam})
-beam: ${SUBDIRS:.d=.beamdir} ${BEAMOBJS}
-
-gcov_pass:
- mkdir -p ${GCOVDIR}
- ${MAKE} GCOV_PASS
-
-GCOV_PASS: ${SUBDIRS:.d=.gcov_pass}
-ifdef OBJS
- cp ${OBJECTS:.o=.gcno} ${OBJECTS:.o=.gcda} .
- lcov --directory . -c -o ${GCOVDIR}/${GCOVNAME} \
- --gcov-tool ${GCOV} --ignore-errors source
- rm ${OBJS:.o=.gcno} ${OBJS:.o=.gcda} -f
-endif
-
-check_istep_modules: ${OBJS}
- listdeps.pl ${IMGDIR} -v
-
-cleanud :
- rm -f ${UD_OBJS}
-
-clean: cleanud ${SUBDIRS:.d=.clean}
- (rm -f ${OBJECTS} ${OBJECTS:.o=.dep} ${OBJECTS:.o=.list} \
- ${OBJECTS:.o=.o.hash} ${OBJECTS:.o=.gcno} ${OBJECTS:.o=.gcda} \
- ${BEAMOBJS} ${LIBRARIES} \
- ${IMAGES} ${IMAGES:.bin=.list} ${IMAGES:.bin=.syms} \
- ${IMAGES:.bin=.bin.modinfo} ${IMAGES:.ruhx=.lid} \
- ${IMAGES:.ruhx=.lidhdr} ${IMAGES:.bin=_extended.bin} \
- ${IMAGE_EXTRAS} ${EXTRA_LIDS_} \
- ${EXTRA_OBJS} ${_GENFILES} ${_BINARYFILES} ${EXTRA_PARTS} ${EXTRA_CLEAN} )
-
-cscope: ${SUBDIRS}
- mkdir -p ${ROOTPATH}/obj/cscope
- (cd ${ROOTPATH}/obj/cscope ; rm -f cscope.* ; \
- find ../../ -name '*.[CHchS]' -type f -fprint cscope.files; \
- cscope -bqk)
-
-ctags: ${SUBDIRS}
- mkdir -p ${ROOTPATH}/obj/cscope
- (cd ${ROOTPATH}/obj/cscope ; rm -f tags ; \
- ctags --recurse=yes --fields=+S ../../src)
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),gen_pass)
-ifneq ($(MAKECMDGOALS),GEN_PASS)
- -include $(OBJECTS:.o=.dep)
-endif
-endif
-endif
+include $(MKRULESDIR)/util.mk
+include $(MKRULESDIR)/env.mk
+include $(MKRULESDIR)/rules.mk
+include $(MKRULESDIR)/passes.mk
diff --git a/makefile b/makefile
index 3fdd33b7d..7ba22a319 100644
--- a/makefile
+++ b/makefile
@@ -23,21 +23,37 @@
SUBDIRS = src.d
ROOTPATH = .
-EXTRA_PARTS = ${GENDIR}/hwp_id.html check_istep_modules cscope ctags
+IMAGE_PASS_BODY += $(GENDIR)/hwp_id.html $(IMGDIR)/hbotStringFile
+CLEAN_TARGETS += $(GENDIR)/hwp_id.html $(IMGDIR)/hbotStringFile
+IMAGE_PASS_BODY += cscope ctags check_istep_modules
include ./config.mk
+.PHONY: docs
docs: src/build/doxygen/doxygen.conf
rm -rf obj/doxygen/*
doxygen src/build/doxygen/doxygen.conf
+.PHONY: citest
citest:
src/build/citest/cxxtest-start.sh
+.PHONY: gcov
gcov:
rm -rf obj/gcov/*
- make gcov_pass
+ $(MAKE) gcov_pass
find obj/gcov/ -size 0c | xargs rm # Delete empty files.
genhtml obj/gcov/*.lcov -o obj/gcov/html
@echo "View GCOV results with: firefox obj/gcov/html/index.html"
+$(IMGDIR)/hbotStringFile : $(IMAGES)
+ $(ROOTPATH)/src/build/trace/tracehash_hb.pl -c -d $(ROOTPATH)/obj -s $@
+
+$(GENDIR)/hwp_id.html :
+ $(ROOTPATH)/src/build/tools/hwp_id.pl -i -l > $@
+
+.PHONY: check_istep_modules
+check_istep_modules: $(OBJS)
+ listdeps.pl $(IMGDIR) -v
+
+
diff --git a/src/build/buildpnor/makefile b/src/build/buildpnor/makefile
index f52a05fbb..d8df084a4 100644
--- a/src/build/buildpnor/makefile
+++ b/src/build/buildpnor/makefile
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/build/buildpnor/makefile $
+# $Source: src/build/buildpnor/makefile $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012
+# COPYRIGHT International Business Machines Corp. 2012,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END_TAG
+# IBM_PROLOG_END_TAG
#Build PNOR Images for each platform.
#Also builds images which contain the test code.
ROOTPATH = ../../..
@@ -50,7 +50,7 @@ endef
PNOR_VBU_IMAGES = $(addsuffix .pnor, $(addprefix $(IMGDIR)/, ${PNOR_VBU_TARGETS})) \
-EXTRA_CLEAN = ${PNOR_VBU_IMAGES} ${PNOR_VBU_IMAGES:.pnor=_pnor.toc}
+CLEAN_TARGETS += ${PNOR_VBU_IMAGES} ${PNOR_VBU_IMAGES:.pnor=_pnor.toc}
include ${ROOTPATH}/config.mk
diff --git a/src/build/lids/81e00301.lidhdr b/src/build/lids/81e00301.lidhdr
deleted file mode 100644
index a1777f8da..000000000
--- a/src/build/lids/81e00301.lidhdr
+++ /dev/null
@@ -1,21 +0,0 @@
-(* BEGIN_VPD
-:RUNAME.AJSFA236
-:RULOADID.81E00301
-:BASELOAD.N
-:RUCHGLID.N
-:RUFLASH.Y
-:RUAREA.USER
-:COMMONNAME.81E00301
-:NUCSEQCTL.00
-:BNDRYRQMT.PAGE
-:LLBYPASS.N
-:RUDEST.*MCG
-:DELETERU.N
-:VPDINFONM.phal
-:RUSFGID.0000
-:RUPFGID.5050
-:RUSLFLOD.N
-:FIPSCLASS.8000
-:PHYLUM.000FF800
-:LIDINFO.
-END_VPD *)
diff --git a/src/build/lids/apyfipshdr b/src/build/lids/apyfipshdr
deleted file mode 100755
index 1eb318455..000000000
--- a/src/build/lids/apyfipshdr
+++ /dev/null
@@ -1,494 +0,0 @@
-#!/usr/bin/perl -w
-#$sec = "IBM INTERNAL USE ONLY"; $sec;
-# Author: Randal Allen Anderson III
-#
-# change history:
-# ---------------
-# 2004/02/18 v2cib526 Created from stripfipshdr shell
-#
-# enhancment suggestions:
-# -----------------------
-
-select (STDERR);$| = 1; # Make all prints to STDERR flush the buffer immediately
-select (STDOUT);$| = 1; # Make all prints to STDOUT flush the buffer immediately
-require 'ctime.pl';
-
-#global variables
-my $pgmrc = 0;
-my $Debug = 0;
-my $inputImage;
-my $inputLidhdr;
-my $outFips;
-my $magicn = 0x0222; # indicates fips header
-my $version = 3; # header version #
-my @lidnumber = (0x0000, 0x0000); # eight digit hex value
-my $bcddate1;
-my $bcddate2;
-my $bcdtime;
-my $fipsclass;
-my $lidsize;
-my $hdrsize;
-my $phylength = 4;
-my @phylum = (0xff00, 0x0000); # default to all known platforms
-my $lidinfomax = 64;
-my $lidinfo = "";
-my $mtd = 0;
-my $binfile = ""; # binary image file
-my $crc = 0;
-
-# matrix values for crc calculation
-my @crctl = (0x00000000, 0x04C11DB7, 0x09823B6E, 0x0D4326D9,
- 0x130476DC, 0x17C56B6B, 0x1A864DB2, 0x1E475005,
- 0x2608EDB8, 0x22C9F00F, 0x2F8AD6D6, 0x2B4BCB61,
- 0x350C9B64, 0x31CD86D3, 0x3C8EA00A, 0x384FBDBD);
-
-my @crcth = (0x00000000, 0x4C11DB70, 0x9823B6E0, 0xD4326D90,
- 0x34867077, 0x7897AB07, 0xACA5C697, 0xE0B41DE7,
- 0x690CE0EE, 0x251D3B9E, 0xF12F560E, 0xBD3E8D7E,
- 0x5D8A9099, 0x119B4BE9, 0xC5A92679, 0x89B8FD09);
-
-$ProgName = "apyfipshdr";
-&ParseArgs();
-chomp($msgdate = `date`);
-OutputMessage("Start of $ProgName $msgdate",4,__LINE__);
-OutputMessage("Applying fips header to $inputImage using $inputLidhdr to create $outFips",4,__LINE__);
-&readLidhdr(); # read lidhdr configuration information from lidhdr file
-&readImage(); # read in the binary file to add header to
-$crc = qx(crc32 $inputImage); # calculate crc for the file
-$crc = hex($crc);
-if ($crc <= 0) {
- OutputMessage("$ProgName was NOT successful. crc=0. Command crc32 is needed - is it in your path?",2,__LINE__);
- exit 99;
-}
-&putFips(); # create new file with fips header
-if ($pgmrc) {
- OutputMessage("$ProgName was NOT successful rc=$pgmrc",2,__LINE__);
-}
-else {
- OutputMessage("$ProgName was successful.",4,__LINE__);
-}
-chomp($msgdate = `date`);
-OutputMessage("$ProgName complete. $msgdate",4,__LINE__);
-exit($pgmrc);
-
-
-#----------------------------------------------------
-# Convert number to four digit BCD
-#----------------------------------------------------
-sub bcd {
- my $intval = shift;
- my $text = sprintf( "%04d", $intval );
- my $hexval = hex( $text );
- return $hexval;
-} # end of sub bcd
-
-
-
-#----------------------------------------------------
-# Get FipS lid class information from lidhdr file
-#----------------------------------------------------
-sub getfipsclass {
- my $text = shift;
- my $hexval = hex( $text ); # either hex value or mnemonic
- if( $hexval == 0 ){
- if( $text =~ m/FIPS_GENUS/i ){
- $hexval = 0x1301;
- }
- elsif( $text =~ m/MASTERLIST/i ){
- $hexval = 0x1311;
- }
- elsif( $text =~ m/MARKER_LID/i ){
- $hexval = 0x1321;
- }
- elsif( $text =~ m/MARKER_DS/i ){
- $hexval = 0x1331;
- }
- elsif( $text =~ m/KEY_LID/i ){
- $hexval = 0x1341;
- }
- elsif( $text =~ m/FLASH_CODE/i ){
- $hexval = 0x2000;
- }
- elsif( $text =~ m/FLASH_DATA/i ){
- $hexval = 0x2001;
- }
- elsif( $text =~ m/BOOT_CODE/i ){
- $hexval = 0x2100;
- }
- elsif( $text =~ m/BOOT_KEEP/i ){
- $hexval = 0x2110;
- }
- elsif( $text =~ m/FIPS_CODE/i ){
- $hexval = 0x2200;
- }
- elsif( $text =~ m/FIPS_DATA/i ){
- $hexval = 0x2301;
- }
- elsif( $text =~ m/KEEP_TGZ/i ){
- $hexval = 0x2310;
- }
- elsif( $text =~ m/LANGUAGE/i ){
- $hexval = 0x2311;
- }
- elsif( $text =~ m/NORM_TGZ/i ){
- $hexval = 0x2320;
- }
- elsif( $text =~ m/FIPS_DS/i ){
- $hexval = 0x2331;
- }
- elsif( $text =~ m/TBALL_KEEP/i ){
- $hexval = 0x2400;
- }
- elsif( $text =~ m/TBALL_DISC/i ){
- $hexval = 0x2500;
- }
- elsif( $text =~ m/PHYP_CODE/i ){
- $hexval = 0x3000;
- }
- elsif( $text =~ m/PHYP_DATA/i ){
- $hexval = 0x3001;
- }
- elsif( $text =~ m/PHYP_DS/i ){
- $hexval = 0x3031;
- }
- elsif( $text =~ m/SPCN_CODE/i ){
- $hexval = 0x4000;
- }
- elsif( $text =~ m/SPCN_DATA/i ){
- $hexval = 0x4001;
- }
- elsif( $text =~ m/PFW_CODE/i ){
- $hexval = 0x5000;
- }
- elsif( $text =~ m/PFW_DATA/i ){
- $hexval = 0x5001;
- }
- elsif( $text =~ m/PFW_DS/i ){
- $hexval = 0x5031;
- }
- elsif( $text =~ m/SMA_CODE/i ){
- $hexval = 0x6000;
- }
- elsif( $text =~ m/SMA_DATA/i ){
- $hexval = 0x6001;
- }
- elsif( $text =~ m/SLDR_CODE/i ){
- $hexval = 0x7000;
- }
- elsif( $text =~ m/SLDR_DATA/i ){
- $hexval = 0x7001;
- }
- }
- return $hexval;
-} # end of sub getfipsclass
-
-
-#----------------------------------------------------
-# Get lid number from lidhdr file
-#----------------------------------------------------
-sub getlidnum {
- my $text = shift;
- $text =~ s/^\s*//;
- $text =~ s/\s*$//;
- my $count = ($text =~ tr/0-9A-Fa-f//); # either all hex or mnemonic
- if( $count == 8 ){
- my $first = substr( $text, 0, 4 );
- my $secnd = substr( $text, 4 );
- $lidnum[0] = hex( $first );
- $lidnum[1] = hex( $secnd );
- }
- else {
- OutputMessage("RULOADID: lid number is not recognizable", 2, __LINE__);
- }
-} # end of sub getlidnum
-
-
-#----------------------------------------------------
-# Get platform phylum information from lidhdr file
-#----------------------------------------------------
-sub getphylum {
- my $text = shift;
- $text =~ s/^\s*//;
- $text =~ s/\s*$//;
- my $count = ($text =~ tr/0-9A-Fa-f//); # either all hex or mnemonic
- if( $count == length( $text )){
- $phylength = int(( length( $text ) + 1 ) / 2 );
- if( $phylength < 4 ){
- $phylength = 4; # default 4 bytes for phylum data
- }
- while( length( $text ) < ( $phylength * 2 )){
- $text .= "0"; # expand input to proper length
- }
- @phylum = ();
- do {
- if( length( $text ) > 4 ){
- $convt = substr( $text, 0, 4 );
- $text = substr( $text, 4 );
- }
- else {
- $convt = $text;
- $text = "";
- }
- while( length( $convt ) < 4 ){
- $convt .= "0"; # four digit integer - forces bits to high end
- }
- my $hexval = hex( $convt );
- push @phylum, $hexval;
- } while( length( $text ) > 0 );
- }
- else {
- @phylum = (0x0000, 0x0000); # default to no platforms
- my @platforms = split( ',', $text ); # separate by commas
- while( my $pltfrm = shift( @platforms )){
- my @plats = split( ' ', $pltfrm ); # separage by spaces
- while( my $pform = shift( @plats )){
- $pform =~ s/^\s*//;
- $pform =~ s/\s*$//;
- if( $pform =~ m/CRP/i ){
- $phylum[0] |= 0x8000;
- }
- elsif( $pform =~ m/ALPHA/i ){
- $phylum[0] |= 0x4000;
- }
- elsif( $pform =~ m/QLA1/i ){
- $phylum[0] |= 0x2000;
- }
- elsif( $pform =~ m/HE/i ){
- $phylum[0] |= 0x0800;
- }
- elsif( $pform =~ m/SC/i ){
- $phylum[0] |= 0x0800;
- }
- elsif( $pform =~ m/MR/i ){
- $phylum[0] |= 0x0400;
- }
- elsif( $pform =~ m/ML/i ){
- $phylum[0] |= 0x0400;
- }
- elsif( $pform =~ m/LE/i ){
- $phylum[0] |= 0x0200;
- }
- elsif( $pform =~ m/BPC/i ){
- $phylum[0] |= 0x0100;
- }
- }
- }
- }
-} # end of sub getphylum
-
-
-#----------------------------------------------------
-# Display help text for this program
-#----------------------------------------------------
-sub help {
- print STDERR "$ProgName, Version $version\n";
- print STDERR "Description: This program will apply a fips header to a file.\n";
- print STDERR "Usage:\n\t$ProgName -r <filename.lidhdr> -l <filename> [-o <filename.fips>] [-debug] [-help]\n";
- print STDERR "Where:\n";
- print STDERR "\t -debug\t\t\t- display debug messages.\n";
- print STDERR "\t -help\t\t\t- this help display.\n";
- print STDERR "Example:\n";
- print STDERR "\t$ProgName -r 80a00001.lidhdr -l 80a00001.img -o 80a00001.fips\n";
- print "\n";
- exit(0);
-} # end of sub help
-
-
-#----------------------------------------------------
-# Generate an error message
-#----------------------------------------------------
-sub OutputMessage {
- local($message, $sevLevel, $lineNum) = @_;
-
- # Set the severity tag
- if ($sevLevel == 1) {
- $tag = "(S)";
- } elsif ($sevLevel == 2) {
- $tag = "(E)";
- } elsif ($sevLevel == 3) {
- $tag = "(W)";
- } elsif ($sevLevel == 4) {
- $tag = "(I)";
- } else {
- $tag = "(?)";
- }
-
- # print the user message
- print "$tag [$ProgName-$lineNum] $message\n";
-
- # Exit upon a severe message
- exit(-1) if ($sevLevel == 1);
-} # end of sub OutputMessage
-
-
-#----------------------------------------------------
-# Parse the program input arguments
-#----------------------------------------------------
-sub ParseArgs {
- local(@args) = @ARGV;
- local($Arg);
- my $oops;
- while ($Arg = shift(@args)) {
- if ($Arg =~ m/^-debug$/) { #debug flag for more verbose output
- $Debug = 1;
- next;
- }
- elsif ($Arg =~ m/^-h/) { #display help
- &help;
- exit(0);
- }
- elsif ($Arg =~ m/-r/) { #set name of VPD info file
- $inputLidhdr = shift(@args);
- next;
- }
- elsif ($Arg =~ m/-l/) { #set name of image input file
- $inputImage = shift(@args);
- next;
- }
- elsif ($Arg =~ m/-o/) { #set name of output file
- $outFips = shift(@args);
- next;
- }
- else {
- $oops .= "$Arg is not a valid parameter.";
- }
- }
- if( !$inputImage ){
- $oops .= "You must supply an input image file.\n";
- }
- if( !$inputLidhdr ){
- if( $inputImage ){
- $inputLidhdr = $inputImage;
- if( $inputLidhdr =~ m/(.*)\..*/ ){
- $inputLidhdr = $1;
- }
- $inputLidhdr .= ".lidhdr";
- }
- }
- if( !$outFips ){
- if( $inputImage ){
- $outFips = $inputImage;
- if( $outFips =~ m/(.*)\..*/ ){
- $outFips = $1;
- }
- $outFips .= ".fips";
- }
- }
- if( $oops ){
- OutputMessage( $oops, 2, __LINE__ );
- &help;
- }
-} # end of sub ParseArgs
-
-
-#----------------------------------------------------
-# Put the FipS header and file data to a new file
-#----------------------------------------------------
-sub putFips {
- OutputMessage("Creating $outFips file",4,__LINE__);
- if (open(FIPS,">$outFips")) {
- binmode(FIPS);
- # n fields H8 fields C fields lidinfo n fields phylum
- $hdrsize = ( 8 * 2 ) + ( 3 * 4 ) + ( 4 * 1 ) + 64 + ( 4 * 2 ) + $phylength;
- print FIPS pack('n',$magicn); # fips file magic #
- print FIPS pack('n',$version); # version
- print FIPS pack('n',$lidnum[0]); # high lid # nibble
- print FIPS pack('n',$lidnum[1]); # low lid # nibble
- print FIPS pack('n',$bcddate1); # bcd year
- print FIPS pack('n',$bcddate2); # bcd mm/dd
- print FIPS pack('n',$bcdtime); # bcd hh:mm
- print FIPS pack('n',$fipsclass); # fips lid class
- $crchex = sprintf( "%08x", $crc );
- print FIPS pack('H8',$crchex); # 32 bit IEEE standard crc
- $lidsizehex = sprintf( "%08x", $lidsize );
- print FIPS pack('H8',$lidsizehex); # lid size
- $hdrsizehex = sprintf( "%08x", $hdrsize );
- print FIPS pack('H8',$hdrsizehex); # header size
- print FIPS pack('C',$mtd); # mtd #
- print FIPS pack('C',1); # valid=1, invalid=0
- print FIPS pack('C',0); # alignment
- print FIPS pack('C',$lidinfomax); # lid info size
- print FIPS pack('a64',$lidinfo); # lid info string (64 bytes)
- print FIPS pack('n',0); # bcd update date year
- print FIPS pack('n',0); # bcd update date mm/dd
- print FIPS pack('n',0); # bcd update time hh:mm
- print FIPS pack('n',$phylength); # size of phylum field
- if( $phylength > 0 ){
- my $phytemp = "";
- foreach my $phy ( @phylum ){
- $phytemp .= sprintf( "%04x", $phy );
- }
- for( my $iTemp = 0; $iTemp < $phylength; $iTemp++ ){
- my $hoot = substr( $phytemp, $iTemp*2, 2 );
- my $ttemp = hex( $hoot );
- print FIPS pack('C',$ttemp);
- }
- }
- print FIPS $binfile;
- close(FIPS);
- }
- else {
- OutputMessage("failed to open $outFips for output",1,__LINE__);
- }
-} # end of sub putFips
-
-
-#----------------------------------------------------
-# Get the lidhdr information from the lidhdr file
-#----------------------------------------------------
-sub readLidhdr {
- if (open(LIDHDR,"<$inputLidhdr")) {
- while( my $line = <LIDHDR> ) {
- if( $line =~ m/ruloadid\.(.*)/i ){
- &getlidnum( $1 );
- }
- elsif( $line =~ m/fipsclass\.(.*)/i ){
- $fipsclass = &getfipsclass( $1 );
- }
- elsif( $line =~ m/phylum\.(.*)/i ){
- &getphylum( $1 );
- }
- elsif( $line =~ m/lidinfo\.(.*)/i ){
- $lidinfo = $1;
- $lidinfo =~ s/\s//g;
- if( length( $lidinfo ) > $lidinfomax ){
- $lidinfo = substr( $lidinfo, 0, $lidinfomax );
- }
- }
- elsif( $line =~ m/mtd\.(.*)/i ){
- $mtd = $1;
- }
- }
- close(LIDHDR);
- }
- else {
- OutputMessage( "lidhdr file $inputLidhdr could not be opened.", 1, __LINE__);
- }
-} # end of sub readLidhdr
-
-
-#----------------------------------------------------
-# Get the image file as binary data
-#----------------------------------------------------
-sub readImage {
- my $readsize = 512;
- my $bytesread;
- if (open(LID,"<$inputImage")) {
- binmode(LID);
- $bytesread = $readsize;
- while ($bytesread == $readsize) {
- $bytesread = read(LID,$binfile,$readsize,length($binfile));
- }
- close(LID);
- my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdef, $size, $atime, $mtime, $ctime,
- $blksize, $blocks) = stat("$inputImage");
- my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime( $ctime );
- $bcddate1 = bcd( $year + 1900 );
- $bcddate2 = bcd((( $mon + 1 ) * 100 ) + $mday );
- $bcdtime = bcd(( $hour * 100 ) + $min );
- $lidsize = $size;
- }
- else {
- OutputMessage( "Input file $inputImage could not be opened.", 1, __LINE__);
- }
-} # end of sub readImage
diff --git a/src/build/lids/apyruhhdr b/src/build/lids/apyruhhdr
deleted file mode 100755
index dae3e8eff..000000000
--- a/src/build/lids/apyruhhdr
+++ /dev/null
Binary files differ
diff --git a/src/build/lids/crc32 b/src/build/lids/crc32
deleted file mode 100755
index b795274b4..000000000
--- a/src/build/lids/crc32
+++ /dev/null
Binary files differ
diff --git a/src/build/lids/dslid.lidhdr b/src/build/lids/dslid.lidhdr
deleted file mode 100644
index 54c86f159..000000000
--- a/src/build/lids/dslid.lidhdr
+++ /dev/null
@@ -1,10 +0,0 @@
-(* BEGIN_VPD
-:RUNAME.AJDFG498
-:RULOADID.80F001FE
-:RUFLASH.Y
-:RUDEST.*MCG
-:VPDINFONM.phal
-:FIPSCLASS.8031
-:PHYLUM.00020000
-:LIDINFO.
-END_VPD *)
diff --git a/src/build/lids/halruntime.lidhdr b/src/build/lids/halruntime.lidhdr
deleted file mode 100644
index bf89326ba..000000000
--- a/src/build/lids/halruntime.lidhdr
+++ /dev/null
@@ -1,10 +0,0 @@
-(* BEGIN_VPD
-:RUNAME.AJDFG491
-:RULOADID.80F00101
-:RUFLASH.Y
-:RUDEST.*MCG
-:VPDINFONM.phal
-:FIPSCLASS.8000
-:PHYLUM.00020000
-:LIDINFO.
-END_VPD *)
diff --git a/src/build/lids/hbicore.lidhdr b/src/build/lids/hbicore.lidhdr
deleted file mode 100644
index 43eaa88ae..000000000
--- a/src/build/lids/hbicore.lidhdr
+++ /dev/null
@@ -1,10 +0,0 @@
-(* BEGIN_VPD
-:RUNAME.AJDFG490
-:RULOADID.80F00100
-:RUFLASH.Y
-:RUDEST.*MCG
-:VPDINFONM.phal
-:FIPSCLASS.8000
-:PHYLUM.00020000
-:LIDINFO.
-END_VPD *)
diff --git a/src/build/lids/phal.vpdinfo b/src/build/lids/phal.vpdinfo
deleted file mode 100644
index 1f75530f8..000000000
--- a/src/build/lids/phal.vpdinfo
+++ /dev/null
@@ -1,35 +0,0 @@
-!* BEGIN_VPD
-!*:PRODUCTID.AJDG401
-!*:RUNAME.AJDG4010
-!*:VERLEVEL.0001
-!*:RELMODLVL.0100
-!*:DEVELBY.Y
-!*:DEVLABID.10
-!*:DEVELFOR.Y
-!*:INSTRSET.
-!*:SWRTYPE.MCG
-!*:VENDORID.
-!*:DIVISION.ABS
-!*:STRADDR.HWY 52 NORTH & 37TH STREET
-!*:CITY.ROCHESTER
-!*:STATEPROV.MINNESOTA
-!*:COUNTRY.USA
-!*:POCODE.55901
-!*:COPYRIGHT1.9400LIC (C) COPYRIGHT IBM CORP 1980, 1988
-!*:COPYRIGHT2.ALL RIGHTS RESERVED, LIC. INT. CODE, IBM PROP.
-!*:MCGPARTNUM.
-!*:INTPCLVL.
-!*:PTFPRFIXID.
-!*:CODEPFGID.5050
-!*:RUAREA.USER
-!*:NUCSEQCTL.00
-!*:BNDRYRQMT.PAGE
-!*:LLBYPASS.N
-!*:RUDEST.LD91
-!*:DELETERU.N
-!*:GROUP IDF='PFGLIST' LEN=4 COLHDR1='PFG Identification'.
-!*:EGROUP.
-!*:PFGRUNAME.AJDG4011
-!*:SFGRUNAME.AJDG4012
-!*:LPPTYPE.PP
-!* END_VPD
diff --git a/src/build/linker/makefile b/src/build/linker/makefile
index 88f2a5fa0..0eb5c03ce 100644
--- a/src/build/linker/makefile
+++ b/src/build/linker/makefile
@@ -1,14 +1,37 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/linker/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
linker: linker.C
i686-mcp6-g++ -O3 -g linker.C -o linker -lbfd -liberty -lz
-all: code_pass
+all: CODE_PASS
-code_pass: linker
+CODE_PASS: linker
-gen_pass:
+GEN_PASS:
clean:
(rm -f linker)
-beam:
-
+BEAM_PASS:
+IMAGE_PASS:
+CLEAN_PASS: clean
diff --git a/src/build/mkrules/beam.env.mk b/src/build/mkrules/beam.env.mk
new file mode 100644
index 000000000..cabe35ec1
--- /dev/null
+++ b/src/build/mkrules/beam.env.mk
@@ -0,0 +1,43 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/beam.env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: beam.env.mk
+# Description:
+# Configuration of the BEAM settings.
+
+BEAMVER = beam-3.5.2
+BEAMPATH = /afs/rch/projects/esw/beam/$(BEAMVER)
+BEAMCMD = i686-mcp6-jail $(BEAMPATH)/bin/beam_compile
+BEAMFLAGS = \
+ --beam::source=$(BEAMPATH)/tcl/beam_default_parms.tcl \
+ --beam::source=$(ROOTPATH)/src/build/beam/compiler_c_config.tcl \
+ --beam::source=$(ROOTPATH)/src/build/beam/compiler_cpp_config.tcl \
+ --beam::exit0 \
+ -o /dev/null
+
+ifdef MODULE
+BEAMDIR = $(ROOTPATH)/obj/beam/$(MODULE)
+else
+BEAMDIR = $(ROOTPATH)/obj/beam/core
+endif
+
diff --git a/src/build/mkrules/beam.rules.mk b/src/build/mkrules/beam.rules.mk
new file mode 100644
index 000000000..d77cd94ef
--- /dev/null
+++ b/src/build/mkrules/beam.rules.mk
@@ -0,0 +1,56 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/beam.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: beam.rules.mk
+# Description:
+# Rules for running BEAM on C/C++/ASM files.
+
+$(BEAMDIR)/%.beam : %.C
+ $(C2) " BEAM $(notdir $<)"
+ $(C1)$(BEAMCMD) $(INCFLAGS) $(CXXFLAGS) $(BEAMFLAGS) $< \
+ --beam::complaint_file=$@ --beam::parser_file=/dev/null
+
+$(BEAMDIR)/%.beam : %.cc
+ $(C2) " BEAM $(notdir $<)"
+ $(C1)$(BEAMCMD) $(INCFLAGS) $(CXXFLAGS) $(BEAMFLAGS) $< \
+ --beam::complaint_file=$@ --beam::parser_file=/dev/null
+
+$(BEAMDIR)/%.beam : %.c
+ $(C2) " BEAM $(notdir $<)"
+ $(C1)$(BEAMCMD) $(INCFLAGS) $(CXXFLAGS) $(BEAMFLAGS) $< \
+ --beam::complaint_file=$@ --beam::parser_file=/dev/null
+
+$(BEAMDIR)/%.beam : %.S
+ @echo Skipping ASM file: $<
+
+
+BEAMOBJS = $(addprefix $(BEAMDIR)/, $(OBJS:.o=.beam))
+
+beam: BEAM_PASS
+
+.PHONY: make_beamdir
+make_beamdir:
+ @mkdir -p $(BEAMDIR)
+
+BEAM_PASS_PRE += make_beamdir
+BEAM_PASS_BODY += $(BEAMOBJS)
diff --git a/src/build/mkrules/binfile.env.mk b/src/build/mkrules/binfile.env.mk
new file mode 100644
index 000000000..122079f89
--- /dev/null
+++ b/src/build/mkrules/binfile.env.mk
@@ -0,0 +1,30 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/binfile.env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: binfile.env.mk
+# Description:
+# Configuration of the binary file-cache settings.
+
+BINFILE_CACHE_LOCALDIR = $(ROOTPATH)/.git/hb_cache/data/
+BINFILE_CACHE_REMOTEDIR = /gsa/ausgsa/projects/h/hostboot/.binary_cache/data/
+
diff --git a/src/build/mkrules/binfile.rules.mk b/src/build/mkrules/binfile.rules.mk
new file mode 100644
index 000000000..1f2ac1522
--- /dev/null
+++ b/src/build/mkrules/binfile.rules.mk
@@ -0,0 +1,67 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/binfile.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2012,2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: binfile.rules.mk
+# Description:
+# Rules for copying files from the binary file cache.
+
+ifdef BINARY_FILES
+
+# Rules for BINARY_FILES directive.
+#
+# The BINARY_FILES directives are used to include files out of the binary
+# files cache (see 'hb cacheadd' command). This cache exists to keep
+# binary files outside of git, because they take a larger space in the git
+# database, especially if they change frequently.
+#
+# The BINARY_FILES variable is a set of <destination>:<hash_value> pairs.
+# The destination is where the make system should put the file. The hash
+# value tells which version of a file to use and it comes from the
+# 'hb cacheadd' tool when a version of the file is added to the binary
+# files cache.
+#
+define __BINARY_CACHE_FILE
+GEN_PASS_BODY += $(1)
+CLEAN_TARGETS += $(1)
+
+ifneq "$(wildcard $(addprefix $(BINFILE_CACHE_LOCALDIR),$(2)))" ""
+$(1) : $(addprefix $$(BINFILE_CACHE_LOCALDIR),$(2))
+ $$(C2) " BINFILE $$(notdir $$@)"
+ $$(C1)echo "$(2) $$<" | sha1sum --check > /dev/null
+ $$(C1)cp $$< $$@
+else
+$(1) : $(addprefix $$(BINFILE_CACHE_REMOTEDIR),$(2))
+ $$(C2) " BINFILE $$(notdir $$@)"
+ $$(C1)echo "$(2) $$<" | sha1sum --check > /dev/null
+ $$(C1)cp $$< $$@
+endif
+endef
+
+$(foreach file,$(BINARY_FILES), \
+ $(eval $(call __BINARY_CACHE_FILE, \
+ $(firstword $(subst :, ,$(file))), \
+ $(lastword $(subst :, ,$(file))) \
+ )) \
+)
+
+endif
diff --git a/src/build/mkrules/cc.env.mk b/src/build/mkrules/cc.env.mk
new file mode 100644
index 000000000..930a989d8
--- /dev/null
+++ b/src/build/mkrules/cc.env.mk
@@ -0,0 +1,41 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/cc.env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: cc.env.mk
+# Description:
+# Configuration of the compiler settings.
+
+MCP_VER = mcp6
+
+CC_RAW = ppc64-$(MCP_VER)-gcc -std=c99
+CXX_RAW = ppc64-$(MCP_VER)-g++
+CC = $(TRACEPP) $(CC_RAW)
+CXX = $(TRACEPP) $(CXX_RAW)
+
+LD = ppc64-$(MCP_VER)-ld
+OBJDUMP = ppc64-$(MCP_VER)-objdump
+GCOV = ppc64-$(MCP_VER)-gcov
+
+CUSTOM_LINKER_EXE = $(ROOTPATH)/src/build/linker/linker
+CUSTOM_LINKER = i686-$(MCP_VER)-jail $(CUSTOM_LINKER_EXE)
+
diff --git a/src/build/mkrules/cc.rules.mk b/src/build/mkrules/cc.rules.mk
new file mode 100644
index 000000000..100575095
--- /dev/null
+++ b/src/build/mkrules/cc.rules.mk
@@ -0,0 +1,69 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/cc.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: cc.rules.mk
+# Description:
+# Rules for compiling C/C++/ASM files.
+
+$(OBJDIR)/%.list : $(OBJDIR)/%.o
+ $(C2) " OBJDUMP $(notdir $<)"
+ $(C1)$(OBJDUMP) -rdlCS $< > $@
+
+$(OBJDIR)/%.o : %.C
+ @mkdir -p $(OBJDIR)
+ $(C2) " CXX $(notdir $<)"
+ $(C1)$(CXX) -c $(call FLAGS_FILTER, $(CXXFLAGS), $<) $< \
+ -o $@ $(INCFLAGS) -iquote .
+
+# Compiling *.cc files
+$(OBJDIR)/%.o : %.cc
+ @mkdir -p $(OBJDIR)
+ $(C2) " CXX $(notdir $<)"
+ $(C1)$(CXX) -c $(CXXFLAGS) $< -o $@ $(INCFLAGS) -iquote .
+
+$(OBJDIR)/%.o : %.c
+ @mkdir -p $(OBJDIR)
+# Override to use C++ compiler in place of C compiler
+# CC_OVERRIDE is set in the makefile of the component
+ifndef CC_OVERRIDE
+ $(C2) " CC $(notdir $<)"
+ $(C1)$(CC) -c $(call FLAGS_FILTER, $(CFLAGS), $<) $< \
+ -o $@ $(INCFLAGS) -iquote .
+else
+ $(C2) " CXX $(notdir $<)"
+ $(C1)$(CXX) -c $(call FLAGS_FILTER, $(CXXFLAGS), $<) $< \
+ -o $@ $(INCFLAGS) -iquote .
+endif
+
+$(OBJDIR)/%.o : %.S
+ @mkdir -p $(OBJDIR)
+ $(C2) " CC $(notdir $<)"
+ $(C1)$(CC) -c $(ASMFLAGS) $< -o $@ $(ASMINCFLAGS) $(INCFLAGS) -iquote .
+
+ifdef MODULE
+$(IMGDIR)/lib$(MODULE).so : $(OBJECTS) $(ROOTPATH)/src/module.ld $(MODULE_INIT)
+ $(C2) " LD $(notdir $@)"
+ $(C1)$(LD) -shared -z now $(LDFLAGS) \
+ $(OBJECTS) $(MODULE_INIT) \
+ -T $(ROOTPATH)/src/module.ld -o $@
+endif
diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
new file mode 100644
index 000000000..852464c68
--- /dev/null
+++ b/src/build/mkrules/cflags.env.mk
@@ -0,0 +1,45 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/cflags.env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: cflags.env.mk
+# Description:
+# Configuration of the compiler, linker, etc. flags.
+
+OPT_LEVEL ?= -O3
+
+ifdef MODULE
+COMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions
+CFLAGS += -D__HOSTBOOT_MODULE=$(MODULE)
+endif
+
+COMMONFLAGS += $(OPT_LEVEL) -nostdlib
+CFLAGS += $(COMMONFLAGS) -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\
+ -Wall -Werror -mtraceback=no -pipe
+ASMFLAGS += $(COMMONFLAGS) -mcpu=power7
+CXXFLAGS += $(CFLAGS) -nostdinc++ -fno-rtti -fno-exceptions -Wall
+LDFLAGS += --nostdlib --sort-common $(COMMONFLAGS)
+
+INCFLAGS = $(addprefix -I, $(INCDIR) )
+ASMINCFLAGS = $(addprefix $(lastword -Wa,-I), $(INCDIR))
+
+FLAGS_FILTER ?= $(1)
diff --git a/src/build/mkrules/cscope.rules.mk b/src/build/mkrules/cscope.rules.mk
new file mode 100644
index 000000000..0703ab792
--- /dev/null
+++ b/src/build/mkrules/cscope.rules.mk
@@ -0,0 +1,42 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/cscope.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: cscope.rules.mk
+# Description:
+# Rules for running Cscope and Ctags against the codebase.
+
+.PHONY: cscope
+cscope:
+ @mkdir -p $(ROOTPATH)/obj/cscope
+ $(C2) " CSCOPE"
+ $(C1)(cd $(ROOTPATH)/obj/cscope ; rm -f cscope.* ; \
+ find ../../ -name '*.[CHchS]' -type f -fprint cscope.files; \
+ cscope -bqk)
+
+.PHONY: ctags
+ctags:
+ @mkdir -p $(ROOTPATH)/obj/cscope
+ $(C2) " CTAGS"
+ $(C1)(cd $(ROOTPATH)/obj/cscope ; rm -f tags ; \
+ ctags --recurse=yes --fields=+S ../../src)
+
diff --git a/src/build/mkrules/cxxtest.rules.mk b/src/build/mkrules/cxxtest.rules.mk
new file mode 100644
index 000000000..576366978
--- /dev/null
+++ b/src/build/mkrules/cxxtest.rules.mk
@@ -0,0 +1,45 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/cxxtest.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: cxxtest.rules.mk
+# Description:
+# Rules for creating the CxxTest driver for a testcase module.
+
+ifdef TESTS
+
+TESTGEN = $(ROOTPATH)/src/usr/cxxtest/cxxtestgen.pl
+
+ifdef MODULE
+OBJS += $(MODULE).o
+CLEAN_TARGETS += $(OBJDIR)/$(MODULE).C
+vpath %.C $(OBJDIR) $(shell mkdir -p $(OBJDIR))
+else
+$(error MODULE must be defined for a testcase.)
+endif
+
+$(OBJDIR)/$(MODULE).C: $(TESTS)
+ @mkdir -p $(OBJDIR)
+ $(C2) " TESTGEN $(notdir $@)"
+ $(C1)$(TESTGEN) --hostboot -o $@ $(TESTS)
+
+endif
diff --git a/src/build/mkrules/dep.rules.mk b/src/build/mkrules/dep.rules.mk
new file mode 100644
index 000000000..a34f1237f
--- /dev/null
+++ b/src/build/mkrules/dep.rules.mk
@@ -0,0 +1,61 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/dep.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: dep.rules.mk
+# Description:
+# Rules for creating the header-file dependencies for C/C++/ASM files.
+
+$(OBJDIR)/%.dep : %.C
+ @mkdir -p $(OBJDIR)
+ $(C2) " DEP $(notdir $<)"
+ $(C1)rm -f $@; \
+ $(CXX_RAW) -M $(call FLAGS_FILTER, $(CXXFLAGS), $<) $< \
+ -o $@.$$$$ $(INCFLAGS) -iquote .; \
+ sed 's,\($*\)\.o[ :]*,$(OBJDIR)/\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+$(OBJDIR)/%.dep : %.cc
+ @mkdir -p $(OBJDIR)
+ $(C2) " DEP $(notdir $<)"
+ $(C1)rm -f $@; \
+ $(CXX_RAW) -M $(CXXFLAGS) $< -o $@.$$$$ $(INCFLAGS) -iquote .; \
+ sed 's,\($*\)\.o[ :]*,$(OBJDIR)/\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+$(OBJDIR)/%.dep : %.c
+ @mkdir -p $(OBJDIR)
+ $(C2) " DEP $(notdir $<)"
+ $(C1)rm -f $@; \
+ $(CC_RAW) -M $(call FLAGS_FILTER, $(CFLAGS), $<) $< \
+ -o $@.$$$$ $(INCFLAGS) -iquote .; \
+ sed 's,\($*\)\.o[ :]*,$(OBJDIR)/\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+$(OBJDIR)/%.dep : %.S
+ @mkdir -p $(OBJDIR)
+ $(C2) " DEP $(notdir $<)"
+ $(C1)rm -f $@; \
+ $(CC_RAW) -M $(ASMFLAGS) $< -o $@.$$$$ $(ASMINCFLAGS) $(INCFLAGS) -iquote .; \
+ sed 's,\($*\)\.o[ :]*,$(OBJDIR)/\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
diff --git a/src/build/mkrules/dist_rules.mk b/src/build/mkrules/dist.rules.mk
index c3d834163..b9b069920 100644
--- a/src/build/mkrules/dist_rules.mk
+++ b/src/build/mkrules/dist.rules.mk
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/build/mkrules/dist_rules.mk $
+# $Source: src/build/mkrules/dist.rules.mk $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012
+# COPYRIGHT International Business Machines Corp. 2012,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END_TAG
+# IBM_PROLOG_END_TAG
#
# Makefile rules defining all the actions for the Hostboot content delivery.
@@ -74,7 +74,7 @@ $(TESTVAR_CHANGED_FILE):
# ------------- File searching directives ----------------------
# ROOTPATH_WILDCARD and ROOTPATH_WILDCARD_RECURSIVE are useful functions
-# for defining targets (in dist_targets.mk) where a .../path/* is wanted.
+# for defining targets (in dist.targets.mk) where a .../path/* is wanted.
#
# ROOTPATH_WILDCARD takes a file-path-pattern relative to the ROOTPATH and
# returns all the files matching it. (Ex. src/build/debug/Hostboot/*.pm).
@@ -134,13 +134,13 @@ endif
#
# __SOURCE_FOR_TARGET utility function takes a three-tuple of
-# [ 1=target, 2=source, 3=comma-separated-targets ].
+# [ 1=target, 2=source, 3=comma-separated-targets ].
#
# If the current target (1) is in the list (3) then the source is returned.
# If the list (3) contains 'all' then the source is returned, unless the
# current target (1) is 'tools'.
#
-# Ex:
+# Ex:
# __SOURCE_FOR_TARGET("fsp", "foobar", "vpo,tools") => ""
# __SOURCE_FOR_TARGET("fsp", "foobar", "fsp,vpo") => "foobar"
# __SOURCE_FOR_TARGET("fsp", "foobar", "all") => "foobar"
@@ -155,7 +155,7 @@ __SOURCE_FOR_TARGET = $(if $(findstring tools,$(1)), \
)
# ------------- COPY_FILE directives ----------------------
# COPY_FILES format is <source file>:<comma separated targets>
-#
+#
# For each file in COPY_FILES and target, we need to create a recipe of:
# $(TARGET_DIR)$(TARGET)/$(FILE) depends on $(ROOTPATH)/$(FILE)
#
@@ -187,7 +187,7 @@ $(foreach targ,$(COPY_FILES), \
# ------------- COPY_RENAME_FILE directives ----------------------
# COPY_RENAME_FILES format is:
# <dest file>:<source file>:<comma separated targets>
-#
+#
# For each file in COPY_RENAME_FILES and target, we need to create a recipe:
# $(TARGET_DIR)$(TARGET)/$(DEST) depends on $(ROOTPATH)/$(SOURCE)
#
@@ -219,7 +219,7 @@ $(foreach targ,$(COPY_RENAME_FILES), \
# ------------- LINK_FILE directives ----------------------
# LINK_FILES format is:
# <dest link>:<source file>:<comma separated targets>
-#
+#
# For each file in LINK_FILES and target, we need to create a recipe:
# $(TARGET_DIR)$(TARGET)/$(DEST) depends on $(TARGET_DIR)$(TARGET)/$(SOURCE)
#
@@ -252,15 +252,15 @@ $(foreach targ,$(LINK_FILES), \
# ------------- TAR file directives ----------------------
# <TARFILE>_CONTENTS format is:
# <file>[:<kept root of path>]
-#
+#
# For each file in TAR_FILES and target, we need to create a recipe:
# $(TARGET_DIR)$(TARGET)/$(TARFILE) depends on [a bunch of content].
#
# The content is determined by iterating through all of the files listed
-# in <TARFILE>_CONTENTS and calling TAR_CONTENT_SOURCEFILE.
+# in <TARFILE>_CONTENTS and calling TAR_CONTENT_SOURCEFILE.
#
# Since there is potential renaming going on as part of the TAR creation
-# process, the recipe template for creating a TAR is longer than the others.
+# process, the recipe template for creating a TAR is longer than the others.
# We need to create a temporary directory, populate it with the content,
# create the TAR file, and then remove the temporary directory.
#
@@ -311,7 +311,7 @@ $(TARGET_DIR)$(2)/$(1): $$(foreach file, $$($(1)_CONTENTS), \
$$(call TAR_CONTENT_DESTFILE, $$(file)))) ;\
)
@tar --create --file $$@ -C $$(TAR_TEMP_DIR)/ .
- @touch $$@
+ @touch $$@
@rm -rf $$(TAR_TEMP_DIR)
endef
define TAR_TARGET_RULE
@@ -330,7 +330,7 @@ $(foreach targ,$(TAR_FILES), \
# that calls into the ODE sandbox and performs a 'mk' operation. In
# order to reduce the number of 'mk' calls done we allow the ODE_REMAKE
# directives to be dependent upon something created for the target (such
-# as a tarfile). __ODE_REMAKE_TARGET is a function that creates a
+# as a tarfile). __ODE_REMAKE_TARGET is a function that creates a
# filename to touch based on the sandbox subdirectory and context where the
# 'mk' operation is being performed.
#
@@ -381,7 +381,7 @@ ODE_REMAKE_RULE = $(eval $(call __ODE_REMAKE_RULE,,$(2)))\
#
# Building a target is 3 simple stages:
# 1) Print a "Starting <TARGET>" message.
-# 2) Build all of the target dependencies
+# 2) Build all of the target dependencies
# (based on the <TARGET>_<ACTION> variables).
# 3) Print a "Completed <TARGET>" message.
#
@@ -429,7 +429,7 @@ $(1)_TARGET: \
$$(addprefix $$(TARGET_DIR)/,$$($(1)_TAR_FILE)) \
$$(addprefix $$(TARGET_DIR)/,$$($(1)_ODE_REMAKE_DEPS))
@echo TARGET $(1) complete.
-
+
$(1)_TARGET_AS_SUBDIR: \
$(1)_TARGET_ECHO_START \
$$(addprefix $$(TARGET_DIR)/$(1)/,$$(notdir $$($(1)_COPY_FILE))) \
diff --git a/src/build/mkrules/dist_targets.mk b/src/build/mkrules/dist.targets.mk
index 2e9bcd09a..ff2b5179c 100644
--- a/src/build/mkrules/dist_targets.mk
+++ b/src/build/mkrules/dist.targets.mk
@@ -112,11 +112,11 @@ LINK_FILES = \
# <file>[:<kept root of path>]
#
# Examples:
-# src/hbfw/simics/makefile on FSP is created from
+# src/hbfw/simics/makefile on FSP is created from
# src/build/mkrules/hbfw/simics/makefile on Hostboot and is added to the
# root of the simics.tar file.
# simics.tar_CONTENTS += src/build/mkrules/hbfw/simics/makefile
-#
+#
# src/hbfw/fsp/targeting/common/target.C on FSP is created from
# src/usr/targeting/common/target.C on Hostboot and is added to the
# fsp.tar at targeting/common.
@@ -209,4 +209,4 @@ fsp_ODE_REMAKES = \
hbfw/img:update_images_for_sandbox:ppc:FORCE_ALWAYS \
hbfw/simics:NOTARGET:ppc:$(TARGET_DIR)/simics.tar
-include dist_rules.mk
+include dist.rules.mk
diff --git a/src/build/mkrules/env.mk b/src/build/mkrules/env.mk
new file mode 100644
index 000000000..90c99d5bb
--- /dev/null
+++ b/src/build/mkrules/env.mk
@@ -0,0 +1,77 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: env.mk
+# Description:
+# Root of the "configuration" (ie. environment) for the build system.
+
+TRACEPP = $(ROOTPATH)/src/build/trace/tracepp
+
+ifdef MODULE
+OBJDIR = $(ROOTPATH)/obj/modules/$(MODULE)
+GENDIR = $(ROOTPATH)/obj/genfiles
+GENDIR_PLUGINS = $(ROOTPATH)/obj/genfiles/plugins
+IMGDIR = $(ROOTPATH)/img
+LIBS += $(addsuffix .so, $(addprefix lib, $(MODULE)))
+INCDIR += $(ROOTPATH)/src/include/usr
+MODULE_INIT = $(ROOTPATH)/obj/core/module_init.o
+else
+OBJDIR = $(ROOTPATH)/obj/core
+GENDIR = $(ROOTPATH)/obj/genfiles
+GENDIR_PLUGINS = $(ROOTPATH)/obj/genfiles/plugins
+IMGDIR = $(ROOTPATH)/img
+endif
+
+INCDIR += $(ROOTPATH)/src/include/
+INCDIR += $(GENDIR)
+INCDIR += $(EXTRAINCDIR)
+
+OBJECTS = $(addprefix $(OBJDIR)/, $(OBJS))
+LIBRARIES = $(addprefix $(IMGDIR)/, $(LIBS))
+
+# Translate the HOSTBOOT_DEBUG environment variable to C-preprocessor #define.
+# HOSTBOOT_DEBUG=1 <--- implies debug on everywhere
+# HOSTBOOT_DEBUG=kernel <--- implies any non-module code gets debug.
+# HOSTBOOT_DEBUG=foo,bar <--- enables debug for 'foo' and 'bar' module.
+ifdef HOSTBOOT_DEBUG
+ifeq ($(HOSTBOOT_DEBUG),1)
+ CFLAGS += -DHOSTBOOT_DEBUG=1
+else
+ifndef MODULE
+ifneq (,$(filter kernel,$(call MAKE_SPACE_LIST, $(HOSTBOOT_DEBUG))))
+ CFLAGS += -DHOSTBOOT_DEBUG=kernel
+endif
+else
+ifneq (,$(filter $(MODULE), $(call MAKE_SPACE_LIST, $(HOSTBOOT_DEBUG))))
+ CFLAGS += -DHOSTBOOT_DEBUG=$(MODULE)
+endif
+endif
+endif
+endif
+
+# Import more specialized configuration.
+include $(MKRULESDIR)/cc.env.mk
+include $(MKRULESDIR)/binfile.env.mk
+include $(MKRULESDIR)/beam.env.mk
+include $(MKRULESDIR)/gcov.env.mk
+include $(MKRULESDIR)/cflags.env.mk
diff --git a/src/build/mkrules/gcov.env.mk b/src/build/mkrules/gcov.env.mk
new file mode 100644
index 000000000..0d216a7e8
--- /dev/null
+++ b/src/build/mkrules/gcov.env.mk
@@ -0,0 +1,63 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/gcov.env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: gcov.env.mk
+# Description:
+# Configuration of the GCOV settings.
+
+GCOVDIR = $(ROOTPATH)/obj/gcov
+
+ifdef MODULE
+GCOVNAME = $(MODULE).lcov
+ifndef TESTS
+ifdef HOSTBOOT_PROFILE
+vpath %.C $(ROOTPATH)/src/sys/prof
+OBJS := gcov.o $(OBJS)
+endif
+endif
+else
+GCOVNAME = $(notdir $(shell pwd)).lcov
+endif
+
+## Disable coverage on test cases, any directory that sets
+## HOSTBOOT_PROFILE_NO_INSTRUMENT or any file that has 'gcov' in the name.
+ifndef TESTS
+ifdef HOSTBOOT_PROFILE
+ifndef HOSTBOOT_PROFILE_NO_INSTRUMENT
+CFLAGS += --coverage
+endif
+endif
+endif
+
+ifdef HOSTBOOT_PROFILE
+ PROFILE_FLAGS_FILTER = $(if $(findstring gcov,$(2)),\
+ $(filter-out --coverage,$(1)),\
+ $(1))
+ FLAGS_FILTER = $(call PROFILE_FLAGS_FILTER, $(1), $(2))
+endif
+
+## Reduce the optimization level when profiling is enabled to ensure the
+## base image fits in 512k still.
+ifdef HOSTBOOT_PROFILE
+OPT_LEVEL = -Os
+endif
diff --git a/src/build/mkrules/gcov.rules.mk b/src/build/mkrules/gcov.rules.mk
new file mode 100644
index 000000000..e222a7bf4
--- /dev/null
+++ b/src/build/mkrules/gcov.rules.mk
@@ -0,0 +1,46 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/gcov.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: gcov.rules.mk
+# Description:
+# Rules for analyzing coverage data. This is handled by a special GCOV
+# pass.
+
+GCOV_PASS_PRE += make_gcovdir
+GCOV_PASS_BODY += make_gcovdata
+
+.PHONY: make_gcovdir
+make_gcovdir:
+ @mkdir -p $(GCOVDIR)
+
+.PHONY: make_gcovdata
+make_gcovdata:
+ifdef OBJS
+ $(C2)" LCOV $(GCOVNAME)"
+ $(C1)cp $(OBJECTS:.o=.gcno) $(OBJECTS:.o=.gcda) .
+ $(C1)lcov --directory . -c -o $(GCOVDIR)/$(GCOVNAME) \
+ --gcov-tool $(GCOV) --ignore-errors source
+ $(C1)rm $(OBJS:.o=.gcno) $(OBJS:.o=.gcda) -f
+endif
+
+CLEAN_TARGETS += $(OBJECTS:.o=.gcno) $(OBJECTS:.o=.gcda)
diff --git a/src/build/mkrules/images.rules.mk b/src/build/mkrules/images.rules.mk
new file mode 100644
index 000000000..262c8b3d8
--- /dev/null
+++ b/src/build/mkrules/images.rules.mk
@@ -0,0 +1,64 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/images.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: images.rules.mk
+# Description:
+# Rules for linking the Hostboot binary images using the custom linker.
+
+ifdef IMGS
+_IMGS = $(addprefix $(IMGDIR)/, $(IMGS))
+IMAGES += $(addsuffix .bin, $(_IMGS)) $(addsuffix .elf, $(_IMGS))
+
+IMAGE_PASS_BODY += $(addsuffix .list, $(_IMGS)) $(addsuffix .syms, $(_IMGS))
+CLEAN_TARGETS += $(addsuffix .list, $(_IMGS)) $(addsuffix .syms, $(_IMGS))
+
+define ELF_template
+$$(IMGDIR)/$(1).elf: $$(addprefix $$(OBJDIR)/, $$($(1)_OBJECTS)) \
+ $$(ROOTPATH)/src/kernel.ld
+ $$(C2) " LD $$(notdir $$@)"
+ $$(C1)$$(LD) -static $$(LDFLAGS) \
+ $$(addprefix $$(OBJDIR)/, $$($(1)_OBJECTS)) \
+ $$($(1)_LDFLAGS) -T $$(ROOTPATH)/src/kernel.ld -o $$@
+endef
+$(foreach img,$(IMGS),$(eval $(call ELF_template,$(img))))
+
+$(IMGDIR)/%.bin: $(IMGDIR)/%.elf \
+ $(wildcard $(IMGDIR)/*.so) $(addprefix $(IMGDIR)/, $($*_DATA_MODULES)) \
+ $(CUSTOM_LINKER_EXE)
+ $(C2) " LINKER $(notdir $@)"
+ $(C1)$(CUSTOM_LINKER) $@ $< \
+ $(addprefix $(IMGDIR)/lib, $(addsuffix .so, $($*_MODULES))) \
+ --extended=0x40000 $(IMGDIR)/$*_extended.bin \
+ $(addprefix $(IMGDIR)/lib, $(addsuffix .so, $($*_EXTENDED_MODULES))) \
+ $(addprefix $(IMGDIR)/, $($*_DATA_MODULES)) \
+ > $(IMGDIR)/.$*.lnkout
+ $(C1)$(ROOTPATH)/src/build/tools/addimgid $@ $<
+
+$(IMGDIR)/%.list $(IMGDIR)/%.syms: $(IMGDIR)/%.bin
+ $(C2) " GENLIST $(notdir $*)"
+ $(C1)(cd $(ROOTPATH); \
+ src/build/tools/gensyms $*.bin $*_extended.bin 0x40000000 \
+ > ./img/$*.syms ; \
+ src/build/tools/genlist $*.bin > ./img/$*.list)
+
+endif
diff --git a/src/build/mkrules/passes.env.mk b/src/build/mkrules/passes.env.mk
new file mode 100644
index 000000000..4d049c099
--- /dev/null
+++ b/src/build/mkrules/passes.env.mk
@@ -0,0 +1,78 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/passes.env.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: passes.env.mk
+# Description:
+# Definition of the passes and their default contents.
+#
+# DEFAULT_PASSES are what get run when you do a 'make' or 'make all'. The
+# order of the passes in the variable define an ordering.
+#
+# OTHER_PASSES are special passes that get triggered by 'make NAME_PASS'.
+# Sometimes these have a shortcut, like 'make name'. The content for these
+# are in their own special name.rules.mk.
+
+DEFAULT_PASSES = GEN CODE IMAGE
+OTHER_PASSES = CLEAN GCOV BEAM
+
+## GEN_PASS
+## Create the $(GENFILES) content.
+GENTARGET = $(addprefix $(GENDIR)/, $(1))
+GENPLUGINTARGET = $(addprefix $(GENDIR_PLUGINS)/, $(1))
+
+GEN_PASS_BODY += $(addprefix $(GENDIR)/, $(GENFILES))
+CLEAN_TARGETS += $(addprefix $(GENDIR)/, $(GENFILES))
+GEN_PASS_BODY += $(addprefix $(GENDIR_PLUGINS)/, $(GENFILES_PLUGINS))
+CLEAN_TARGETS += $(addprefix $(GENDIR_PLUGINS)/, $(GENFILES_PLUGINS))
+
+ifneq ($(strip $(GEN_PASS_BODY)),)
+make_gendir:
+ @mkdir -p $(GENDIR)
+ @mkdir -p $(GENDIR_PLUGINS)
+.PHONY: make_gendir
+GEN_PASS_PRE += make_gendir
+endif
+
+## CODE_PASS
+## Compile the $(OBJS) and build the $(LIBS).
+CODE_PASS_BODY += $(OBJECTS) $(OBJECTS:.o=.list) $(LIBRARIES) $(EXTRA_PARTS)
+CLEAN_TARGETS += $(OBJECTS) $(OBJECTS:.o=.o.hash) $(OBJECTS:.o=.dep) \
+ $(OBJECTS:.o=.list) $(LIBRARIES) $(EXTRA_PARTS)
+ifeq ($(MAKECMDGOALS),_BUILD/PASSES/CODE/BODY/ACT)
+ -include $(OBJECTS:.o=.dep)
+endif
+
+
+## IMAGE_PASS
+## Build the $(IMGS).
+IMAGE_PASS_BODY += $(IMAGES)
+CLEAN_TARGETS += $(IMAGES) \
+ $(IMAGES:.bin=.bin.modinfo) $(IMAGES:.bin=_extended.bin)
+
+## CLEAN_PASS
+## Make the repo clean again by removing all the $(CLEAN_TARGETS).
+CLEAN_PASS_BODY += $(addprefix _BUILD/CLEAN/,$(wildcard $(CLEAN_TARGETS)))
+
+.PHONY: clean
+clean: CLEAN_PASS
+
diff --git a/src/build/mkrules/passes.mk b/src/build/mkrules/passes.mk
new file mode 100644
index 000000000..852df0d47
--- /dev/null
+++ b/src/build/mkrules/passes.mk
@@ -0,0 +1,33 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/passes.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: passes.mk
+# Description:
+# Root of the passes for the build system.
+#
+# These are handled at the end (after the other env/rules files) because there
+# are many variables defined in earlier makefiles that are needed to properly
+# create the passes.
+
+include $(MKRULESDIR)/passes.env.mk
+include $(MKRULESDIR)/passes.rules.mk
diff --git a/src/build/mkrules/passes.rules.mk b/src/build/mkrules/passes.rules.mk
new file mode 100644
index 000000000..a0f65bfdc
--- /dev/null
+++ b/src/build/mkrules/passes.rules.mk
@@ -0,0 +1,133 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/passes.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: passes.rules.mk
+# Description:
+# Definition of the generic rules for executing a pass.
+#
+# Passes have 3 stages: PRE, BODY, POST. The 'pre' stage is where required
+# directories are created. The 'body' stage is where most of the actions
+# occur. The 'post' stage is where subdirectories are recursed into.
+#
+# Other makefiles can extend any stage to include more than the default
+# behavior by adding to [NAME]_PASS_[STAGE].
+
+ALL_PASSES = $(DEFAULT_PASSES) $(OTHER_PASSES)
+
+# In order to build all, we just have to satisfy all of the dependencies for
+# the last pass's 'POST' stage.
+.PHONY: all
+all: _BUILD/PASSES/$(lastword $(DEFAULT_PASSES))/POST
+
+# A bogus recipe to suppress makes 'nothing to do' messages.
+.PHONY: suppress_nothing_to_do
+suppress_nothing_to_do:
+ @true
+
+# A big template to define the actions for each pass/stage pair.
+#
+# Each of the passes/stages have two goals named _BUILD/PASSES/[PASS]/[STAGE]
+# and _BUILD/PASSES/[PASS]/[STAGE]/ACT. The ACT goal is where the work goes
+# and the non-ACT goal is just a redirection into a sub-make process.
+#
+# If we do not do the redirection then make would deeply interrogate the
+# dependencies and think that PRE actions can run at the same time as BODY
+# actions. By having the redirection the [STAGE] is not complete until the
+# [STAGE]/ACT make invocation is complete, and therefore [STAGE+1] won't start
+# since [STAGE+1] requires [STAGE].
+#
+# We also define a shortcut to 'make [PASS]_PASS' for each pass.
+define PASS_template
+
+ # Add subdirectories to the 'post' requirements.
+$(1)_PASS_POST += $$(addprefix _BUILD/SUBDIR/$(1)/,$$(SUBDIRS:.d=))
+
+ # Definition on how to build a subdirectory.
+_BUILD/SUBDIR/$(1)/%:
+ $$(C2) " MAKE $$(notdir $$@) $(1)"
+ $$(C1)cd $$(notdir $$@) && $$(MAKE) $(1)_PASS
+
+.PHONY: _BUILD/PASSES/$(1)/PRE
+.PHONY: _BUILD/PASSES/$(1)/PRE/ACT
+.PHONY: _BUILD/PASSES/$(1)/BODY
+.PHONY: _BUILD/PASSES/$(1)/BODY/ACT
+.PHONY: _BUILD/PASSES/$(1)/POST
+.PHONY: _BUILD/PASSES/$(1)/POST/ACT
+
+_BUILD/PASSES/$(1)/POST : _BUILD/PASSES/$(1)/BODY
+ifneq ($$(strip $$($(1)_PASS_POST)),)
+ @$$(MAKE) _BUILD/PASSES/$(1)/POST/ACT
+endif
+_BUILD/PASSES/$(1)/POST/ACT : $$($(1)_PASS_POST) suppress_nothing_to_do
+
+_BUILD/PASSES/$(1)/BODY : _BUILD/PASSES/$(1)/PRE
+ifneq ($$(strip $$($(1)_PASS_BODY)),)
+ @$$(MAKE) _BUILD/PASSES/$(1)/BODY/ACT
+endif
+_BUILD/PASSES/$(1)/BODY/ACT : $$($(1)_PASS_BODY) suppress_nothing_to_do
+
+_BUILD/PASSES/$(1)/PRE : suppress_nothing_to_do
+ifneq ($$(strip $$($(1)_PASS_PRE)),)
+ @$$(MAKE) _BUILD/PASSES/$(1)/PRE/ACT
+endif
+_BUILD/PASSES/$(1)/PRE/ACT : $$($(1)_PASS_PRE) suppress_nothing_to_do
+
+.PHONY: $(1)_PASS
+$(1)_PASS : _BUILD/PASSES/$(1)/POST
+
+endef
+
+# Instantiate the pass-template for each pass.
+$(foreach pass,$(ALL_PASSES),$(eval $(call PASS_template,$(pass))))
+
+# If we are executing 'make' or 'make all' we need to create the dependency
+# chain for all of the DEFAULT_PASSES. Only do this if in this special make
+# invocation because otherwise when we recurse to SUBDIR/PASS that directory
+# would re-execute SUBDIR/PASS-1.
+
+define PASS_REQ_template
+_BUILD/PASSES/$(1)/PRE : _BUILD/PASSES/$(2)/POST
+endef
+
+APPLY_PASS_REQ=$(if $(findstring $(lastword $(1)),$(firstword $(1))),, \
+ $(eval \
+ $(call PASS_REQ_template,$(word 2, $(1)),$(word 1, $(1)))) \
+ $(call APPLY_PASS_REQ,$(wordlist 2, 100, $(1))))
+
+# Apply the dependency chain to all of the DEFAULT_PASSES if no make directive
+# or 'make all'.
+ifeq ($(MAKECMDGOALS),)
+$(call APPLY_PASS_REQ,$(DEFAULT_PASSES))
+endif
+
+ifeq ($(MAKECMDGOALS),all)
+$(call APPLY_PASS_REQ,$(DEFAULT_PASSES))
+endif
+
+# Special rule for CLEAN pass that will delete a file (path/to/file) from
+# a rule _BUILD/CLEAN/path/to/file.
+.PHONY: _BUILD/CLEAN/%
+_BUILD/CLEAN/% :
+ $(C2) " RM $(notdir $@)"
+ $(C1) rm -f $(subst _BUILD/CLEAN/,,$@)
+
diff --git a/src/build/mkrules/rules.mk b/src/build/mkrules/rules.mk
new file mode 100644
index 000000000..44391264a
--- /dev/null
+++ b/src/build/mkrules/rules.mk
@@ -0,0 +1,37 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: rules.mk
+# Description:
+# Root of the rules (ie. recipes) for the build system.
+
+include $(MKRULESDIR)/verbose.rules.mk
+include $(MKRULESDIR)/dep.rules.mk
+include $(MKRULESDIR)/cxxtest.rules.mk
+include $(MKRULESDIR)/cc.rules.mk
+include $(MKRULESDIR)/binfile.rules.mk
+include $(MKRULESDIR)/beam.rules.mk
+include $(MKRULESDIR)/gcov.rules.mk
+include $(MKRULESDIR)/images.rules.mk
+include $(MKRULESDIR)/cscope.rules.mk
+
diff --git a/src/build/mkrules/util.mk b/src/build/mkrules/util.mk
new file mode 100644
index 000000000..eaa7a3a6e
--- /dev/null
+++ b/src/build/mkrules/util.mk
@@ -0,0 +1,36 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/util.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: util.mk
+# Description:
+# Make utility functions that can be used in generating other variables
+# or rules.
+
+__internal__comma= ,
+__internal__empty=
+__internal__space=$(__internal__empty) $(__internal__empty)
+
+# Convert a comma separated list to a space separated list.
+MAKE_SPACE_LIST = $(subst $(__internal__comma),$(__internal__space),$(1))
+
+
diff --git a/src/build/mkrules/verbose.rules.mk b/src/build/mkrules/verbose.rules.mk
new file mode 100644
index 000000000..95e635aca
--- /dev/null
+++ b/src/build/mkrules/verbose.rules.mk
@@ -0,0 +1,46 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/mkrules/verbose.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# File: verbose.rules.mk
+# Description:
+# Control the verbosity of make commands by defining some prefixes that
+# other make rules can use.
+#
+# Setting the environment variable BUILD_VERBOSE=1 echos the full commands
+# being executed, while leaving it off echos just a short description.
+
+# Variables:
+# C1 - Prefix for the command to be executed. ex. '$(C1)$(CC) foo.C'
+# C2 - Prefix for the short description of the command. ex. '$(C2)CC foo.C'
+
+ifdef BUILD_VERBOSE
+ C1=
+ C2=@true || echo
+else
+ C1=@
+ C2=@echo
+ MAKE+= --no-print-directory
+endif
+
+MAKE+= --no-builtin-rules --no-builtin-variables
+
diff --git a/src/build/tools/hbDistribute b/src/build/tools/hbDistribute
index 2c67a1c3f..171c2cc99 100755
--- a/src/build/tools/hbDistribute
+++ b/src/build/tools/hbDistribute
@@ -1,26 +1,26 @@
#!/bin/bash
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/build/tools/hbDistribute $
+# $Source: src/build/tools/hbDistribute $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012
+# COPYRIGHT International Business Machines Corp. 2012,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END_TAG
+# IBM_PROLOG_END_TAG
TARGET_DIR="invalid directory"
TARGET="fsp_TARGET"
TEST_TEST=0
@@ -35,7 +35,7 @@ print_usage()
echo " images and debug tools or for the generation of a build release"
echo " directory."
echo
- echo " Target content is defined in src/build/mkrules/dist_targets.mk"
+ echo " Target content is defined in src/build/mkrules/dist.targets.mk"
echo
echo " Options:"
echo " --help: Prints usage information"
@@ -111,5 +111,5 @@ mkdir -p $TARGET_DIR
export TARGET_TEST
export TARGET_DIR
cd $REPO_ROOT/src/build/mkrules
-make -rR ${DEBUG:=} -f dist_targets.mk $TARGET
+make -rR ${DEBUG:=} -f dist.targets.mk $TARGET
diff --git a/src/lib/makefile b/src/lib/makefile
index 4b1d006db..b8cf9a6b3 100644
--- a/src/lib/makefile
+++ b/src/lib/makefile
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/lib/makefile $
-#
-# IBM CONFIDENTIAL
-#
-# COPYRIGHT International Business Machines Corp. 2010,2012
-#
-# 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 otherwise
-# divested of its trade secrets, irrespective of what has been
-# deposited with the U.S. Copyright Office.
-#
-# Origin: 30
-#
-# IBM_PROLOG_END_TAG
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/lib/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2010,2013
+#
+# 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 otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
ROOTPATH = ../..
OBJS = string.o string_ext.o stdlib.o ctype.o assert.o stdio.o math.o
@@ -28,7 +28,7 @@ OBJS += syscall_mmio.o syscall_time.o sync.o syscall_misc.o
OBJS += syscall_mm.o splaytree.o cxxtest_data.o
ifdef HOSTBOOT_MEMORY_LEAKS
-EXTRACOMMONFLAGS += -DHOSTBOOT_MEMORY_LEAKS=1
+COMMONFLAGS += -DHOSTBOOT_MEMORY_LEAKS=1
endif
include ${ROOTPATH}/config.mk
diff --git a/src/makefile b/src/makefile
index 112b7f25a..f0532f3fe 100644
--- a/src/makefile
+++ b/src/makefile
@@ -25,12 +25,11 @@ ROOTPATH = ..
SUBDIRS = kernel.d lib.d libc++.d sys.d usr.d build.d
IMGS = hbicore hbicore_test
-EXTRA_LIDS = dslid
BASE_OBJECTS = console.o spinlock.o string.o string_ext.o stdlib.o ctype.o \
assert.o stdio.o builtins.o vfs_init.o heapmgr.o pagemgr.o \
math.o barrier.o idebug.o intmsghandler.o deferred.o \
- idletask.o splaytree.o
+ idletask.o splaytree.o
ifdef HOSTBOOT_PROFILE
BASE_OBJECTS += gcov.o
@@ -44,7 +43,7 @@ DIRECT_BOOT_OBJECTS = start.o kernel.o taskmgr.o cpumgr.o syscall.o \
ptmgr.o segmentmgr.o basesegment.o devicesegment.o \
block.o cxxtest_data.o cpuid.o misc.o msghandler.o \
blockmsghdlr.o stacksegment.o softpatch_p8.o \
- shutdown.o forceattn_p8.o terminate.o
+ shutdown.o forceattn_p8.o terminate.o
BASE_MODULES = trace errl devicefw scom xscom initservice \
pnor vfs
@@ -90,16 +89,12 @@ hbicore_DATA_MODULES = sample.if p8.dmi.scom.if cen.dmi.scom.if \
p8.as.scom.if p8.nx.scom.if p8.dmi.custom.scom.if \
cen.dmi.custom.scom.if
-hbicore_LIDNUMBER = 80f00100
-
hbicore_test_OBJECTS = ${hbicore_OBJECTS}
hbicore_test_MODULES = ${hbicore_MODULES}
hbicore_test_EXTENDED_MODULES = ${hbicore_EXTENDED_MODULES} ${TESTCASE_MODULES}
hbicore_test_DATA_MODULES = ${hbicore_DATA_MODULES} testdata
-dslid_LIDNUMBER = 80f001fe
-
-IMAGE_EXTRA_TARGETS = buildpnor
+IMAGE_PASS_BODY += buildpnor
include ${ROOTPATH}/config.mk
diff --git a/src/usr/cxxtest/TestSuite.C b/src/usr/cxxtest/TestSuite.C
index ab89ef0d7..bdd03244f 100755
--- a/src/usr/cxxtest/TestSuite.C
+++ b/src/usr/cxxtest/TestSuite.C
@@ -1,37 +1,41 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/cxxtest/TestSuite.C $
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/cxxtest/TestSuite.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* 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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
// Imported from FSP tree - /src/test/cxxtest/cxxtest/
#ifndef __cxxtest__TestSuite_cpp__
#define __cxxtest__TestSuite_cpp__
+#include <limits.h>
#include <stdarg.h>
#include <arch/ppc.H>
#include <kernel/console.H>
#include <cxxtest/TestSuite.H>
+trace_desc_t *g_trac_test = NULL;
+TRAC_INIT(&g_trac_test, "UNIT_TEST", 4*KILOBYTE);
+
namespace CxxTest
{
/******************************************************************************/
diff --git a/src/usr/cxxtest/cxxtestgen.pl b/src/usr/cxxtest/cxxtestgen.pl
index e8f828402..f38c91aa6 100755
--- a/src/usr/cxxtest/cxxtestgen.pl
+++ b/src/usr/cxxtest/cxxtestgen.pl
@@ -6,7 +6,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2012
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
# p1
#
@@ -727,9 +727,6 @@ sub write_start() {
## $$TODO print "\tusing namespace TASKARGS;\n";
print "\n";
- print "trace_desc_t *g_trac_test = NULL;\n";
-## Use same trace buffer for all unit tests, i.e. "UNIT_TEST"
- print "TRAC_INIT(&g_trac_test, \"", "UNIT_TEST", "\", 4*KILOBYTE);\n";
print "\n\n";
diff --git a/src/usr/diag/prdf/framework/rule/makefile b/src/usr/diag/prdf/framework/rule/makefile
index 2a4c723c0..b55be8218 100755
--- a/src/usr/diag/prdf/framework/rule/makefile
+++ b/src/usr/diag/prdf/framework/rule/makefile
@@ -65,7 +65,7 @@ include ../../common/prd_ruletable.mk # for PRDR_RULE_TABLE_TARGETS
EXTRA_PARTS = $(addprefix ${IMGDIR}/, ${PRDR_RULE_TABLE_TARGETS})
# Clean up the auto generate source files
-EXTRA_CLEAN = ${PRDR_CMP_PATH} \
+CLEAN_TARGETS += ${PRDR_CMP_PATH} \
${PRDR_CMP_o_PATH} \
${PRDR_CMP_YACC_o_PATH} \
${PRDR_CMP_YACC_C_PATH} \
diff --git a/src/usr/ecmddatabuffer/makefile b/src/usr/ecmddatabuffer/makefile
index 4988aff0d..97d6b46ae 100644
--- a/src/usr/ecmddatabuffer/makefile
+++ b/src/usr/ecmddatabuffer/makefile
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/usr/ecmddatabuffer/makefile $
+# $Source: src/usr/ecmddatabuffer/makefile $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END
+# IBM_PROLOG_END_TAG
ROOTPATH = ../../..
MODULE = ecmddatabuffer
@@ -27,8 +27,8 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
-CUSTOMFLAGS += -DPRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS=1
-CUSTOMFLAGS += -DPRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS=1
+CFLAGS += -DPRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS=1
+CFLAGS += -DPRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS=1
OBJS = ecmdDataBufferBase.o
diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile
index 7e5628c05..10a4060ee 100644
--- a/src/usr/errl/parser/makefile
+++ b/src/usr/errl/parser/makefile
@@ -46,18 +46,28 @@ ERRLPARSE_TARGETS = \
CC=i686-mcp6-g++ -m32
CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -I ${GENDIR}
-all: gen_pass code_pass
+all: GEN_PASS CODE_PASS
-gen_pass: mkdirs ${GENDIR}/comps.C ${ERRLPARSE_TARGETS}
+GEN_PASS: mkdirs ${GENDIR}/comps.C ${ERRLPARSE_TARGETS}
-code_pass: ${IMGDIR}/errlparser
+ifeq ($(MAKECMDGOALS),all)
+CODE_PASS: GEN_PASS
+endif
+ifeq ($(MAKECMDGOALS),)
+CODE_PASS: GEN_PASS
+endif
+
+CODE_PASS: ${IMGDIR}/errlparser
mkdirs:
mkdir -p ${OBJDIR}
mkdir -p ${GENDIR}
# Generate error log parser code
-${ERRLPARSE_TARGETS} ::
+${ERRLPARSE_TARGETS} : gen_errl_parsers
+
+.PHONY: gen_errl_parsers
+gen_errl_parsers:
./genErrlParsers.pl -b ${ROOTPATH} -o ${GENDIR}/plugins
${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H
@@ -85,5 +95,6 @@ debug:
ls -l ${OBJDIR}
ls -l ${IMGDIR}
-beam:
- # dummy
+BEAM_PASS:
+IMAGE_PASS:
+CLEAN_PASS: clean
diff --git a/src/usr/hwpf/fapi/makefile b/src/usr/hwpf/fapi/makefile
index 0a76de05f..a6b5a3348 100644
--- a/src/usr/hwpf/fapi/makefile
+++ b/src/usr/hwpf/fapi/makefile
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2012
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
# p1
#
@@ -27,7 +27,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
-CUSTOMFLAGS += -D_NO_SPY_ACCESS=1
+CFLAGS += -D_NO_SPY_ACCESS=1
OBJS = fapiReturnCode.o \
fapiReturnCodeDataRef.o \
diff --git a/src/usr/hwpf/hwp/build_winkle_images/makefile b/src/usr/hwpf/hwp/build_winkle_images/makefile
index 2b87c1a5b..f84e83f91 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/makefile
+++ b/src/usr/hwpf/hwp/build_winkle_images/makefile
@@ -44,7 +44,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/mvpd_accessors
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar
-CUSTOMFLAGS+= -D __FAPI
+CFLAGS += -D __FAPI
## NOTE: add new object files when you add a new HWP
@@ -59,7 +59,6 @@ OBJS = build_winkle_images.o \
p8_pmc_deconfig_setup.o \
p8_poreslw_init.o \
p8_set_pore_bar.o \
- p8_slw_build.o \
p8_xip_customize.o \
p8_ring_identification.o \
p8_slw_build.o \
diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile
index e489de90e..9c1211562 100644
--- a/src/usr/hwpf/makefile
+++ b/src/usr/hwpf/makefile
@@ -228,7 +228,7 @@ $(call GENTARGET, ${FAPI_ERROR_TARGETS}) : \
#------------------------------------------------------------------------------
# The PLAT HWP RC and FFDC parser file generated from Error XML files
#------------------------------------------------------------------------------
-$(call GENTARGET, ${PLAT_HWP_ERR_PARSER}) : \
+$(call GENPLUGINTARGET, ${PLAT_HWP_ERR_PARSER}) : \
plat/fapiPlatCreateHwpErrParser.pl ${HWP_ERROR_XML_FILES}
$< $(dir $@) ${HWP_ERROR_XML_FILES}
@@ -258,7 +258,7 @@ $(foreach initfile,${HWP_INITFILES}, \
$(eval $(call HWP_IF_RECIPE,$(initfile))))
${EXTRA_PARTS}: ${IMGDIR}/% : ${GENDIR}/%
- cp -f $^ $@
+ cp -f $< $@
#------------------------------------------------------------------------------
# The FAPI Initfile attribute service
diff --git a/src/usr/initservice/build/makefile b/src/usr/initservice/build/makefile
index e9f435c3d..c1ba26a2c 100644
--- a/src/usr/initservice/build/makefile
+++ b/src/usr/initservice/build/makefile
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/usr/initservice/build/makefile $
+# $Source: src/usr/initservice/build/makefile $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END
+# IBM_PROLOG_END_TAG
#
# makefile for initialization service build tasks.
# 1. create isteplist.csv file for spless
@@ -33,11 +33,11 @@ include ${ROOTPATH}/src/usr/parser.mk
OBJFILES=
-all: gen_pass code_pass
+all: GEN_PASS CODE_PASS
-gen_pass:
+GEN_PASS:
-code_pass: ${IMGDIR}/isteplist.csv
+CODE_PASS: GEN_PASS ${IMGDIR}/isteplist.csv
## find all the ISTEPNAME( #,#,name ) macros in the istep lists and generate
## the isteplist.csv file for hb-istep
@@ -56,5 +56,6 @@ debug:
ls -l ${OBJDIR}
ls -l ${IMGDIR}
-beam:
- ## dummy
+BEAM_PASS:
+IMAGE_PASS:
+CLEAN_PASS: clean
diff --git a/src/usr/parser.mk b/src/usr/parser.mk
index 2b47925ce..cdec420ae 100644
--- a/src/usr/parser.mk
+++ b/src/usr/parser.mk
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/usr/parser.mk $
+# $Source: src/usr/parser.mk $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END
+# IBM_PROLOG_END_TAG
# This file used by initservice/build/makefile
# Not used by errlparser nor plugins as of sprint 9.
@@ -28,5 +28,4 @@
GENDIR = ${ROOTPATH}/obj/genfiles
IMGDIR = ${ROOTPATH}/img
OBJDIR = ${ROOTPATH}/obj/modules/parser
-UD_DIR = ${ROOTPATH}/obj/modules/userdetails
diff --git a/src/usr/pore/poreve/makefile b/src/usr/pore/poreve/makefile
index 284de12f5..8d53bc194 100644
--- a/src/usr/pore/poreve/makefile
+++ b/src/usr/pore/poreve/makefile
@@ -1,25 +1,25 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
#
-# $Source: src/usr/pore/poreve/makefile $
+# $Source: src/usr/pore/poreve/makefile $
#
-# IBM CONFIDENTIAL
+# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011-2012
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
-# p1
+# p1
#
-# Object Code Only (OCO) source materials
-# Licensed Internal Code Source Materials
-# IBM HostBoot Licensed Internal Code
+# 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.
+# 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.
#
-# Origin: 30
+# Origin: 30
#
-# IBM_PROLOG_END_TAG
+# IBM_PROLOG_END_TAG
# Module poreve built from 3 different source code areas:
#
# model The source code of the PoreInterface and PoreModel classes,
@@ -44,7 +44,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
EXTRAINCDIR += ${ROOTPATH}/src/usr/pore/poreve/porevesrc
-CUSTOMFLAGS += -DDEBUG_FASTI2C=1 -D_BIG_ENDIAN=1
+CFLAGS += -DDEBUG_FASTI2C=1 -D_BIG_ENDIAN=1
# Override to use C++ compiler for %.c/h files
CC_OVERRIDE = 1
diff --git a/src/usr/targeting/xmltohb/makefile b/src/usr/targeting/xmltohb/makefile
index f2e36571c..678f24bdf 100644
--- a/src/usr/targeting/xmltohb/makefile
+++ b/src/usr/targeting/xmltohb/makefile
@@ -92,7 +92,7 @@ GENFILES = ${XMLTOHB_TARGETS}
EXTRA_PARTS = $(addprefix $(IMGDIR)/, $(XMLTOHB_SYSTEM_BINARIES))
-EXTRA_CLEAN = $(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES}) \
+CLEAN_TARGETS += $(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES}) \
$(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES:.bin=.xml}) \
${GENDIR}/${XMLTOHB_GENERIC_XML} ${GENDIR}/${XMLTOHB_FAPI_XML} \
${GENDIR}/${XMLTOHB_MERGED_COMMON_TARGET_SOURCES} \
OpenPOWER on IntegriCloud