diff --git a/data/qi_lb60/files/root/Music/Creative_Commons_-_Remix_Culture.audio.ogg b/data/qi_lb60/files/root/Music/Creative_Commons_-_Remix_Culture.audio.ogg deleted file mode 100644 index 85a6b2644..000000000 Binary files a/data/qi_lb60/files/root/Music/Creative_Commons_-_Remix_Culture.audio.ogg and /dev/null differ diff --git a/data/qi_lb60/files/root/Music/README b/data/qi_lb60/files/root/Music/README deleted file mode 100644 index 57e868e57..000000000 --- a/data/qi_lb60/files/root/Music/README +++ /dev/null @@ -1,3 +0,0 @@ -the Music file [Creative_Commons_-_Remix_Culture.ogg] - can found at: http://mirrors.creativecommons.org/reticulum_rex/ - download at : http://mirrors.creativecommons.org/reticulum_rex/Creative_Commons_-_Remix_Culture.ogg diff --git a/data/qi_lb60/scripts/reflash_ben.sh b/data/qi_lb60/scripts/reflash_ben.sh index 209b034e7..fd44ef7f8 100755 --- a/data/qi_lb60/scripts/reflash_ben.sh +++ b/data/qi_lb60/scripts/reflash_ben.sh @@ -85,6 +85,45 @@ abort() { exit 1 } +progress_prepare () { + WIDTH=$(tput cols) + HEIGHT=$(tput lines) + i=1 + DONE=0 + FITFR=0 + echo "Done:" + echo -n "[" + tput cup $HEIGHT $WIDTH; echo -n "]" +} + +progress_draw () { + ILINE="$1" + if [[ "$ILINE" =~ It\ will\ cause\ [[:digit:]]+\ times\ buffer\ transfer\.$ ]]; then + TOTAL=${ILINE#*cause\ } + TOTAL=${TOTAL%\ times*} + FIT=$(echo "($WIDTH-2)/$TOTAL" | bc -l) + tput cup $(( $HEIGHT-2 )) 7; echo -n 0/$TOTAL + fi + if [[ "$ILINE" =~ Checking\ [[:digit:]]+\ bytes\.\.\.\ Comparing\ [[:digit:]]+\ bytes\ -\ SUCCESS$ || "$ILINE" =~ Checking\ [[:digit:]]+\ bytes\.\.\.\ no\ check\!\ End\ at\ Page\:\ [[:digit:]]+ ]]; then + FITFR=$(echo $FITFR+$FIT | bc -l) + ((DONE++)) + tput cup $(( $HEIGHT-2 )) 7; echo -n $DONE/$TOTAL + if [ $(echo "$FITFR >= 1" | bc) -eq 1 ]; then + tput cup $HEIGHT $i; + i=$(( $i+${FITFR%.*} )) + for j in $(seq 1 ${FITFR%.*}); do echo -n "#"; done + FITFR=0.${FITFR#*.} + fi + fi +} + +progress_finish () { + tput cup $HEIGHT $WIDTH + echo + tmp=$(<"${LOG_FILE}.err") + cat "${LOG_FILE}.err" >> "${LOG_FILE}" +} + [ "$(whoami)" == "root" ] || abort "this script must be run as root" log "working dir: ${WORKING_DIR}" @@ -141,19 +180,31 @@ usbboot -c "boot" >> "${LOG_FILE}" || abort "can't boot device - xburst-tools se if [ "$B" == "TRUE" ]; then log "flashing bootloader..." - tmp=$(usbboot -c "nprog 0 ${WORKING_DIR}/${LOADER} 0 0 -n" 3>> "${LOG_FILE}" 2>&1 >&3) + progress_prepare + while read ILINE + do progress_draw "$ILINE" + done< <(usbboot -c "nprog 0 ${WORKING_DIR}/${LOADER} 0 0 -n" 2>"${LOG_FILE}.err" | tee -a "${LOG_FILE}") + progress_finish test "${tmp}" && abort "error while flashing bootloader:\n${tmp}" fi if [ "$K" == "TRUE" ]; then log "flashing kernel..." - tmp=$(usbboot -c "nprog 1024 ${WORKING_DIR}/${KERNEL} 0 0 -n" 3>> "${LOG_FILE}" 2>&1 >&3) + progress_prepare + while read ILINE + do progress_draw "$ILINE" + done< <(usbboot -c "nprog 1024 ${WORKING_DIR}/${KERNEL} 0 0 -n" 2>"${LOG_FILE}.err" | tee -a "${LOG_FILE}") + progress_finish test "${tmp}" && abort "error while flashing kernel:\n${tmp}" fi if [ "$R" == "TRUE" ]; then log "erase nand rootfs partition..." usbboot -c "boot;nerase 16 1024 0 0" >> "${LOG_FILE}" 2>&1 log "flashing rootfs..." - tmp=$(usbboot -c "nprog 2048 ${WORKING_DIR}/${ROOTFS} 0 0 -n" 3>> "${LOG_FILE}" 2>&1 >&3) + progress_prepare + while read ILINE + do progress_draw "$ILINE" + done< <(usbboot -c "nprog 2048 ${WORKING_DIR}/${ROOTFS} 0 0 -n" 2>"${LOG_FILE}.err" | tee -a "${LOG_FILE}") + progress_finish test "${tmp}" && abort "error while flashing rootfs:\n${tmp}" fi log "done" diff --git a/package/ks7010/Makefile b/package/ks7010/Makefile index ed144d6f5..4a9c74526 100644 --- a/package/ks7010/Makefile +++ b/package/ks7010/Makefile @@ -37,4 +37,9 @@ define Build/Compile modules endef +define KernelPackage/ks7010/install + $(INSTALL_DIR) $(1)/lib/firmware/ + $(CP) ./files/* $(1)/lib/firmware/ +endef + $(eval $(call KernelPackage,ks7010)) diff --git a/data/qi_lb60/files/lib/firmware/ks7010sd.rom b/package/ks7010/files/ks7010sd.rom similarity index 100% rename from data/qi_lb60/files/lib/firmware/ks7010sd.rom rename to package/ks7010/files/ks7010sd.rom diff --git a/data/qi_lb60/files/lib/firmware/ks79xx.cfg b/package/ks7010/files/ks79xx.cfg similarity index 100% rename from data/qi_lb60/files/lib/firmware/ks79xx.cfg rename to package/ks7010/files/ks79xx.cfg