1 Star 0 Fork 1

Creependerman/nxos-user

forked from BookOS/nxos-user 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.sh 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
小骨头 提交于 2022-03-12 04:09 . refactor(script): rename nxos as setup
#!/bin/bash
##
# Copyright (c) 2018-2022, BookOS Development Team
# SPDX-License-Identifier: Apache-2.0
#
# Contains: shell scripts for nxbase 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-user."
echo [CROSS COMPILE ] $CROSS_COMPILE
echo [ARCH ] $def_arch
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/creependerman/nxos-user.git
git@gitee.com:creependerman/nxos-user.git
creependerman
nxos-user
nxos-user
master

搜索帮助