summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
Diffstat (limited to 'src/build')
-rw-r--r--src/build/Makefile89
-rwxr-xr-xsrc/build/buildInfo.py3
-rw-r--r--src/build/img_defs.mk20
-rwxr-xr-xsrc/build/linkerscripts/linkloader.cmd3
-rw-r--r--src/build/linkerscripts/linksbe.cmd3
-rw-r--r--src/build/linkerscripts/linkseeprom.cmd3
-rwxr-xr-xsrc/build/parsAndCutElf.py6
-rw-r--r--src/build/topfiles.mk3
-rw-r--r--src/build/utils/Makefile43
-rw-r--r--src/build/utils/base_ppe_header.S (renamed from src/build/base_ppe_header.S)2
-rw-r--r--src/build/utils/base_sbe_fixed.S (renamed from src/build/base_sbe_fixed.S)2
-rw-r--r--src/build/utils/p9_sbe.H (renamed from src/build/p9_sbe.H)2
-rw-r--r--src/build/utils/proc_sbe_fixed.H (renamed from src/build/proc_sbe_fixed.H)2
-rw-r--r--src/build/utils/sbe_common.H (renamed from src/build/sbe_common.H)2
-rw-r--r--src/build/utils/sbe_link.H (renamed from src/build/sbe_link.H)2
-rw-r--r--src/build/utils/utils.mk27
16 files changed, 153 insertions, 59 deletions
diff --git a/src/build/Makefile b/src/build/Makefile
index 89473e73..23bae9e7 100644
--- a/src/build/Makefile
+++ b/src/build/Makefile
@@ -27,7 +27,8 @@
#Pull in the definitions that affect all makefiles for this image
include img_defs.mk
-include ../boot/bootfiles.mk
+include $(BOOT_SRCDIR)/bootfiles.mk
+include $(BUILDDATA_SRCDIR)/utils.mk
#Pull in object file names for the top directory
include topfiles.mk
@@ -38,6 +39,7 @@ PKLIB := $(OBJDIR)/pk/libpk.a
LLIBS += -lpk
SUBDIRS += $(BOOT_SRCDIR)
+SUBDIRS += $(BUILDDATA_SRCDIR)
SUBDIRS += ../sbefw
LIB_DIRS += -L$(OBJDIR)/sbefw
@@ -102,22 +104,23 @@ LIB_DIRS += -L$(OBJDIR)/pm
PMLIB := $(OBJDIR)/pm/libpm.a
LLIBS += -lpm
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SBE_NAME).out
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SBE_NAME).map
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SBE_NAME).dis
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SBE_NAME).out
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SBE_NAME).map
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SBE_NAME).dis
SIMICS_PPE_TAR_FILES += $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out
SIMICS_PPE_TAR_FILES += $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).map
SIMICS_PPE_TAR_FILES += $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).dis
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SEEPROM_NAME).map
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SEEPROM_NAME).dis
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).map
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis
SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbe.syms
SIMICS_PPE_TAR_FILES += $(TEST_SRCDIR)/*.xml
SIMICS_PPE_TAR_FILES += $(TEST_SRCDIR)/*.py
SIMICS_PPE_TAR_FILES += $(PPETRACEPP_DIR)/fsp-trace
SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbeStringFile
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/ppe2fsp
+SIMICS_PPE_TAR_FILES += $(PPETRACEPP_BIN_DIR)/ppe2fsp
SIMICS_BB_TAR_FILES += $(SIMICSTOOLS_SRCDIR)/*
+SIMICS_BB_TAR_FILES += $(DEBUGTOOLS_SRCDIR)/simics-debug-framework.py
SIMICS_PPETRACEPP_TAR_FILES += $(PPETRACEPP_DIR)/cmvc/makefile
SIMICS_PPETRACEPP_TAR_FILES += $(PPETRACEPP_DIR)/ppe2fsp.h
SIMICS_PPETRACEPP_TAR_FILES += $(PPETRACEPP_DIR)/ppe2fsp.c
@@ -127,7 +130,7 @@ SIMICS_PPETRACEPP_TAR_FILES += $(PK_SRCDIR)/trace/pk_trace.h
SIMICS_PARSERPLUGINS_TAR_FILES += $(SBE_FW_DIR)/plugins/sbeUserDataParser.C
SIMICS_PARSERPLUGINS_TAR_FILES += $(SBE_FW_DIR)/sbeFFDCType.H
-SBE_TOOLS := $(BASE_OBJDIR)/sbe_default_tool
+SBE_TOOLS := $(IMG_DIR)/sbe_default_tool
P9_XIP_TOOL := $(P9_XIP_BINDIR)/p9_xip_tool
@@ -137,45 +140,45 @@ LINK_OBJS = $(OBJS)
OBJS := $(addprefix $(OBJDIR)/, $(TOP_OBJECTS))
LINK_OBJS += $(OBJS) $(GCCLIBS)
-LINK_SCRIPT_SEEPROM = $(addprefix $(OBJDIR)/, linkscriptseeprom)
-LINK_SCRIPT_SBE = $(addprefix $(OBJDIR)/, linkscriptsbe)
+LINK_SCRIPT_SEEPROM = $(addprefix $(OBJDIR)/build/linkerscripts, linkscriptseeprom)
+LINK_SCRIPT_SBE = $(addprefix $(OBJDIR)/build/linkerscripts, linkscriptsbe)
# ---- SEEPROM Image ------
# This removes all unecessary headers from the ELF executable
-$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(OBJDIR)/$(IMAGE_SEEPROM_NAME).dis: $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out
+$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis: $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out
./parsAndCutElf.py
- $(OBJDUMP) -S $< > $(OBJDIR)/$(IMAGE_SEEPROM_NAME).dis
+ $(OBJDUMP) -S $< > $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis
#create a linked ELF executable
-$(OBJDIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) $(LINK_OBJS) $(LINK_SCRIPT_SEEPROM)
- $(LD) -n -T$(LINK_SCRIPT_SEEPROM) -Map $(OBJDIR)/$(IMAGE_SEEPROM_NAME).map \
- -Bstatic -o $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(BOOT_OBJECTS) $(OBJS) $(LIB_DIRS) \
+$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) $(LINK_OBJS) $(LINK_SCRIPT_SEEPROM)
+ $(LD) -n -T$(LINK_SCRIPT_SEEPROM) -Map $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).map \
+ -Bstatic -o $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(BOOT_OBJECTS) $(BUILDDATA_OBJDIR)/base_ppe_header.o $(OBJS) $(LIB_DIRS) \
--start-group $(LLIBS) --end-group -leabi -lmath -lc
# pass the link command file through the C preprocessor to evaluate macros
# and remove comments
$(LINK_SCRIPT_SEEPROM): $(LINKER_DIR)/linkseeprom.cmd
- $(CPP) -I. -E -x c++ -P $(DEFS) $(LINKER_DIR)/linkseeprom.cmd -o $(LINK_SCRIPT_SEEPROM)
+ $(CPP) -I $(INCLUDES) -E -x c++ -P $(DEFS) $(LINKER_DIR)/linkseeprom.cmd -o $(LINK_SCRIPT_SEEPROM)
# ---- PIBMEM Image ------
#This removes all unecessary headers from the ELF executable
-$(IMG_DIR)/$(IMAGE_SBE_NAME).bin $(OBJDIR)/$(IMAGE_SBE_NAME).dis: $(OBJDIR)/$(IMAGE_SBE_NAME).out
+$(IMG_DIR)/$(IMAGE_SBE_NAME).bin $(IMG_DIR)/$(IMAGE_SBE_NAME).dis: $(IMG_DIR)/$(IMAGE_SBE_NAME).out
$(OBJCOPY) -O binary $< $(IMG_DIR)/$(IMAGE_SBE_NAME).bin --pad-to \
- 0x`/usr/bin/nm $(OBJDIR)/$(IMAGE_SBE_NAME).out | grep "A _sbe_end" \
+ 0x`/usr/bin/nm $(IMG_DIR)/$(IMAGE_SBE_NAME).out | grep "A _sbe_end" \
| cut -d " " -f 1`
- $(OBJDUMP) -S $< > $(OBJDIR)/$(IMAGE_SBE_NAME).dis
+ $(OBJDUMP) -S $< > $(IMG_DIR)/$(IMAGE_SBE_NAME).dis
$(NM) $< > $(IMG_DIR)/$(IMAGE_SBE_NAME).syms
# create a linked ELF executable
-$(OBJDIR)/$(IMAGE_SBE_NAME).out: ppe_trace_bin buildInfo $(OBJDIR)/base_sbe_fixed.o $(SUBDIRS) $(LINK_OBJS) $(LINK_SCRIPT_SBE)
- $(LD) -e __system_reset -T$(LINK_SCRIPT_SBE) -Map $(OBJDIR)/$(IMAGE_SBE_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_SBE_NAME).out $(LIB_DIRS) $(OBJDIR)/base_sbe_fixed.o --start-group $(LLIBS) --end-group
+$(IMG_DIR)/$(IMAGE_SBE_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) $(LINK_OBJS) $(LINK_SCRIPT_SBE)
+ $(LD) -e __system_reset -T$(LINK_SCRIPT_SBE) -Map $(IMG_DIR)/$(IMAGE_SBE_NAME).map -Bstatic -o $(IMG_DIR)/$(IMAGE_SBE_NAME).out $(LIB_DIRS) $(BUILDDATA_OBJDIR)/base_sbe_fixed.o --start-group $(LLIBS) --end-group
# pass the link command file through the C preprocessor to evaluate macros and remove comments
$(LINK_SCRIPT_SBE): $(LINKER_DIR)/linksbe.cmd
- $(CPP) -E -x c++ -I. -P $(DEFS) $(LINKER_DIR)/linksbe.cmd -o $(LINK_SCRIPT_SBE)
+ $(CPP) -E -x c++ -I $(INCLUDES) -P $(DEFS) $(LINKER_DIR)/linksbe.cmd -o $(LINK_SCRIPT_SBE)
-all: $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_SBE_NAME).bin \
- $(SBE_TOOLS) normalize defaultset $(OBJDIR)/fixed.bin appendloader \
+all: $(OBJDIR) xml $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_SBE_NAME).bin \
+ $(SBE_TOOLS) normalize defaultset $(IMG_DIR)/fixed.bin appendloader \
appendoverrides add_LoaderAddr symbols tracehash buildinfo report
install: all
@@ -188,9 +191,9 @@ install: all
@cp $(SIMICS_BB_TAR_FILES) $(OBJDIR)/simics-tar-dir
@cp $(SIMICS_PPETRACEPP_TAR_FILES) $(OBJDIR)/simics-tar-dir/ppetracepp
@cp $(SIMICS_PARSERPLUGINS_TAR_FILES) $(OBJDIR)/simics-tar-dir/parserplugins
- @cd $(OBJDIR)/simics-tar-dir && tar -cvf simics.tar * && mv simics.tar $(OBJDIR) && cd ..
+ @cd $(OBJDIR)/simics-tar-dir && tar -cvf simics.tar * && mv simics.tar $(IMG_DIR) && cd ..
@rm -rf $(OBJDIR)/simics-tar-dir
- @echo "Generated simics.tar in Sbe Obj Directory"
+ @echo "Generated simics.tar in Sbe images Directory"
.PHONY: all normalize defaultset appendloader add_LoaderAddr symbols report \
appendoverrides xml tracehash topfixedheaders $(SUBDIRS)
@@ -201,13 +204,13 @@ buildinfo: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set build_user `id -un`
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set build_host `hostname`
-add_LoaderAddr: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out
- $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set L1_LoaderAddr 0x`nm $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out | grep __pmLoader | cut -f 1 -d " "`
+add_LoaderAddr: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out
+ $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set L1_LoaderAddr 0x`nm $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out | grep __pmLoader | cut -f 1 -d " "`
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set L2_LoaderAddr 0x`nm $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out | grep __base_loader_setup | cut -f 1 -d " "`
- $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set kernelAddr 0x`nm $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out | grep __pk_boot | cut -f 1 -d " "`
+ $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set kernelAddr 0x`nm $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out | grep __pk_boot | cut -f 1 -d " "`
-symbols: $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out $(OBJDIR)/$(IMAGE_SBE_NAME).out
- $(NM) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out > $(IMG_DIR)/$(SBE_SYMBOLS_NAME)
+symbols: $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out $(IMG_DIR)/$(IMAGE_SBE_NAME).out
+ $(NM) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out > $(IMG_DIR)/$(SBE_SYMBOLS_NAME)
$(NM) $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out >> $(IMG_DIR)/$(SBE_SYMBOLS_NAME)
report: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
@@ -219,7 +222,7 @@ buildInfo:
#Create an obj directory if needed
-$(LINK_OBJS) $(OBJS) $(OBJS:.o=.d) $(OBJDIR)/base_sbe_fixed.o $(OBJDIR)/base_sbe_fixed.d: | $(OBJDIR)
+$(LINK_OBJS) $(OBJS) $(OBJS:.o=.d)
ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/pervasive_attributes.xml
# TODO via RTC 142708
@@ -235,12 +238,13 @@ ATTRFILES += $(BASE_FAPI2_DIR)/xml/attribute_info/chip_attributes.xml
ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/chip_ec_attributes.xml
$(OBJDIR):
+ mkdir -p $(OBJDIR)
+ mkdir -p $(IMG_DIR)
+ mkdir -p $(OBJDIR)/genfiles
$(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
$(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(PLAT_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
$(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(TOOLS_ATTR_DIR)/src --inc $(PLAT_FAPI2_DIR)/include --src $(PLAT_FAPI2_DIR)/src
$(TOOLS_ATTR_DIR)/ppeCreateIfAttrService.pl $(PLAT_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
- mkdir -p $(OBJDIR)
- mkdir -p $(IMG_DIR)
topfixedheaders:
$(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
@@ -258,26 +262,27 @@ attrserv:
# Build the subdirectories
$(SUBDIRS):
- $(MAKE) -I $(BUILD_DIR) -C $@ -f Makefile
+ $(MAKE) -I $(INCLUDES) -C $@ -f Makefile
#Build the SBE XIP Tools
$(SBE_TOOLS): $(P9_XIP_TOOL)
- $(MAKE) -I $(BUILD_DIR) -C $(TOOLS_IMAGE_DIR) -f Makefile
+ $(MAKE) -I $(INCLUDES) -C $(TOOLS_IMAGE_DIR) -f Makefile
# Build the P9-XIP Tool
$(P9_XIP_TOOL):
$(MAKE) -I $(P9_XIP_SRCDIR) -C $(P9_XIP_SRCDIR) -f Makefile BINDIR=$(P9_XIP_BINDIR)
+ cp $(P9_XIP_TOOL) $(IMG_DIR)/
normalize: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin normalize
-defaultset: $(SBE_TOOLS) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin normalize
- $(TOOLS_ATTR_DIR)/ppeSetFixed.pl $(BASE_OBJDIR) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
+defaultset:$(SBE_TOOLS) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin normalize
+ $(TOOLS_ATTR_DIR)/ppeSetFixed.pl $(IMG_DIR) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
# Build the trace utilities
ppe_trace_bin:
- $(MAKE) -I $(BUILD_DIR) -C $(PPETRACEPP_DIR) -f Makefile #$(PK trace util)
+ $(MAKE) -I $(INCLUDES) -C $(PPETRACEPP_DIR) -f Makefile #$(PK trace util)
# Build hwp_error_info.H. If the script fails then print the contents of
@@ -290,8 +295,8 @@ xml: $(FAPI_RC)
$(FAPI_RC): $(TOOLS_ATTR_DIR)/parseErrorInfo.pl $(ERROR_XML_FILES)
$(TOOLS_ATTR_DIR)/parseErrorInfo.pl --local-ffdc --output-dir=. $(ERROR_XML_FILES)
-$(OBJDIR)/fixed.bin: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
- $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin extract .fixed $(BASE_OBJDIR)/fixed.bin
+$(IMG_DIR)/fixed.bin: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
+ $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin extract .fixed $(IMG_DIR)/fixed.bin
appendloader: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_LOADER_NAME).bin
diff --git a/src/build/buildInfo.py b/src/build/buildInfo.py
index f7b109e4..4350e682 100755
--- a/src/build/buildInfo.py
+++ b/src/build/buildInfo.py
@@ -7,6 +7,7 @@
# OpenPOWER sbe Project
#
# Contributors Listed Below - COPYRIGHT 2016
+# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,7 +27,7 @@
# This script will create header file sbe_build_info.H which will have
# buld information required by SBE code.
import os
-buildInfoFileName = "sbe_build_info.H"
+buildInfoFileName = "../../obj/genfiles/sbe_build_info.H"
def buildInfo():
header = \
diff --git a/src/build/img_defs.mk b/src/build/img_defs.mk
index 8d7b4184..b14ca419 100644
--- a/src/build/img_defs.mk
+++ b/src/build/img_defs.mk
@@ -83,6 +83,10 @@ ifndef BUILD_DIR
export BUILD_DIR = $(SBE_SRC_DIR)/build
endif
+ifndef BUILDDATA_SRCDIR
+export BUILDDATA_SRCDIR = $(BUILD_DIR)/utils
+endif
+
ifndef LINKER_DIR
export LINKER_DIR = $(BUILD_DIR)/linkerscripts
endif
@@ -100,7 +104,7 @@ export TOOLS_SRCDIR = $(SBE_SRC_DIR)/tools
endif
ifndef TEST_SRCDIR
-export TEST_SRCDIR = $(SBE_SRC_DIR)/test
+export TEST_SRCDIR = $(SBE_SRC_DIR)/test/testcases
endif
ifndef DEBUGTOOLS_SRCDIR
@@ -171,6 +175,10 @@ ifndef BOOT_OBJDIR
export BOOT_OBJDIR = $(BASE_OBJDIR)/boot
endif
+ifndef BUILDDATA_OBJDIR
+export BUILDDATA_OBJDIR = $(BASE_OBJDIR)/build/utils
+endif
+
ifndef IMG_DIR
export IMG_DIR = $(SBE_ROOT_DIR)/images
endif
@@ -201,11 +209,15 @@ export IMPORT_COMMON_DIR = $(IMPORT_SRCDIR)/chips/p9/common
endif
ifndef PPETRACEPP_DIR
-export PPETRACEPP_DIR = $(TOOLS_SRCDIR)/ppetracepp
+export PPETRACEPP_DIR = $(TOOLS_SRCDIR)/trace
endif
ifndef PPETRACEPP_BIN_DIR
-export PPETRACEPP_BIN_DIR = $(BASE_OBJDIR)
+export PPETRACEPP_BIN_DIR = $(IMG_DIR)
+endif
+
+ifndef GENFILES_DIR
+export GENFILES_DIR = $(BASE_OBJDIR)/genfiles
endif
ifndef PLAT_FAPI2_DIR
@@ -358,6 +370,8 @@ INCLUDES += -I$(PK_SRCDIR)/ppe
INCLUDES += -I$(PK_SRCDIR)/ppe42
INCLUDES += -I$(SBE_FW_DIR)
INCLUDES += -I$(BOOT_SRCDIR)
+INCLUDES += -I$(GENFILES_DIR)
+INCLUDES += -I$(BUILDDATA_SRCDIR)
INCLUDES += -I$(PK_SRCDIR)/trace
INCLUDES += -I$(PPETRACEPP_DIR)
INCLUDES += -I$(IMPORT_COMMON_DIR)/include
diff --git a/src/build/linkerscripts/linkloader.cmd b/src/build/linkerscripts/linkloader.cmd
index 75c460d4..1e2a20e3 100755
--- a/src/build/linkerscripts/linkloader.cmd
+++ b/src/build/linkerscripts/linkloader.cmd
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -28,7 +29,7 @@
#ifndef BASE_LOADER_STACK_SIZE
#define BASE_LOADER_STACK_SIZE 128
#endif
-#include "../sbe_link.H"
+#include "sbe_link.H"
OUTPUT_FORMAT(elf32-powerpc);
diff --git a/src/build/linkerscripts/linksbe.cmd b/src/build/linkerscripts/linksbe.cmd
index 4e1832f6..12250a9d 100644
--- a/src/build/linkerscripts/linksbe.cmd
+++ b/src/build/linkerscripts/linksbe.cmd
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -28,7 +29,7 @@
#ifndef INITIAL_STACK_SIZE
#define INITIAL_STACK_SIZE 256
#endif
-#include <sbe_link.H>
+#include "sbe_link.H"
OUTPUT_FORMAT(elf32-powerpc);
diff --git a/src/build/linkerscripts/linkseeprom.cmd b/src/build/linkerscripts/linkseeprom.cmd
index 7cbbcda4..fd1b1474 100644
--- a/src/build/linkerscripts/linkseeprom.cmd
+++ b/src/build/linkerscripts/linkseeprom.cmd
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -23,7 +24,7 @@
/* IBM_PROLOG_END_TAG */
// Need to do this so that elf32-powerpc is not modified!
#undef powerpc
-#include <sbe_link.H>
+#include "sbe_link.H"
OUTPUT_FORMAT(elf32-powerpc);
#ifndef INITIAL_STACK_SIZE
diff --git a/src/build/parsAndCutElf.py b/src/build/parsAndCutElf.py
index 934ddf97..acfe64a5 100755
--- a/src/build/parsAndCutElf.py
+++ b/src/build/parsAndCutElf.py
@@ -31,9 +31,9 @@ import sys
# Workaround to cut SBE image from elf image.
def parserElf():
- cmd = "readelf -S ../../obj/sbe_seeprom.out"
+ cmd = "readelf -S ../../images/sbe_seeprom.out"
firstSection = ".header"
- cmd1 = "nm ../../obj/sbe_seeprom.out | grep _sbe_image_size"
+ cmd1 = "nm ../../images/sbe_seeprom.out | grep _sbe_image_size"
output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
i = 0;
for line in output.stdout:
@@ -60,7 +60,7 @@ def parserElf():
exit(-1)
# cut the image
- cmd1 = "dd skip=" + str(startSize) + " count=" + str(endSize) + " if=../../obj/sbe_seeprom.out of=../../images/sbe_seeprom.bin bs=1"
+ cmd1 = "dd skip=" + str(startSize) + " count=" + str(endSize) + " if=../../images/sbe_seeprom.out of=../../images/sbe_seeprom.bin bs=1"
rc = os.system(cmd1)
if ( rc ):
print "ERROR running %s: %d "%( cmd1, rc )
diff --git a/src/build/topfiles.mk b/src/build/topfiles.mk
index 6c76eaaf..71732138 100644
--- a/src/build/topfiles.mk
+++ b/src/build/topfiles.mk
@@ -6,6 +6,7 @@
# OpenPOWER sbe Project
#
# Contributors Listed Below - COPYRIGHT 2015,2016
+# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,7 +24,7 @@
# IBM_PROLOG_END_TAG
TOP-C-SOURCES =
TOP-CPP-SOURCES =
-TOP-S-SOURCES = base_ppe_header.S
+TOP-S-SOURCES =
# generated by ppeParseProcSbeFixed.pl
TOP-FIXED-HEADERS += $(BUILD_DIR)/proc_sbe_fixed_system.H
diff --git a/src/build/utils/Makefile b/src/build/utils/Makefile
new file mode 100644
index 00000000..163984cf
--- /dev/null
+++ b/src/build/utils/Makefile
@@ -0,0 +1,43 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/utils/Makefile $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2016
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+export SUB_OBJDIR = /build/utils
+
+include img_defs.mk
+include utils.mk
+
+OBJS := $(addprefix $(OBJDIR)/, $(BUILDDATA_OBJECTS))
+BUILDDATA_OBJECTS := $(OBJS)
+
+.PHONY: clean all
+
+all:$(OBJS)
+
+$(OBJS) $(OBJS:.o=.d): | $(OBJDIR)
+
+$(OBJDIR):
+ mkdir -p $(OBJDIR)
+
+clean:
+ rm -rf $(OBJDIR)
diff --git a/src/build/base_ppe_header.S b/src/build/utils/base_ppe_header.S
index b68b9214..c99cc08f 100644
--- a/src/build/base_ppe_header.S
+++ b/src/build/utils/base_ppe_header.S
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/build/base_ppe_header.S $ */
+/* $Source: src/build/utils/base_ppe_header.S $ */
/* */
/* OpenPOWER sbe Project */
/* */
diff --git a/src/build/base_sbe_fixed.S b/src/build/utils/base_sbe_fixed.S
index e1a53f84..7474a38b 100644
--- a/src/build/base_sbe_fixed.S
+++ b/src/build/utils/base_sbe_fixed.S
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/build/base_sbe_fixed.S $ */
+/* $Source: src/build/utils/base_sbe_fixed.S $ */
/* */
/* OpenPOWER sbe Project */
/* */
diff --git a/src/build/p9_sbe.H b/src/build/utils/p9_sbe.H
index 3e624d01..36c281eb 100644
--- a/src/build/p9_sbe.H
+++ b/src/build/utils/p9_sbe.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/build/p9_sbe.H $ */
+/* $Source: src/build/utils/p9_sbe.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
diff --git a/src/build/proc_sbe_fixed.H b/src/build/utils/proc_sbe_fixed.H
index 6c3d134e..9b06fb6f 100644
--- a/src/build/proc_sbe_fixed.H
+++ b/src/build/utils/proc_sbe_fixed.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/build/proc_sbe_fixed.H $ */
+/* $Source: src/build/utils/proc_sbe_fixed.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
diff --git a/src/build/sbe_common.H b/src/build/utils/sbe_common.H
index 4fb78079..3cd8a0a0 100644
--- a/src/build/sbe_common.H
+++ b/src/build/utils/sbe_common.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/build/sbe_common.H $ */
+/* $Source: src/build/utils/sbe_common.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
diff --git a/src/build/sbe_link.H b/src/build/utils/sbe_link.H
index ad703e1a..0321a0a8 100644
--- a/src/build/sbe_link.H
+++ b/src/build/utils/sbe_link.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/build/sbe_link.H $ */
+/* $Source: src/build/utils/sbe_link.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
diff --git a/src/build/utils/utils.mk b/src/build/utils/utils.mk
new file mode 100644
index 00000000..e1fed401
--- /dev/null
+++ b/src/build/utils/utils.mk
@@ -0,0 +1,27 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/utils/utils.mk $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2015,2016
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+BUILDDATA-S-SOURCES = base_ppe_header.S
+BUILDDATA-S-SOURCES += base_sbe_fixed.S
+
+BUILDDATA_OBJECTS += $(BUILDDATA-S-SOURCES:.S=.o)
OpenPOWER on IntegriCloud