1 Star 0 Fork 0

sunplus-plus1 / ipack_q654

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
copy2tftp.sh 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
# Copy dtb and uImage to another with user name
TFTP_PATH=$1
NONOS_B_PATH=nonos/Bchip-non-os
NONOS_B_IMG=rom.img
cd bin
pwd
username=$(whoami)
newfilename1=dtb_${username}
newfilename2=uImage_${username}
newfilename3=a926_${username}
echo "The new file name of dtb is ${newfilename1}"
echo "The new file name of uImage is ${newfilename2}"
echo "The new file name of ${NONOS_B_IMG} is ${newfilename3}"
cp dtb ${newfilename1}
cp uImage ${newfilename2}
if [ -f ../../${NONOS_B_PATH}/bin/${NONOS_B_IMG} ]; then
cp ../../${NONOS_B_PATH}/bin/${NONOS_B_IMG} ${newfilename3}
# Move these two files with user name to TFTP server's folder
echo "Copy ${newfilename1}, ${newfilename2} and ${newfilename3} to ${TFTP_PATH}"
mv ${newfilename1} ${TFTP_PATH}
mv ${newfilename2} ${TFTP_PATH}
mv ${newfilename3} ${TFTP_PATH}
else
# Move these two files with user name to TFTP server's folder
echo "Copy ${newfilename1} and ${newfilename2} to ${TFTP_PATH}"
mv ${newfilename1} ${TFTP_PATH}
mv ${newfilename2} ${TFTP_PATH}
rm -f ${TFTP_PATH}/${newfilename3}
fi
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

搜索帮助