1 Star 0 Fork 0

sunplus-plus1 / ipack_q654

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
configure.sh 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
CFG=pack.conf
# source OLD config if availabe
if [ -f $CFG ];then
. $CFG
fi
# import color CONSTANT
if [ -f colors.env ];then
. colors.env
fi
# Print "(default)" if two strings are the same
# $1: string1 to match
# $2: string2 to match
append_default_str()
{
[ "$1" = "$2" ] && echo -ne "${RED} (default)${NC}"
echo ""
}
# CA9 boot or ARM926 boot
def_val=$pf_type
[ "$def_val" = "" ] && def_val=1
echo "* Select IC Type :"
echo "--------------------"
echo -n " [x] Use iBoot (internal ROM): for Zebu or ASIC"; append_default_str $def_val x
echo -n " [s] Use iBoot (external NOR): for EXT_BOOT"; append_default_str $def_val s
echo -n " -> "
read pf_type
[ "$pf_type" = "" ] && pf_type=$def_val
echo "$pf_type"
echo "pf_type=$pf_type" >$CFG
#
# DRAM param
#
pf_num=$pf_type
echo "pf_num=$pf_num" >>$CFG
echo "--------------"
echo "Configuration"
echo "--------------"
cat $CFG
echo ""
echo "Adjust boot image ..."
case "$pf_type" in
s)
iboot=
;;
x)
iboot=bootRom.bin.zero
;;
*)
echo "Error: Unknow type!!"
exit 1
esac
case "$pf_num" in
s | x)
xboot=
;;
*)
echo "Error: Unknow number!!"
exit 1
esac
if [ "$iboot" != "" ];then
ln -sf $iboot bin/bootRom.bin
else
rm -f bin/bootRom.bin
fi
if [ "$xboot" != "" ];then
ln -sf $xboot bin/xboot.img
else
rm -f bin/xboot.img
fi
echo ""
C
1
https://gitee.com/sunplus-plus1/ipack_q654.git
git@gitee.com:sunplus-plus1/ipack_q654.git
sunplus-plus1
ipack_q654
ipack_q654
master

搜索帮助