From 983a59dd5fe40de0daed44cada048bd01bfae7c7 Mon Sep 17 00:00:00 2001 From: computermouth Date: Thu, 10 Nov 2016 17:35:02 -0800 Subject: [PATCH] Add no limit option --- chip-update-firmware.sh | 6 +++++- common.sh | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/chip-update-firmware.sh b/chip-update-firmware.sh index e726a2f..f80f17f 100755 --- a/chip-update-firmware.sh +++ b/chip-update-firmware.sh @@ -25,7 +25,7 @@ UBI_PREFIX="chip" UBI_SUFFIX="ubi.sparse" UBI_TYPE="400000-4000" -while getopts "sgpbfhB:N:F:" opt; do +while getopts "sgpbfnhB:N:F:" opt; do case $opt in s) echo "== Server selected ==" @@ -47,6 +47,10 @@ while getopts "sgpbfhB:N:F:" opt; do echo "== Force clean and download ==" rm -rf .dl/ .new/ ;; + n) + echo "== No Limit mode ==" + NO_LIMIT="while itest.b *0x80400000 -ne 03; do i2c mw 0x34 0x30 0x03; i2c read 0x34 0x30 1 0x80400000; done; " + ;; B) BRANCH="$OPTARG" echo "== ${BRANCH} branch selected ==" diff --git a/common.sh b/common.sh index 5c96e28..9cc80f6 100755 --- a/common.sh +++ b/common.sh @@ -13,7 +13,7 @@ if [[ -z $(which $FEL) ]]; then echo " Error: Unable to locate FEL utility." echo " Install FEL with:" echo " CHIP-SDK setup script [github.com/NextThingCo/CHIP-SDK]" - echo " - or build from source [github.com/NextThingCo/sunxi-tools]" + echo " - or build from source [github.com/linux-sunxi/sunxi-tools]" exit 1 fi @@ -145,7 +145,7 @@ flash_images() { echo "setenv bootargs root=ubi0:rootfs rootfstype=ubifs rw ubi.mtd=4 quiet lpj=501248 loglevel=3 splash plymouth.ignore-serial-consoles" >> $ubootcmds echo "setenv bootpaths 'initrd noinitrd'" >> $ubootcmds - echo "setenv bootcmd 'run test_fastboot; if test -n \${fel_booted} && test -n \${scriptaddr}; then echo (FEL boot); source \${scriptaddr}; fi; for path in \${bootpaths}; do run boot_\$path; done'" >> $ubootcmds + echo "setenv bootcmd '${NO_LIMIT}run test_fastboot; if test -n \${fel_booted} && test -n \${scriptaddr}; then echo (FEL boot); source \${scriptaddr}; fi; for path in \${bootpaths}; do run boot_\$path; done'" >> $ubootcmds echo "setenv boot_initrd 'mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload \$fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload 0x44000000 /boot/initrd.uimage; ubifsload \$kernel_addr_r /boot/zImage; bootz \$kernel_addr_r 0x44000000 \$fdt_addr_r'" >> $ubootcmds echo "setenv boot_noinitrd 'mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload \$fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload \$kernel_addr_r /boot/zImage; bootz \$kernel_addr_r - \$fdt_addr_r'" >> $ubootcmds echo "setenv video-mode" >> $ubootcmds @@ -157,7 +157,7 @@ flash_images() { else echo "setenv bootpaths 'initrd noinitrd'" >> $ubootcmds - echo "setenv bootcmd 'run test_fastboot; if test -n \${fel_booted} && test -n \${scriptaddr}; then echo (FEL boot); source \${scriptaddr}; fi; for path in \${bootpaths}; do run boot_\$path; done'" >> $ubootcmds + echo "setenv bootcmd '${NO_LIMIT}run test_fastboot; if test -n \${fel_booted} && test -n \${scriptaddr}; then echo (FEL boot); source \${scriptaddr}; fi; for path in \${bootpaths}; do run boot_\$path; done'" >> $ubootcmds echo "setenv boot_initrd 'mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload \$fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload 0x44000000 /boot/initrd.uimage; ubifsload \$kernel_addr_r /boot/zImage; bootz \$kernel_addr_r 0x44000000 \$fdt_addr_r'" >> $ubootcmds echo "setenv boot_noinitrd 'mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload \$fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload \$kernel_addr_r /boot/zImage; bootz \$kernel_addr_r - \$fdt_addr_r'" >> $ubootcmds echo "setenv dip_addr_r 0x43400000" >> $ubootcmds