Skip to content

Commit

Permalink
Release 4.0
Browse files Browse the repository at this point in the history
1. Enhanced support for EJ16 on RHEL
2. Support EJ1K on Ubuntu and RHEL
  • Loading branch information
vageline committed Jan 13, 2017
1 parent 6e1a255 commit 6d1c656
Show file tree
Hide file tree
Showing 186 changed files with 58,741 additions and 4,863 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,24 @@ As a developer, to get started:
Note: Developers have options to enable / disable specific targets (e.g. Big endian PPC64BE vs little endian PPC64EL) or P8 vs P7 tunings. See the customrc.p8be as an example. Creating a new component-specific environment variable is legal, however the env variable should be optional and provide a default that is safe for production.

Current valid options:
|ENV Variable | Component | Usage (BOLD = default) |
|------------------------|-----------|-------------------------|
|TARGET_PLATFORM | (all) | PPC64BE - Big-Endian Structures |
| | | PPC64LE - Little-Endian Structures |
|CUSTOMFLAGS | (all) | Custom GCC flags. Used typically to enable P8 or P7 tunings, debug, optimization, etc. |
|BLOCK_FILEMODE_ENABLED | block | Forces Block Layer to redirect all IO to a file instead of a CAPI device. 1 = enabled, 0 = disabled |
|BLOCK_KERNEL_MC_ENABLED | block | Enables block layer to communicate with cxlflash driver built in to the Linux kernel. For more information, see https://www.kernel.org/doc/Documentation/powerpc/cxlflash.txt |

ENV Variable | Component | Usage (BOLD = default)
----------------------- | --------- | ------------------------
TARGET_PLATFORM | (all) | PPC64BE - Big-Endian Structures
| | PPC64LE - Little-Endian Structures
CUSTOMFLAGS | (all) | Custom GCC flags. Used typically to enable P8 or P7 tunings, debug, optimization, etc.
BLOCK_FILEMODE_ENABLED | block | Forces Block Layer to redirect all IO to a file instead of a CAPI device. 1 = enabled, 0 = disabled
BLOCK_KERNEL_MC_ENABLED | block | Enables block layer to communicate with cxlflash driver built in to the Linux kernel. For more information, see https://www.kernel.org/doc/Documentation/powerpc/cxlflash.txt


Prebuild customrc files exist for different environments. Most users will want to use "customrc.p8elblkkermc" or "customrc.p8el:"

CustomRC files:
|Filename | Description
|------------------------|--------------------------------------|
|customrc.p8el | Little-endian Linux, P8 Tunings, Block FileMode enabled |
|customrc.p8elblkkermc | Little-endian Linux, P8 Tunings, Real IO to CXL Flash kernel driver |

Filename | Description
----------------------- | -------------------------------------
customrc.p8el | Little-endian Linux, P8 Tunings, Block FileMode enabled
customrc.p8elblkkermc | Little-endian Linux, P8 Tunings, Real IO to CXL Flash kernel driver


Example on a POWER8 Little-endian system:
Expand Down
12 changes: 8 additions & 4 deletions config.aix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ GENDIR = ${ROOTPATH}/obj/genfiles
IMGDIR = ${ROOTPATH}/img
PKGDIR = ${ROOTPATH}/pkg

GTESTDIR = src/test/framework/googletest/googletest
GTESTINC = ${GTESTDIR}/include

ifdef MODULE
OBJDIR = ${ROOTPATH}/obj/modules/${MODULE}
BEAMDIR = ${ROOTPATH}/obj/beam/${MODULE}
Expand All @@ -89,7 +92,8 @@ LIBS64 += $(addsuffix .64so, $(addprefix lib, ${MODULE}))
AR_LIBS += $(addsuffix .a, $(addprefix lib, ${MODULE}))
EXTRAINCDIR += ${GENDIR} ${CURDIR}
#EXPFLAGS = -bE:exportfile
LDFLAGS = -bnoentry -bM:SRE $(EXPFLAGS) ${LIBPATHS} -lc
LDFLAGS = -bnoentry -bM:SRE $(EXPFLAGS) ${LIBPATHS}
POSTLDFLAGS = -lc
#LDFLAGS = -bnoentry -bM:SRE -bexpall ${LIBPATHS} -lc
LDFLAGS64 = -b64 ${LDFLAGS}
LIBRARIES = $(addprefix ${OBJDIR}/, ${MEMBER})
Expand Down Expand Up @@ -190,7 +194,7 @@ else
TESTGEN = ${ROOTPATH}/src/usr/cxxtest/cxxtestgen.pl
endif

INCDIR = /usr/include /usr/include/sys ${ROOTPATH}/src/include/
INCDIR = ${ROOTPATH}/src/include /usr/include /usr/include/sys
_INCDIRS = ${INCDIR} ${EXTRAINCDIR}
INCFLAGS = $(addprefix -I, ${_INCDIRS} )
ASMINCFLAGS = $(addprefix $(lastword -Wa,-I), ${_INCDIRS})
Expand Down Expand Up @@ -231,12 +235,12 @@ ${OBJDIR}/%.o : %.S
ifdef MODULE
${OBJDIR}/${MEMBER} : ${OBJECTS}
@mkdir -p ${IMGDIR}
${LD} ${LDFLAGS} ${MODLIBS} -o $@ $(OBJECTS)
${LD} ${LDFLAGS} -o $@ $(OBJECTS) ${POSTLDFLAGS} ${MODLIBS}


${OBJDIR}/${MEMBER64} : ${OBJECTS64}
@mkdir -p ${IMGDIR}
${LD} ${LDFLAGS64} ${MODLIBS} -o $@ $(OBJECTS64)
${LD} ${LDFLAGS64} -o $@ $(OBJECTS64) ${POSTLDFLAGS} ${MODLIBS}
endif

${IMGDIR}/%.a : ${LIBRARIES} ${LIBRARIES64}
Expand Down
25 changes: 15 additions & 10 deletions config.linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ docs: src/build/doxygen/doxygen.conf
rm -rf obj/doxygen/*
doxygen src/build/doxygen/doxygen.conf


tests:
${MAKE} ship
${MAKE} test
Expand Down Expand Up @@ -66,6 +65,9 @@ GENDIR = ${ROOTPATH}/obj/genfiles
IMGDIR = ${ROOTPATH}/img
PKGDIR = ${ROOTPATH}/pkg

GTESTDIR = src/test/framework/googletest/googletest
GTESTINC = ${GTESTDIR}/include

ifdef MODULE
OBJDIR = ${ROOTPATH}/obj/modules/${MODULE}
BEAMDIR = ${ROOTPATH}/obj/beam/${MODULE}
Expand Down Expand Up @@ -110,17 +112,25 @@ ifeq ($(USE_ADVANCED_TOOLCHAIN),yes)
VPATH_DIRS:= ${ADV_TOOLCHAIN_PATH}/lib64 ${VPATH_DIRS}
#see the ld flags below (search for rpath). This puts the atx.x stuff on the front
#which is REQUIRED by the toolchain.
RPATH_PREPEND = -rpath,${ADV_TOOLCHAIN_PATH}/lib64

RPATH_PREPEND = -rpath,${ADV_TOOLCHAIN_PATH}/lib64
CFLAGS += ${COMMONFLAGS} \
-Wall ${CUSTOMFLAGS} ${ARCHFLAGS} \
-R '$$ADV_TOOLCHAIN_PATH/lib64:$$ORIGIN/../lib:$$ORIGIN:/lib:/usr/lib:/opt/ibm/capikv/lib' \
${INCFLAGS}
LDFLAGS = ${COMMONFLAGS} -Wl,${RPATH_PREPEND},-rpath,$$ORIGIN/../lib,-rpath,$$ORIGIN,-rpath,$(DEFAULT_LIB_INSTALL_PATH)
else
CC_RAW = gcc
CXX_RAW = g++
CC = ${CC_RAW}
CXX = ${CXX_RAW}
LD = ld
LD = gcc
OBJDUMP = objdump
#if we are NOT using the atx.x stuff, prepend nothing.
RPATH_PREPEND =
RPATH_PREPEND =
CFLAGS += ${COMMONFLAGS} \
-Wall ${CUSTOMFLAGS} ${ARCHFLAGS} \
${INCFLAGS}
LDFLAGS = ${COMMONFLAGS}
endif

#TODO: Find correct flags for surelock
Expand All @@ -135,10 +145,6 @@ endif
GITREVISION:=$(shell git rev-list HEAD | wc -l)-$(shell git rev-parse --short HEAD)
CUSTOMFLAGS += -DGITREVISION='"${GITREVISION}"'

CFLAGS += ${COMMONFLAGS} \
-Wall ${CUSTOMFLAGS} ${ARCHFLAGS} \
-R '$$ADV_TOOLCHAIN_PATH/lib64:$$ORIGIN/../lib:$$ORIGIN:/lib:/usr/lib:/opt/ibm/capikv/lib' \
${INCFLAGS}
#if ALLOW_WARNINGS is NOT defined, we assume we are compiling production code
#as such, we adhere to strict compile flags. If this is defined then we warn
#but allow the compile to continue.
Expand All @@ -156,7 +162,6 @@ endif
ASMFLAGS = ${COMMONFLAGS}
CXXFLAGS += ${CFLAGS} -fno-rtti -fno-exceptions -Wall
#RPATH order is important here. the prepend var lets us throw the ATxx stuff in first if needed.
LDFLAGS = ${COMMONFLAGS} -Wl,${RPATH_PREPEND},-rpath,$$ORIGIN/../lib,-rpath,$$ORIGIN,-rpath,$(DEFAULT_LIB_INSTALL_PATH)


INCDIR = ${ROOTPATH}/src/include/
Expand Down
27 changes: 18 additions & 9 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,30 @@
#select a default target architecture
#if no target arch is set, select PPC64BE for convenience.
ifndef TARGET_PLATFORM
TARGET_PLATFORM=PPC64BE
UNAME=$(shell uname -m)
ifeq ($(UNAME),x86_64)
TARGET_PLATFORM=x86_64
else
ifeq ($(UNAME),ppc64le)
TARGET_PLATFORM=PPC64EL
else
TARGET_PLATFORM=PPC64BE
endif
endif
endif

#If the target architecture is set, pass an architecture
#down as a #define to the underlying code
ARCHFLAGS += -DTARGET_ARCH_${TARGET_PLATFORM}
export ARCHFLAGS += -DTARGET_ARCH_${TARGET_PLATFORM}

#Determine if this a linux or AIX system

UNAME=$(shell uname)
ifeq ($(UNAME),AIX)
include ${ROOTPATH}/config.aix.mk
include ${ROOTPATH}/config.aix.mk
else
ifeq ($(UNAME),Darwin)
include ${ROOTPATH}/config.mac.mk
else
include ${ROOTPATH}/config.linux.mk
endif
ifeq ($(UNAME),Darwin)
include ${ROOTPATH}/config.mac.mk
else
include ${ROOTPATH}/config.linux.mk
endif
endif
29 changes: 29 additions & 0 deletions customrc.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: customrc.x86_64 $
#
# IBM Data Engine for NoSQL - Power Systems Edition User Library Project
#
# Contributors Listed Below - COPYRIGHT 2014,2015
# [+] 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 MAKECMD=gmake
export CUSTOMFLAGS=""
export BLOCK_FILEMODE_ENABLED=1
export TARGET_PLATFORM=x86_64
13 changes: 8 additions & 5 deletions env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
#
# IBM_PROLOG_END_TAG


export CUSTOMFLAGS=
export BLOCK_FILEMODE_ENABLED=
export BLOCK_MC_ENABLED=
export TARGET_PLATFORM=
export BLOCK_KERNEL_MC_ENABLED=

#allow a user to specify a custom RC file if needed
#e.g. disable the advanced toolchain with "export USE_ADVANCED_TOOLCHAIN=no"
Expand All @@ -49,6 +53,7 @@ export MCP_PATH=/opt/mcp/toolchains/fr_SL1_2014-05-12-194021
#configure advanced toolchain for linux
AT71PATH=/opt/at7.1
AT90PATH=/opt/at9.0-2-rc2
ATPATH=/opt/at10.0

if [ -d $MCP_PATH ]; then
echo "INFO: Found MCP: $MCP_PATH ."
Expand All @@ -60,10 +65,8 @@ fi



if [ -d $AT71PATH ]; then
export ADV_TOOLCHAIN_PATH=$AT71PATH
elif [ -d $AT90PATH ]; then
export ADV_TOOLCHAIN_PATH=$AT90PATH
if [ -d $ATPATH ]; then
export ADV_TOOLCHAIN_PATH=$ATPATH
else
echo "WARNING: no toolchain was found. Will fall back to system defaults. YMMV."
fi
Expand Down
Loading

0 comments on commit 6d1c656

Please sign in to comment.