⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upgrade_me.sh

📁 ALtera网络Blaster的映射文件
💻 SH
字号:
#!/bin/sh# this is the real upgrade shell script for the firmwareif [ -z "$OUR_LOG" ]then    OUR_LOG=/tmp/fwupg.logfiecho "$0 Starting..." >> $OUR_LOG# import some functions. /sbin/sys_utilsWORKINGDIR=`pwd`IMAGEDIR=/flash/firmware/imageif [ ! -f "firmware.tar.gz" ]then    echo "Firmware file doesn't exist!" >> $OUR_LOG    exit 1fi# now verify the checksum of the firmware filemd5sum -c firmware.md5if [ $? -ne 0 ]then    echo "Firmware MD5 did not match!" >> $OUR_LOG    exit 1fi# stop some processesecho "Stopping some processes" >> $OUR_LOGkillproc jtagdkillproc enb_listener# link an image directory to /tmp to reduce spaceln -s /tmp $IMAGEDIR# unpack the firmware tarfileecho "Unpacking firmware tarfile" >> $OUR_LOGsh -c "(cd /flash ; gunzip -c $WORKINGDIR/firmware.tar.gz | tar xpf -)"if [ $? -ne 0 ]then    echo "Firmware didn't unpack correctly" >> $OUR_LOG    exit 1fiif [ -f $IMAGEDIR/ramdisk.gz ]then    flashtool -w -f $IMAGEDIR/ramdisk.gz -n ramdisk    rm -f $IMAGEDIR/ramdisk.gzfiif [ -f $IMAGEDIR/zImage ]then    flashtool -w -f $IMAGEDIR/zImage -n zImage    rm -f $IMAGEDIR/zImagefi# the firmware unpacked correctly. The upgrade script will make us the primary# firmware file now, and reboot ussleep 1exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -