diff --git a/.gitmodules b/.gitmodules index 021a3cf..e130835 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "taskgen"] path = taskgen - url = https://github.com/argos-research/taskgen + url = https://github.com/argos-research/taskgen.git + branch = master diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ff24d7 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + +install-minimal: + $(MAKE) -C taskgen install + + + +# EXAMPLE ml +#install-machine-learning: +# install-minimum +# $(MAKE) -C machine-learning-example install diff --git a/README.md b/README.md index b5cdaae..0ab8f83 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,54 @@ # client-tools -Meta-Repository for client tools of the project + +Meta-Repository for client tools of the project. + + +## Installation + +Only Ubuntu 16.04 is supported. + +``` +git clone https://github.com/argos-research/client-tools.git +cd client-tools +git submodule init +git submodule update +make install-minimal +``` + +## Contribution + +1. Create a Repository in your Github Profile +2. `git clone https://github.com/YOUR_REPOSITORY` +3. `cd YOUR_REPOSITORY` + +*(Optionally)* If your project depends on `taskgen`: + +4. `git submodule add -b master https://github.com/argos-research/taskgen.git` + +You are done with your project and want to integrate it in `client-tools`? Make +sure, that: + +* there is a `Makefile` with `install`-command in your root folder. All + dependencies should be installed by calling `make install`. +* a `README.md` with an introduction to your project. + +If you are done with your project, ask your supervisor for a new repository in +`client-tools`. Finally create a pull-request from your repository to the new +repository. + + +## Structure + +- `client-tools` **(REPOSITORY)** Meta repository for all client-side + tools of the ArgOS project. + - `taskgen` **(REPOSITORY)** task-set generator and distributor + - `machine-learning-example` **(REPOSITORY)** bachelor thesis example about machine + learning + - `taskgen` **REPOSITORY** depends on `taskgen` + - `README.md` + - `Makefile` installation instructions + - `main.py` example script + + - `another-project` **REPOSITORY** + - ... + diff --git a/qemu-up.sh b/qemu-up.sh deleted file mode 100755 index fef89f7..0000000 --- a/qemu-up.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# For more information read `taskgen/docs/qemu.md`. - -# CHOOSE A TAP DEVICE NAME -tap="$2" # tap + first parameter -# CHOOSE A BRIDGE -bridge="$1" -image="../build/genode-focnados_pbxa9/var/run/dom0-HW/image.elf" - -# taskgen.sessions.QemuSession write IP addresses for killing into this file -log="/tmp/taskgen_qemusession_ip_kill.log" - -# create tap device -ip tuntap add name $tap mode tap -brctl addif $bridge $tap -ip link set dev $tap up - -function cmd_del_tap { - # delete tap device - ip link set dev $tap down - brctl delif $bridge $tap - ip tuntap del $tap mode tap -} - - -pid=0 - -# this trap will clean up -function cmd_stop { - #kill qemu - kill -9 $pid - cmd_del_tap - exit -} - -trap 'cmd_stop' SIGINT ERR -while true; -do - # generate random MAC address - mac="$(hexdump -vn3 -e '/3 "52:54:00"' -e '/1 ":%02x"' -e '"\n"' /dev/urandom)" - - # start qemu in background - qemu-system-arm -net tap,ifname=$tap,script=no,downscript=no \ - -net nic,macaddr=$mac \ - -net nic,model=lan9118 \ - -nographic \ - -smp 2 \ - -m 1000 \ - -M realview-pbx-a9 \ - -kernel $image & - pid=$! - - # wait until file exists - until [ -f $log ] - do - sleep 1 - done - - # read file and kill own qemu instance if necessary - tail -f -n0 $log | while read kill_ip - do - kill_mac=$(arp -n | grep -w -i $kill_ip | awk '{print $3}') - echo "read $kill_ip $kill_mac" - - # compare the target MAC with our own MAC - if [ "$kill_mac" == "$mac" ]; then - kill -9 $pid - arp -d $mac - break - fi - done -done diff --git a/taskgen b/taskgen index 3ebf174..d51eaf0 160000 --- a/taskgen +++ b/taskgen @@ -1 +1 @@ -Subproject commit 3ebf1742f3e84cae62e6b597662261065da71c7c +Subproject commit d51eaf0555e8632fe228e48416c3b13fe8703e36 diff --git a/taskgen-cli b/taskgen-cli deleted file mode 100755 index 40d172c..0000000 --- a/taskgen-cli +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python3.5 -m taskgen $@