r4593 - developers/tick/Test_env_script_GTA02A5
tick at docs.openmoko.org
tick at docs.openmoko.org
Sat Aug 9 09:35:35 CEST 2008
Author: tick
Date: 2008-08-09 09:35:35 +0200 (Sat, 09 Aug 2008)
New Revision: 4593
Removed:
developers/tick/Test_env_script_GTA02A5/README
developers/tick/Test_env_script_GTA02A5/projectdiff.sh
developers/tick/Test_env_script_GTA02A5/setup_at_neo_assassin.script
developers/tick/Test_env_script_GTA02A5/setup_at_neo_diversity.script
developers/tick/Test_env_script_GTA02A5/setupenv
Log:
Clean up some out of date scripts
Deleted: developers/tick/Test_env_script_GTA02A5/README
===================================================================
--- developers/tick/Test_env_script_GTA02A5/README 2008-08-07 10:11:38 UTC (rev 4592)
+++ developers/tick/Test_env_script_GTA02A5/README 2008-08-09 07:35:35 UTC (rev 4593)
@@ -1,9 +0,0 @@
-License: GPL
-Composor: Tick
-
-Notice: Assassin is not availiable on public yet, coming soon.
-
-Please Run the ./setupenv and choose your option.
-If you get any problem from that, please e-mail to tick at openmoko.com
-
-Enjoy it.
Deleted: developers/tick/Test_env_script_GTA02A5/projectdiff.sh
===================================================================
--- developers/tick/Test_env_script_GTA02A5/projectdiff.sh 2008-08-07 10:11:38 UTC (rev 4592)
+++ developers/tick/Test_env_script_GTA02A5/projectdiff.sh 2008-08-09 07:35:35 UTC (rev 4593)
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-if (( $# < 1 ));then
- echo "Usage $0 last_date"
- echo "The format of last_date is yyyymmdd"
- exit
-fi
-if !( date -d $1 );then
- echo "Invalid date format: " $1
- exit
-fi
-DIR=`pwd`
-NOW=`date +%Y%m%d`
-REPORTFILE="${DIR}/$1-${NOW}.diff"
-if [ -e ${REPORTFILE} ];then
- rm -rf ${REPORTFILE}
-fi
-echo REPORTFILE=$REPORTFILE
-PROJECTS="svn://svn.projects.openmoko.org/svnroot/diversity
- svn://svn.projects.openmoko.org/svnroot/assassin
- svn://svn.projects.openmoko.org/svnroot/illume
- svn://svn.projects.openmoko.org/svnroot/exposure
- svn://svn.projects.openmoko.org/svnroot/ninja
- http://svn.openmoko.org/trunk/src/target/opkg"
-PRJ_HOME="${DIR}/.projects"
-if ! [ -e ${PRJ_HOME} ];then
- mkdir ${PRJ_HOME}
-fi
-cd ${PRJ_HOME}
-
-for P in ${PROJECTS};do
- base=`basename $P`;
- if ! [ -e ${base} ];then
- svn checkout ${P} ${base}
- fi
- pushd ${base}
- svn update;
- echo "In project ${base} the diff from $1 to ${NOW}:" >> $REPORTFILE
- svn log -r '{'$1'}:HEAD' | grep -v -- '-----------------' >> $REPORTFILE
- echo "-----------------------------------" >> $REPORTFILE
- popd
-done
Deleted: developers/tick/Test_env_script_GTA02A5/setup_at_neo_assassin.script
===================================================================
--- developers/tick/Test_env_script_GTA02A5/setup_at_neo_assassin.script 2008-08-07 10:11:38 UTC (rev 4592)
+++ developers/tick/Test_env_script_GTA02A5/setup_at_neo_assassin.script 2008-08-09 07:35:35 UTC (rev 4593)
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# name server stuff
-cp resolv.conf /etc/
-
-cd /etc/ipkg
-rm -rf *
-cd ~
-cp gta02.conf /etc/ipkg
-cd /etc
-rm -rf opkg
-ln -sf ipkg opkg
-cd /var/lib/ipkg
-rm -rf
-cd ~/
-ipkg update
-opkg-cl update
-ipkg install assassin
-
Deleted: developers/tick/Test_env_script_GTA02A5/setup_at_neo_diversity.script
===================================================================
--- developers/tick/Test_env_script_GTA02A5/setup_at_neo_diversity.script 2008-08-07 10:11:38 UTC (rev 4592)
+++ developers/tick/Test_env_script_GTA02A5/setup_at_neo_diversity.script 2008-08-09 07:35:35 UTC (rev 4593)
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# name server stuff
-cp resolv.conf /etc/
-
-cd /etc/ipkg
-rm -rf *
-cd ~
-cp gta02.conf /etc/ipkg
-cd /var/lib/ipkg
-rm -rf
-cd ~/
-ipkg update
-sleep 5
-ipkg install diversity-daemon
-sleep 5
-ipkg install diversity-nav
-
-
Deleted: developers/tick/Test_env_script_GTA02A5/setupenv
===================================================================
--- developers/tick/Test_env_script_GTA02A5/setupenv 2008-08-07 10:11:38 UTC (rev 4592)
+++ developers/tick/Test_env_script_GTA02A5/setupenv 2008-08-09 07:35:35 UTC (rev 4593)
@@ -1,174 +0,0 @@
-#!/bin/bash
-
-IMAGE_DIR="images.storage"
-NEEDDOWNLOAD=1;
-ASSASSINTESTENV=1;
-DIVERSITYTESTENV=1;
-INTERNALFLAG=0
-
-if ( ping -c 2 barbie.tw.openmoko.com 2>&1 > /dev/null ) && (( ${INTERNALFLAG}==1 ));then
- echo "Get Images from Barbie..."
- unset UBOOT
- KERNEL=http://barbie/~build/internal-daily-build/neo1973/deploy/glibc/images/neo1973/uImage-neo1973-latest.bin
- ROOTFS=http://barbie/~build/internal-daily-build/neo1973/deploy/glibc/images/neo1973/openmoko-freerunner-image-fic-gta02.jffs2
-else
- echo "Get Images from Buildhost...."
- UBOOT=http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/uboot-gta02v5-latest.bin
- KERNEL=http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/uImage-neo1973-latest.bin
- ROOTFS=http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/openmoko-devel-image-fic-gta02.jffs2
-fi
-
-config_ssh()
-{
-
- TARGET=~/.ssh/config
- if (( `grep "Host neo" ${TARGET} | wc -l` > 0 ));then
- return
- fi
- echo "" >> ${TARGET}
- echo "Host neo" >> ${TARGET}
- echo " HostName 192.168.0.202" >> ${TARGET}
- echo " User root" >> ${TARGET}
- echo " StrictHostKeyChecking no" >> ${TARGET}
- echo " UserKnownHostsFile /dev/null" >> ${TARGET}
- return
-}
-setup_env()
-{
- echo "Use it without any warranty but with best wishes!!"
- echo "Want do you want to do?"
- echo " 1. Reflash images cached only."
- echo " 2. Reflash images cached and setup Assassin Testing enviornment."
- echo " 3. Reflash images cached and setup Diversity Testing enviornment."
- echo " 4. Download Images from buildhost, and reflashing them only."
- echo " 5. Download Images from buildhostm and setup Assassin Testing environment."
- echo " 6. Download Images from buildhostm and setup Diversity Testing environment."
- echo -n "choice >"
- read ANS
- echo ""
- if (( ${ANS} == 1 )) ;then
- NEEDDOWNLOAD=0;
- ASSASSINTESTENV=0;
- DIVERSITYTESTENV=0;
- elif (( ${ANS} == 2 ));then
- NEEDDOWNLOAD=0;
- ASSASSINTESTENV=1;
- DIVERSITYTESTENV=0;
- elif (( ${ANS} == 3 ));then
- NEEDDOWNLOAD=0;
- ASSASSINTESTENV=0;
- DIVERSITYTESTENV=1;
- elif (( ${ANS} == 4 ));then
- NEEDDOWNLOAD=1;
- ASSASSINTESTENV=0;
- DIVERSITYTESTENV=0;
- elif (( ${ANS} == 5 ));then
- NEEDDOWNLOAD=1;
- ASSASSINTESTENV=1;
- DIVERSITYTESTENV=0;
- elif (( ${ANS} == 6 ));then
- NEEDDOWNLOAD=1;
- ASSASSINTESTENV=0;
- DIVERSITYTESTENV=1;
- else
- setup_env
- fi
-return
-}
-
-if ! [ -e setupenv ];then
- echo Please run the script at where it is!!
- exit 0
-fi
-setup_env
-
-if ! [ -e ${IMAGE_DIR} ];then
- mkdir ${IMAGE_DIR}
- NEEDDOWNLOAD=1
-fi
-
-if ! [ -f "dfu-util" ] ;then
- wget http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/dfu-util
- chmod 755 dfu-util
-fi
-
-if (( ${NEEDDOWNLOAD} > 0 ));then
- pushd ${IMAGE_DIR}
- rm -rf *
- if [ ${UBOOT} ];then
- wget ${UBOOT}
- fi
- wget ${KERNEL}
- wget ${ROOTFS}
- popd
-fi
-
-if ! [ -e /dev/ttyACM0 ];then
- echo Try to get root!!
- sudo ls > /dev/null
- echo Please restart Neo with USB cable NOW
-fi
-LALA=0;
-while (( `./dfu-util -l | awk '/^Found Runtime:/ {ans=substr($3,2,length($3)-2);print ans}' | grep "0x5119" | wc -l` == 0 ));do
- echo Waiting~~~;
- let LALA=$LALA+1
- if (( $LALA == 5 ));then
- echo Please restart Neo with USB cable NOW...
- echo "If you kept failed on this step, please set your bootdelay >= 3 sec in uboot"
- fi
- if (( $LALA > 10 ));then
- echo I am waiting for you... Come on~~
- LALA=0;
- fi
- sleep 1;
-done
-
-ID=`./dfu-util -l | awk '/^Found Runtime:/ {ans=substr($3,2,length($3)-2);print ans}' | grep "0x5119"`
-
-echo Scan device OK!!
-
-pushd ${IMAGE_DIR}
- sleep 1
- sudo ../dfu-util -d ${ID} -a kernel -R -D ./`basename ${KERNEL}`
- sleep 3
- sudo ../dfu-util -d ${ID} -a rootfs -R -D ./`basename ${ROOTFS}`
- if [ ${UBOOT} ];then
- sleep 5
- sudo ../dfu-util -d ${ID} -a u-boot -R -D ./`basename ${UBOOT}`
- fi
- sleep 15
-popd
-
-echo Now remove battery and then remove USB calbel from the Device
-while [ -e /dev/ttyACM0 ];do
- sleep 1
-done
-echo Ok plug battery and USB cable back NOW...
-while ! [ -e /dev/ttyACM0 ];do
- sleep 1
-done
-echo Neo detected~
-echo Ok please wait for system booting....
-sleep 60
-sudo ./setneo
-sleep 100
-
-if (( ${ASSASSINTESTENV}== 1));then
- if ! [ -e ~/.ssh/config ]; then
- config_ssh
- elif (( `cat ~/.ssh/config | grep "neo" | wc -l`== 0 ));then
- config_ssh
- fi
- scp gta02.conf resolv.conf setup_at_neo_assassin.script root at 192.168.0.202:~/
- ssh root at 192.168.0.202 "chmod 755 ./setup_at_neo_assassin.script;./setup_at_neo_assassin.script"
-fi
-if (( ${DIVERSITYTESTENV}== 1));then
- if ! [ -e ~/.ssh/config ]; then
- config_ssh
- elif (( `cat ~/.ssh/config | grep "neo" | wc -l`== 0 ));then
- config_ssh
- fi
- scp gta02.conf resolv.conf setup_at_neo_diversity.script root at 192.168.0.202:~/
- ssh root at 192.168.0.202 "chmod 755 ./setup_at_neo_diversity.script;./setup_at_neo_diversity.script"
-fi
-echo "Ok!! Now the Neo is all yours. Enjoy Hacking || Testing..."
More information about the commitlog
mailing list