1234567891011121314151617181920212223242526272829303132333435363738394041 |
- # Some useful environment variables
- POWER_REPO="https://andreagus@bitbucket.org/zanella_michele/odroid_smartpower_bridge.git"
- BASE_DIR=`pwd`
- # Check if the build direcroty already exists, otherwise create it
- if [ ! -d "build" ]; then
- mkdir build
- fi
- cd build
- # Clone the repo containg the power measurement tool
- if [ ! -d "odroid_smartpower_bridge" ]; then
- git clone $POWER_REPO
- fi
- cd odroid_smartpower_bridge
- # Checkout on the branch where we disabled all qt dependencies as possible (to cluttering the board with the entire KDE platform)
- git checkout no_qt
- # Compile the support library for ARM (the software comes with the library compiled for x86, so when linking we get some errors)
- cd HIDAPI
- qmake
- make clean
- make
- # Now compile the power measurement utility
- cd ../
- cd smartpower
- qmake
- make clean
- make
- # Copy the obtained executable at the top level and in the folder containing the benchmarks
- cp linux/SmartPower $BASE_DIR/build
- cp linux/SmartPower $BASE_DIR/build/rodinia-benchmark/
- # Add an udev rule that allows to communicate with the power measurement device even if the user is not root
- cd $BASE_DIR
- sudo cp libusb.rules /etc/udev/rules.d/99-hiid.rules
|