1 Star 0 Fork 8

Li.XiongHui/libnxos

forked from BookOS/libnxos 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.sh 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
小骨头 提交于 2022-11-17 03:12 . feat: rename nxbase as nxos
#!/bin/bash
##
# Copyright (c) 2018-2022, NXOS Development Team
# SPDX-License-Identifier: Apache-2.0
#
# Contains: shell scripts for nxos lib environment
#
# Change Logs:
# Date Author Notes
# 2022-1-31 JasonHu Init
##
# usage:
# source setup.sh [arch]
# example: source setup.sh # x86
# example: source setup.sh riscv64 # riscv64
# supported targe list
supported_arch="x86 riscv64"
def_arch="unknown"
# find arch in arch list
if [ -z $1 ]
then
def_arch="x86" # default arch is x86
else
for arch in $supported_arch
do
if [ $arch = $1 ]
then
def_arch=$arch
break
fi
done
fi
# set env
case $def_arch in
"x86")
export CROSS_COMPILE=
export ARCH=x86
;;
"riscv64")
export CROSS_COMPILE=riscv64-unknown-elf-
export ARCH=riscv64
;;
*) echo "unknown arch! " $def_arch
return 1
esac
echo "Set environment for nxos lib."
echo [CROSS COMPILE ] $CROSS_COMPILE
echo [ARCH ] $def_arch
echo [NXOS ARCH ] $ARCH
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/Li_XiongHui/libnxos.git
git@gitee.com:Li_XiongHui/libnxos.git
Li_XiongHui
libnxos
libnxos
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385