!107 Adapted to the neokylin system.

Merge pull request !107 from hemny/master
This commit is contained in:
opengauss-bot
2020-08-21 18:16:35 +08:00
committed by Gitee
5 changed files with 30 additions and 7 deletions

View File

@ -73,7 +73,7 @@ declare BUILD_DIR="${ROOT_DIR}/dest"
PLAT_FORM_STR=$(sh "${ROOT_DIR}/src/get_PlatForm_str.sh") PLAT_FORM_STR=$(sh "${ROOT_DIR}/src/get_PlatForm_str.sh")
if [ "${PLAT_FORM_STR}"x == "Failed"x ] if [ "${PLAT_FORM_STR}"x == "Failed"x ]
then then
echo "We only support OPENEULER(aarch64), CentOS(x86-64) platform." echo "We only support OPENEULER(aarch64), CentOS(x86-64), neokylin(aarch64), kylin(aarch64), CentOS(x86-64) platform."
exit 1; exit 1;
fi fi
@ -131,7 +131,7 @@ srv_pkg_pre_check
function getExtraFlags() function getExtraFlags()
{ {
if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then
if [ "$dist_version" == "openEuler" ]; then if [ ["$dist_version" == "openEuler"] -o ["$dist_version" == "neokylin"] -o ["$dist_version" == "kylin"] ]; then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA" GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA"
if [ "${optimized}"x == "true"x ] ; then if [ "${optimized}"x == "true"x ] ; then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA -D__ARM_LSE" GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA -D__ARM_LSE"

View File

@ -37,6 +37,10 @@ elif [ -f "/etc/centos-release" ]
then then
kernel=$(cat /etc/centos-release | awk -F ' ' '{print $1}' | tr A-Z a-z) kernel=$(cat /etc/centos-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
version=$(cat /etc/centos-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z) version=$(cat /etc/centos-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
elif [ -f "/etc/os-release" ]
then
kernel=$(source /etc/os-release; echo $ID)
version=$(source /etc/os-release; echo $VERSION_ID)
else else
kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z) kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z)
version=$(lsb_release -r | awk -F ' ' '{print $2}') version=$(lsb_release -r | awk -F ' ' '{print $2}')
@ -52,8 +56,12 @@ if [ X"$kernel" == X"centos" ]; then
dist_version="CentOS" dist_version="CentOS"
elif [ X"$kernel" == X"openeuler" ]; then elif [ X"$kernel" == X"openeuler" ]; then
dist_version="openEuler" dist_version="openEuler"
elif [ X"$kernel" == X"neokylin" ]; then
dist_version="neokylin"
elif [ X"$kernel" == X"kylin" ]; then
dist_version="kylin"
else else
echo "We only support openEuler(aarch64), CentOS platform." echo "We only support openEuler(aarch64), neokylin(aarch64), kylin(aarch64), CentOS platform."
echo "Kernel is $kernel" echo "Kernel is $kernel"
exit 1 exit 1
fi fi
@ -62,8 +70,8 @@ gcc_version="8.2"
##add platform architecture information ##add platform architecture information
PLATFORM_ARCH=$(uname -p) PLATFORM_ARCH=$(uname -p)
if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then
if [ "$dist_version" != "openEuler" ]; then if [ "$dist_version" != "openEuler" ] && [ "$dist_version" != "neokylin" ] && [ "$dist_version" != "kylin" ] ; then
echo "We only support NUMA on openEuler(aarch64) platform." echo "We only support NUMA on openEuler(aarch64), neokylin(aarch64), kylin(aarch64) platform."
exit 1 exit 1
fi fi
fi fi

View File

@ -25,9 +25,9 @@ export LC_ALL=en_US.UTF-8
net_cores=$1 net_cores=$1
#check euleros stop sysmonitor #check euleros stop sysmonitor
os=$(cat /etc/*release | grep "NAME=" | head -n 1 | cut -d '=' -f 2 | tr -d '"' | tr A-Z a-z) os=$(source /etc/os-release; echo $ID)
if [ "$os"x = "euleros"x ] if [ ["$os"x = "euleros"x] -o ["$os"x = "openeuler"x] -o ["$os"x = "neokylin"x] -o ["$os"x = "kylin"x] ]
then then
service sysmonitor stop service sysmonitor stop
fi fi

View File

@ -626,6 +626,10 @@ else ifeq ($(PLAT_FORM_STR), openeuler_aarch64)
cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.6.0' '$(DESTDIR)$(libdir)/libcurl.so.4.6.0' cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.6.0' '$(DESTDIR)$(libdir)/libcurl.so.4.6.0'
else ifeq ($(PLAT_FORM_STR), centos7.6_x86_64) else ifeq ($(PLAT_FORM_STR), centos7.6_x86_64)
cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.6.0' '$(DESTDIR)$(libdir)/libcurl.so.4.6.0' cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.6.0' '$(DESTDIR)$(libdir)/libcurl.so.4.6.0'
else ifeq ($(PLAT_FORM_STR), kylin_aarch64)
cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.6.0' '$(DESTDIR)$(libdir)/libcurl.so.4.6.0'
else ifeq ($(PLAT_FORM_STR), neokylin_aarch64)
cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.6.0' '$(DESTDIR)$(libdir)/libcurl.so.4.6.0'
else else
cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.5.0' '$(DESTDIR)$(libdir)/libcurl.so.4.5.0' cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.5.0' '$(DESTDIR)$(libdir)/libcurl.so.4.5.0'
endif endif

View File

@ -36,6 +36,9 @@ then
elif [ -f "/etc/openEuler-release" ] elif [ -f "/etc/openEuler-release" ]
then then
kernel=$(cat /etc/openEuler-release | awk -F ' ' '{print $1}' | tr A-Z a-z) kernel=$(cat /etc/openEuler-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
elif [ -f "/etc/os-release" ]
then
kernel=$(source /etc/os-release; echo $ID)
else else
kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z) kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z)
fi fi
@ -132,6 +135,14 @@ then
plat_form_str=openeuler_"$cpu_bit" plat_form_str=openeuler_"$cpu_bit"
fi fi
##################################################################################
# neokylin platform
# the result form like this: neokylin_aarch64
##################################################################################
if [ "$kernel"x = "neokylin"x ]
then
plat_form_str=neokylin_"$cpu_bit"
fi
################################################################################## ##################################################################################
# #