From: Ben Morrow Date: Mon, 5 Aug 2013 05:24:31 +0000 (-0700) Subject: Adding fabric for configuring boards via local commands X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=commitdiff_plain;h=6228c784cd51d484bb1938c9aa48c069bb9ce68c Adding fabric for configuring boards via local commands --- diff --git a/fabric/fabfile.py b/fabric/fabfile.py new file mode 100644 index 0000000..a6b1933 --- /dev/null +++ b/fabric/fabfile.py @@ -0,0 +1,26 @@ +from fabric.api import run,env,task,sudo,cd + +env.user = 'sugarcubes' +env.password = 'sugarcubes' +env.hosts = ['192.168.1.28'] + +@task +def startBoard(): + with cd('Desktop/SC_PB'): + sudo('./xc_PB 640 160 160 1000') + +@task +def loadModule(): + with cd('enable_arm_pmu-master'): + sudo('./load-module') + +@task +def stopBoard(): + sudo("ps -axcopid,command | grep \"xc_PB\" | awk '{ system(\"kill -9 \"$1) }'") + +@task +def restartBoard(): + stopBoard() + startBoard() + +#loadModule startBoard \ No newline at end of file diff --git a/fabric/fabfile.pyc b/fabric/fabfile.pyc new file mode 100644 index 0000000..effc2cf Binary files /dev/null and b/fabric/fabfile.pyc differ diff --git a/fabric/startboth.pyc b/fabric/startboth.pyc new file mode 100644 index 0000000..1db9f97 Binary files /dev/null and b/fabric/startboth.pyc differ