diff --git a/build.sh b/build.sh index d5fcbbf5d50b14a3d522652da5493e9606764285..7e156746b37342ddc74c4dba85eb0e81568e93a0 100755 --- a/build.sh +++ b/build.sh @@ -73,7 +73,7 @@ declare BUILD_DIR="${ROOT_DIR}/dest" PLAT_FORM_STR=$(sh "${ROOT_DIR}/src/get_PlatForm_str.sh") if [ "${PLAT_FORM_STR}"x == "Failed"x ] 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; fi @@ -131,7 +131,7 @@ srv_pkg_pre_check function getExtraFlags() { 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" if [ "${optimized}"x == "true"x ] ; then GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA -D__ARM_LSE" diff --git a/package/package.sh b/package/package.sh index f651440a3712c8d77a2fcdd221b47450d578495d..59fdc5d0b912f32ef04cd09628a0967bcb89b8b8 100644 --- a/package/package.sh +++ b/package/package.sh @@ -37,6 +37,10 @@ elif [ -f "/etc/centos-release" ] then 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) +elif [ -f "/etc/os-release" ] +then + kernel=$(source /etc/os-release; echo $ID) + version=$(source /etc/os-release; echo $VERSION_ID) else kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z) version=$(lsb_release -r | awk -F ' ' '{print $2}') @@ -52,8 +56,12 @@ if [ X"$kernel" == X"centos" ]; then dist_version="CentOS" elif [ X"$kernel" == X"openeuler" ]; then dist_version="openEuler" +elif [ X"$kernel" == X"neokylin" ]; then + dist_version="neokylin" +elif [ X"$kernel" == X"kylin" ]; then + dist_version="kylin" 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" exit 1 fi @@ -62,8 +70,8 @@ gcc_version="8.2" ##add platform architecture information PLATFORM_ARCH=$(uname -p) if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then - if [ "$dist_version" != "openEuler" ]; then - echo "We only support NUMA on openEuler(aarch64) platform." + if [ "$dist_version" != "openEuler" ] && [ "$dist_version" != "neokylin" ] && [ "$dist_version" != "kylin" ] ; then + echo "We only support NUMA on openEuler(aarch64), neokylin(aarch64), kylin(aarch64) platform." exit 1 fi fi diff --git a/src/bin/scripts/bind_net_irq.sh b/src/bin/scripts/bind_net_irq.sh index c17a64a8fc775ee5c9153a78ac9808cedf34c40e..189fd7600d893ed7da0060d12118276333c03ca9 100755 --- a/src/bin/scripts/bind_net_irq.sh +++ b/src/bin/scripts/bind_net_irq.sh @@ -25,9 +25,9 @@ export LC_ALL=en_US.UTF-8 net_cores=$1 #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 service sysmonitor stop fi diff --git a/src/gausskernel/Makefile b/src/gausskernel/Makefile index eb27e4c0a2362e8e9b3076749da3bef6d982f90e..571e5ea97f6d56d4a19d8372717ecd94ed23682e 100644 --- a/src/gausskernel/Makefile +++ b/src/gausskernel/Makefile @@ -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' 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' +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 cp '$(LIBCURL_LIB_PATH)/libcurl.so.4.5.0' '$(DESTDIR)$(libdir)/libcurl.so.4.5.0' endif diff --git a/src/get_PlatForm_str.sh b/src/get_PlatForm_str.sh index 978350dcc86d2f744f5c0ce15442a8a08f35bef7..7433076c7c88df8ebc33cac9dce78f182c00dceb 100644 --- a/src/get_PlatForm_str.sh +++ b/src/get_PlatForm_str.sh @@ -36,6 +36,9 @@ then elif [ -f "/etc/openEuler-release" ] then 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 kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z) fi @@ -132,6 +135,14 @@ then plat_form_str=openeuler_"$cpu_bit" fi +################################################################################## +# neokylin platform +# the result form like this: neokylin_aarch64 +################################################################################## +if [ "$kernel"x = "neokylin"x ] +then + plat_form_str=neokylin_"$cpu_bit" +fi ################################################################################## #