Hi Akira,

Thanks for the patch. I have updated the script.

Regards,
Vishal

On 23 April 2012 08:07, Akira Tsukamoto <akira.tsukamoto@linaro.org> wrote:
Hi,

I have reports from some of the Japanese user for the script to
install binary blob into SD card that it completes even failing
downloading binary files and being confusing.

I made a quick fix and attached the patch for the panda board.
The patch prevents executing when it has error downloading binary blob.

The script is:
install-binaries-4.0.3.sh

I also experienced that "wget" fails to download the file in Japan
(could be having thin Internet connection to the URL)
but the current script continues executing and finishes it without
any message without the file being downloaded successfully from
the url.

Ideally we should have md5 checksum for the downloaded file
but I think it could be considered in the future.

Regards,

Akira
----------------------------------
--- panda-ics-gcc46-tilt-tracking-blob-234/install-binaries-4.0.3.sh    2012-04-18 19:52:33.000000000 +0900
+++ panda-ics-gcc46-tilt-tracking-blob-12.03-release-6/install-binaries-4.0.3.sh        2012-04-23 11:27:43.000000000 +0900
@@ -1,14 +1,23 @@
-#!/bin/bash -x
+#!/bin/bash
+
+DL_URL='https://dl.google.com/dl/android/aosp/imgtec-panda-iml74k-cfb7bdad.tgz'
+
+err_handle() {
+  echo "Error, please try again"
+  exit 1
+}
+
+trap 'err_handle' ERR

 if [[ -z "$1"  ]]; then
-echo "usage: install-binaries.sh <dev entry for system partitio>"
-exit -1
+  echo "usage: install-binaries.sh <dev entry for system partition>"
+  exit -1
 fi


 mkdir -p /tmp/binaries
 cd /tmp/binaries/
-wget --no-check-certificate https://dl.google.com/dl/android/aosp/imgtec-panda-iml74k-cfb7bdad.tgz
+wget --no-check-certificate $DL_URL
 tar -zxvf imgtec-panda-iml74k-cfb7bdad.tgz
 sh extract-imgtec-panda.sh
 sudo mount $1 /mnt/
@@ -33,3 +42,4 @@ sudo chmod -R 755 /mnt/vendor/lib/
 sudo umount -f $1
 cd -
 sudo rm -r /tmp/binaries
+echo "Sucess, installing binary files"

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev