代码拉取完成,页面将自动刷新
同步操作将从 RT-Thread/ART-Pi-smart 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
# usage:
# source smart-env.sh [arch]
# example: source smart-env.sh # arm
# example: source smart-env.sh aarch64 # aarch64
# supported arch list
supported_arch="arm aarch64 riscv64 i386"
def_arch="unknown"
# find arch in arch list
if [ -z $1 ]
then
def_arch="arm" # default arch is arm
else
for arch in $supported_arch
do
if [ $arch = $1 ]
then
def_arch=$arch
break
fi
done
fi
# set env
case $def_arch in
"arm")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=arm-linux-musleabi-
cp userapps/configs/def_config_arm userapps/.config
;;
"aarch64")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=aarch64-linux-musleabi-
cp userapps/configs/def_config_aarch64 userapps/.config
;;
"riscv64")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=riscv64-unknown-linux-musl-
;;
"i386")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/tools/gnu_gcc/i386-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=i386-unknown-linux-musl-
;;
*) echo "unknown arch!"
return 1
esac
# export RTT_EXEC_PATH
export PATH=$PATH:$RTT_EXEC_PATH
echo "Arch => ${def_arch}"
echo "CC => ${RTT_CC}"
echo "PREFIX => ${RTT_CC_PREFIX}"
echo "EXEC_PATH => ${RTT_EXEC_PATH}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。