summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspashabk-in <shakeebbk@in.ibm.com>2017-03-21 01:44:07 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-03-23 02:05:34 -0400
commitee43eabffe71c2b90b590f9b7754c995ada798e8 (patch)
tree4f646386dd6f0ca9cbb6adef30cb6fd3d255a86e
parent8f2645e0257e98176e0d4968c498327741dec205 (diff)
downloadtalos-sbe-ee43eabffe71c2b90b590f9b7754c995ada798e8.tar.gz
talos-sbe-ee43eabffe71c2b90b590f9b7754c995ada798e8.zip
Build infra updates for op-build
RTC:166889 Change-Id: I668af45fbb905385236a9090d145b548e6c77c2d Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38192 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
-rw-r--r--Makefile9
-rw-r--r--src/build/Makefile6
-rwxr-xr-xsrc/build/buildInfo.py5
-rw-r--r--src/build/img_defs.mk40
4 files changed, 18 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index 7a634faf..ec259f0d 100644
--- a/Makefile
+++ b/Makefile
@@ -25,13 +25,6 @@
BUILD_DIR = src/build
.PHONY: install all clean tar install_DD1 install_DD2 DD1 DD2
-del_objects:
- @rm -rf obj/sbefw
- @rm -rf obj/import_hwp_mk
- @rm -rf obj/boot
- @rm -rf obj/build/utils
- @rm -rf obj/fapi2
-
install: all tar
install_DD1: DD1 tar
@@ -46,7 +39,7 @@ DD1:
DD2:
$(MAKE) -C $(BUILD_DIR) all ddlevel=DD2
-all: DD1 del_objects DD2
+all: DD1 DD2
clean:
$(MAKE) -C $(BUILD_DIR) clean
diff --git a/src/build/Makefile b/src/build/Makefile
index 3579a00a..aab7a9eb 100644
--- a/src/build/Makefile
+++ b/src/build/Makefile
@@ -223,7 +223,7 @@ report: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
# Create build Info file
buildInfo:
- python buildInfo.py
+ python buildInfo.py $(OBJDIR)
#Create an obj directory if needed
@@ -272,7 +272,7 @@ $(SBE_IPL_TOOLS): $(P9_XIP_TOOL)
# Build the P9-XIP Tool
$(P9_XIP_TOOL):
- $(MAKE) -I $(P9_XIP_SRCDIR) -C $(P9_XIP_SRCDIR) -f Makefile BINDIR=$(P9_XIP_BINDIR)
+ $(MAKE) -I $(P9_XIP_SRCDIR) -C $(P9_XIP_SRCDIR) -f Makefile BINDIR=$(P9_XIP_BINDIR) CXX_FLAGS=-D__PPE__=1
cp $(P9_XIP_TOOL) $(IMG_DIR)/
normalize: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
@@ -310,7 +310,7 @@ tracehash:
#clean the kernel directory first, then the application level clean
clean:
- rm -fr $(OBJDIR)
+ rm -fr $(SBE_ROOT_DIR)/obj
rm -fr $(IMG_DIR)
#Add dependencies to header files
diff --git a/src/build/buildInfo.py b/src/build/buildInfo.py
index 4350e682..d1149c70 100755
--- a/src/build/buildInfo.py
+++ b/src/build/buildInfo.py
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -27,9 +27,10 @@
# This script will create header file sbe_build_info.H which will have
# buld information required by SBE code.
import os
-buildInfoFileName = "../../obj/genfiles/sbe_build_info.H"
+import sys
def buildInfo():
+ buildInfoFileName = sys.argv[1]+"/genfiles/sbe_build_info.H"
header = \
"#ifndef SBE_BUILD_INFO_H \n\
#define SBE_BUILD_INFO_H \n\n"
diff --git a/src/build/img_defs.mk b/src/build/img_defs.mk
index 926e9b91..1c8f7fee 100644
--- a/src/build/img_defs.mk
+++ b/src/build/img_defs.mk
@@ -45,14 +45,10 @@
# any other non-default setting to GCC, e.g.
# make GCC-O-LEVEL="-Os -fno-branch-count-reg"
#
-# GCC-TOOL-PREFIX : The full path (including executable file prefixes) to
-# the GCC cross-development tools to use. The default is
-# "ppcnf-mcp5-"
-#
-# CTEPATH : This variable defaults to the afs/awd CTE tool
-# installation - The PORE binutils are stored there. If
-# you are not in Austin be sure to define CTEPATH in
-# your .profile.
+# CROSS_COMPILER_PATH : Cross-development tool chain path.
+# From the SBE package, make must be called like this:
+# make LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
+# Defaults to IBM CTE tools path.
#
# OBJDIR : target directory for all generated files
@@ -199,7 +195,7 @@ export IMAGEPROCS_SRCDIR = $(IMPORT_SRCDIR)/chips/p9/utils/imageProcs
endif
ifndef BASE_OBJDIR
-export BASE_OBJDIR = $(SBE_ROOT_DIR)/obj
+export BASE_OBJDIR = $(SBE_ROOT_DIR)/obj/$(IMAGE_SUFFIX)
endif
ifndef P9_XIP_SRCDIR
@@ -315,25 +311,17 @@ ifndef OBJDIR-ARRAYACCESS
export OBJDIR-ARRAYACCESS = $(BASE_OBJDIR)/arrayaccess
endif
-GCC-TOOL-PATH = $(CTEPATH)/tools/ppetools/prod
-
-# This is used for op-build
-# It has to be passed into make by the openpower SBE package.
-# CTEPATH won't be defined in openpower.
-#
-# From the SBE package, make must be called like this:
-# make LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib PPE42PATH=$(PPE42_GCC_BIN)
-ifdef PPE42PATH
-GCC-TOOL-PREFIX = $(PPE42PATH)/bin/powerpc-eabi-
-BINUTILS-TOOL-PREFIX = $(PPE42PATH)/powerpc-eabi/bin/
+ifndef CROSS_COMPILER_PATH
+$(warning The CROSS_COMPILER_PATH variable is not defined; Defaulting to IBM CTE tools path)
+export CROSS_COMPILER_PATH = /afs/awd/projects/cte/tools/ppetools/prod
endif
ifndef GCC-TOOL-PREFIX
-GCC-TOOL-PREFIX = $(GCC-TOOL-PATH)/bin/powerpc-eabi-
+GCC-TOOL-PREFIX = $(CROSS_COMPILER_PATH)/bin/powerpc-eabi-
endif
ifndef BINUTILS-TOOL-PREFIX
-BINUTILS-TOOL-PREFIX = $(CTEPATH)/tools/ppetools/prod/powerpc-eabi/bin/
+BINUTILS-TOOL-PREFIX = $(CROSS_COMPILER_PATH)/powerpc-eabi/bin/
endif
ifndef FAPI_RC
@@ -361,12 +349,6 @@ ifdef P2P_ENABLE
PCP = $(P2P_SRCDIR)/ppc-ppe-pcp.py
endif
-
-ifndef CTEPATH
-$(warning The CTEPATH variable is not defined; Defaulting to /afs/awd)
-export CTEPATH = /afs/awd/projects/cte
-endif
-
ifeq "$(PK_TIMER_SUPPORT)" ""
PK_TIMER_SUPPORT = 1
endif
@@ -442,7 +424,7 @@ GCC-DEFS += -DPK_TRACE_SZ=$(PK_TRACE_SZ)
endif
DEFS += $(GCC-DEFS)
-export LD_LIBRARY_PATH+=:$(GCC-TOOL-PATH)/lib
+export LD_LIBRARY_PATH+=:$(CROSS_COMPILER_PATH)/lib
############################################################################
OpenPOWER on IntegriCloud