这里写自定义目录标题
cryptopp 交叉编译aarch64
#写脚本setenv-aarch64.sh
#!/bin/sh
LANG=en
echo "bengin environment_check "
OS_Distributor=`lsb_release -i | awk -F":" '{print $2}' | awk '{print $1}'`
OS_Description=`lsb_release -d | awk -F":" '{print $2}' | awk '{print $2}'`
echo "-------------------------------------------------------------------------------------------------------"
echo "OS Distributor is $OS_Distributor"
if [ $OS_Distributor != "Ubuntu" ] ; then
echo "OS Distributor must be ubuntu check failed exit!"
#exit
else
echo "OS Distributor check ok"
fi
echo "-------------------------------------------------------------------------------------------------------"
echo "OS Description is $OS_Description"
#if [[ $OS_Description =~ "16.04" ]] ; then
#echo "OS Description check ok"
#else
#echo "OS Description must be 16.04 check failed exit!"
#exit
#fi
CPU_ARCheck=`lscpu |grep "Architecture:" | awk '{print $2}'`
CPU_NAME=`lscpu |grep "Model name:" | awk -F ':' '{print $2}'`
CPU_CORES=`lscpu |grep "CPU(s):" |grep -v NUMA | awk '{print $2}'`
#MEM=`free -h | grep Mem | awk '{print $2}'`
MEM_SIZE=`free -b | grep Mem | awk '{print $2}'`
MEM=`echo "scale=4;${MEM_SIZE}/1000/1000/1000" | bc`
ROOT_DISK_SIZE=` df -h |grep -w "/" | awk '{print $2}'`
DATA_DISK_SIZE=`df -h |grep -w "/data" | awk '{print $2}'`
GPUS=`nvidia-smi -L | awk -F'(' '{print $1}'`
echo "-------------------------------------------------------------------------------------------------------"
echo "CPU: $CPU_NAME $CPU_ARCH $CPU_CORES "
#if [ $CPU_CORES -lt 16 ] ; then
#echo "CPU too small < 16 !!!"
#echo "CPU too small < 16 check failed exit!"
#exit
#else
#echo "CPU check ok"
#fi
echo "-------------------------------------------------------------------------------------------------------"
echo "MEM: Memory size ${MEM}G"
#if [ $MEM -lt 62 ] ; then
#echo "Memory < 64G !!!"
#echo "Memory < 64G check failed exit!"
#exit
#else
#echo "Memory check ok"
#fi
echo "-------------------------------------------------------------------------------------------------------"
echo "DISK: ROOT size ${ROOT_DISK_SIZE}"
if [ -z ${DATA_DISK_SIZE} ] ; then
DATA_DISK_SIZE="None"
echo "DISK: /DATA size ${DATA_DISK_SIZE} IO: none"
echo "DISK /DATA not found check failed exit!!!"
#exit
fi
DOCKER_VERSION=`docker -v`
DOCKER_VERSION_TAG=`echo $DOCKER_VERSION | awk '{print $3}' | awk -F',' '{print $1}'`
echo "Docker verion: $DOCKER_VERSION"
#if [[ $DOCKER_VERSION_TAG =~ "18.06" ]] ; then
#echo "Docker version ok"
#else
#echo "Docker verison not match check failed exit!"
#exit
#fi
echo "-------------------------------------------------------------------------------------------------------"
2、编译
source ./setenv-aarch64.sh
make -f GNUmakefile-cross static dynamic cryptest.exe -j8