| Date: | 2010-05-02 23:32:06 (13 years 7 months ago) |
| Author: | Mirko Vogt |
| Commit: | 76a779fbfa3f5a1e688364a8f4ff29be6640ff64 |
| Message: | as usbboot often exists with exit code 0 (success), even if an major
error occured, we have to handle things differently... test for
output on stderr and if there is something, we assume an major error
happened
|
| Files: |
scripts/reflash_ben.sh (1 diff)
|
Change Details
| scripts/reflash_ben.sh |
| 154 | 154 | |
| 155 | 155 | if [ "$B" == "TRUE" ]; then |
| 156 | 156 | log "flashing bootloader..." |
| 157 | | usbboot -c "nprog 0 ${WORKING_DIR}/${LOADER} 0 0 -n" >> "${LOG_FILE}" |
| 157 | tmp=$(usbboot -c "nprog 0 ${WORKING_DIR}/${LOADER} 0 0 -n" 3>> "${LOG_FILE}" 2>&1 >&3) |
| 158 | test "${tmp}" && abort "error while flashing bootloader:\n${tmp}" |
| 158 | 159 | fi |
| 159 | 160 | if [ "$K" == "TRUE" ]; then |
| 160 | 161 | log "flashing kernel..." |
| 161 | | usbboot -c "nprog 1024 ${WORKING_DIR}/${KERNEL} 0 0 -n" >> "${LOG_FILE}" |
| 162 | tmp=$(usbboot -c "nprog 1024 ${WORKING_DIR}/${KERNEL} 0 0 -n" 3>> "${LOG_FILE}" 2>&1 >&3) |
| 163 | test "${tmp}" && abort "error while flashing kernel:\n${tmp}" |
| 162 | 164 | fi |
| 163 | 165 | if [ "$R" == "TRUE" ]; then |
| 164 | 166 | log "erase nand rootfs partition..." |
| 165 | | usbboot -c "boot;nerase 16 512 0 0" >> "${LOG_FILE}" |
| 167 | usbboot -c "boot;nerase 16 512 0 0" >> "${LOG_FILE}" 2>&1 |
| 166 | 168 | log "flashing rootfs..." |
| 167 | | usbboot -c "nprog 2048 ${WORKING_DIR}/${ROOTFS} 0 0 -n" >> "${LOG_FILE}" |
| 169 | tmp=$(usbboot -c "nprog 2048 ${WORKING_DIR}/${ROOTFS} 0 0 -n" 3>> "${LOG_FILE}" 2>&1 >&3) |
| 170 | test "${tmp}" && abort "error while flashing rootfs:\n${tmp}" |
| 168 | 171 | fi |
| 169 | 172 | log "done" |
Download the corresponding diff file