Date:2011-03-02 04:46:28 (9 years 3 months ago)
Author:Xiangfu Liu
Commit:9ef5915d399e42de8e40be939a2ec181cb67c307
Message:reflash_ben.sh, new option b k r, reboot device after reflash

Files: data/qi_lb60/scripts/reflash_ben.sh (6 diffs)

Change Details

data/qi_lb60/scripts/reflash_ben.sh
11#!/bin/bash
22# version of me
3__VERSION__="2011-11-20"
3__VERSION__="2011-03-02"
44
55# use 'http' to download and flash images, use 'file' to flash images present in the <WORKING_DIR>
66PROTOCOL="http"
...... 
2020ROOTFS="openwrt-xburst-qi_lb60-root.ubi"
2121
2222# options for reflash bootloader, kernel, rootfs
23B="TRUE"
24K="TRUE"
25R="TRUE"
23B="FALSE"
24K="FALSE"
25R="FALSE"
26ALL="TRUE"
2627
27while getopts d:l:h OPTIONS
28while getopts d:l:hbkr OPTIONS
2829do
2930    case $OPTIONS in
3031    d)
...... 
3536        PROTOCOL="file"
3637        VERSION="Local"
3738        ;;
39    b)
40    ALL="FALSE"
41        B="TRUE"
42        ;;
43    k)
44    ALL="FALSE"
45        K="TRUE"
46        ;;
47    r)
48    ALL="FALSE"
49        R="TRUE"
50        ;;
3851    *)
3952        echo "\
4053
...... 
6073    esac
6174done
6275
76if [ "$ALL" == "TRUE" ]; then
77    B="TRUE"
78    K="TRUE"
79    R="TRUE"
80fi
81
6382# where the verbose output goes to
6483LOG_FILE="${WORKING_DIR}/log.txt"
6584
...... 
198217fi
199218if [ "$R" == "TRUE" ]; then
200219    log "erase nand rootfs partition..."
201    usbboot -c "boot;nerase 16 1024 0 0" >> "${LOG_FILE}" 2>&1
220    usbboot -c "nerase 16 1024 0 0" >> "${LOG_FILE}" 2>&1
202221    log "flashing rootfs..."
203222    progress_prepare
204223    while read ILINE
...... 
207226    progress_finish
208227    test "${tmp}" && abort "error while flashing rootfs:\n${tmp}"
209228fi
229
230if [ "$ALL" == "TRUE" ]; then
231    log "reboot device..."
232    usbboot -c "reset" >> "${LOG_FILE}" 2>&1
233fi
234
210235log "done"

Archive Download the corresponding diff file



interactive