aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-04-13 23:18:26 -0600
committernytpu <alex@nytpu.com>2021-04-13 23:18:26 -0600
commitc550dbaf9848ca20c959f67ebf89caa4f18bf7cb (patch)
tree38cbe4df5aa83dd8718d448ebd96cb5767fb5119
parentUpdate chip-update-firmware.sh (diff)
downloadCHIP-tools-c550dbaf9848ca20c959f67ebf89caa4f18bf7cb.tar.bz2
CHIP-tools-c550dbaf9848ca20c959f67ebf89caa4f18bf7cb.zip
fix fastboot commands to work with newer versions of fastboot
-rwxr-xr-xchip-fel-flash.sh4
-rwxr-xr-xchip-flash6
-rwxr-xr-xcommon.sh14
3 files changed, 12 insertions, 12 deletions
diff --git a/chip-fel-flash.sh b/chip-fel-flash.sh
index e11a631..2ec0971 100755
--- a/chip-fel-flash.sh
+++ b/chip-fel-flash.sh
@@ -197,10 +197,10 @@ else
echo == waiting for fastboot ==
if wait_for_fastboot; then
- fastboot -i 0x1f3a -u flash UBI ${SPARSE_UBI}
+ fastboot flash UBI ${SPARSE_UBI}
assert_error 134
- fastboot -i 0x1f3a continue
+ fastboot continue
assert_error 135
else
rm -rf "${TMPDIR}"
diff --git a/chip-flash b/chip-flash
index a384bb8..9e5de80 100755
--- a/chip-flash
+++ b/chip-flash
@@ -237,7 +237,7 @@ if ${stage[3]}; then
fi
if [[ "${METHOD}" == "fel" ]]; then
-
+
if ${stage[4]}; then
log "== upload ubi =="
${FEL} write $UBI_MEM_ADDR "${UBI}" > /dev/null
@@ -266,10 +266,10 @@ else
log "== waiting for fastboot =="
if wait_for_fastboot ${FASTBOOT_PORT}; then
- fastboot ${FASTBOOT_PORT} -i 0x1f3a -u flash UBI ${SPARSE_UBI} > /dev/null
+ fastboot ${FASTBOOT_PORT} flash UBI ${SPARSE_UBI} > /dev/null
assert_error 134
- fastboot ${FASTBOOT_PORT} -i 0x1f3a continue > /dev/null
+ fastboot ${FASTBOOT_PORT} continue > /dev/null
assert_error 135
else
exit 1
diff --git a/common.sh b/common.sh
index c705c76..359b9c8 100755
--- a/common.sh
+++ b/common.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash
TIMEOUT=30
FEL=${FEL:-sunxi-fel}
@@ -15,7 +15,7 @@ nand_writesize=4000
nand_oobsize=680
if [[ -z ${CHECK_DEPS} ]]; then
-
+
for TOOL in ${TOOLS[@]}; do
if [[ -z $(which $TOOL) ]]; then
echo " Error: Unable to locate $TOOL utility."
@@ -24,7 +24,7 @@ if [[ -z ${CHECK_DEPS} ]]; then
exit 1
fi
done
-
+
fi
#------------------------------------------------------------
@@ -52,7 +52,7 @@ wait_for_fastboot() {
echo -n "waiting for fastboot...";
export FLASH_WAITING_FOR_DEVICE=1
for ((i=$TIMEOUT; i>0; i--)) {
- if [[ ! -z "$(${FASTBOOT} -i 0x1f3a $@ devices)" ]]; then
+ if [[ ! -z "$(${FASTBOOT} $@ devices)" ]]; then
echo "OK";
unset FLASH_WAITING_FOR_DEVICE
return 0;
@@ -168,7 +168,7 @@ flash_images() {
echo "echo Configuring Video Mode" >> $ubootcmds
if [ "$FLAVOR" = "pocketchip" ]; then
-
+
echo "setenv clear_fastboot 'i2c mw 0x34 0x4 0x00 4;'" >> $ubootcmds
echo "setenv write_fastboot 'i2c mw 0x34 0x4 66 1; i2c mw 0x34 0x5 62 1; i2c mw 0x34 0x6 30 1; i2c mw 0x34 0x7 00 1'" >> $ubootcmds
echo "setenv test_fastboot 'i2c read 0x34 0x4 4 0x80200000; if itest.s *0x80200000 -eq fb0; then echo (Fastboot); i2c mw 0x34 0x4 0x00 4; fastboot 0; fi'" >> $ubootcmds
@@ -227,8 +227,8 @@ flash_images() {
export FLASH_VID_PID=1f3a1010
if wait_for_fastboot; then
- ${FASTBOOT} -i 0x1f3a -u flash UBI $IMAGESDIR/chip-$nand_erasesize-$nand_writesize-$nand_oobsize.ubi.sparse || RC=1
- ${FASTBOOT} -i 0x1f3a continue > /dev/null
+ ${FASTBOOT} flash UBI $IMAGESDIR/chip-$nand_erasesize-$nand_writesize-$nand_oobsize.ubi.sparse || RC=1
+ ${FASTBOOT} continue > /dev/null
else
echo "failed to flash the UBI image"
RC=1