summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommon/scripts/coresight-test-new.sh11
-rwxr-xr-xcommon/scripts/coresight-test1.sh7
2 files changed, 12 insertions, 6 deletions
diff --git a/common/scripts/coresight-test-new.sh b/common/scripts/coresight-test-new.sh
index b2e957a..0f98023 100755
--- a/common/scripts/coresight-test-new.sh
+++ b/common/scripts/coresight-test-new.sh
@@ -1,24 +1,27 @@
#!/bin/bash
# Script to test coresight
-#CORESIGHT_PATH="/sys/kernel/debug/coresight"
CORESIGHT_PATH="/sys/bus/coresight/devices"
echo "ls $CORESIGHT_PATH"
ls $CORESIGHT_PATH
-echo -e "SOURCE\tSINK\tRESULT"
-echo -e "------\t----\t------"
+echo -e "SOURCE\t\tSINK\t\tRESULT"
+echo -e "------\t\t----\t\t------"
for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do
for SINK in `ls $CORESIGHT_PATH | grep etb` ; do
+ echo 1 > $CORESIGHT_PATH/$SINK/enable_sink
+
wrt_ptr1=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'`
echo 1 > $CORESIGHT_PATH/$SOURCE/enable_source
sleep 1
echo 0 > $CORESIGHT_PATH/$SOURCE/enable_source
wrt_ptr2=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'`
- if [ $wrt_ptr1 == $wrt_ptr2 ]
+ echo 0 > $CORESIGHT_PATH/$SINK/enable_sink
+
+ if [ $wrt_ptr1 == $wrt_ptr2 ];
then
RES="FAIL"
else
diff --git a/common/scripts/coresight-test1.sh b/common/scripts/coresight-test1.sh
index f6b24af..0f98023 100755
--- a/common/scripts/coresight-test1.sh
+++ b/common/scripts/coresight-test1.sh
@@ -3,8 +3,11 @@
CORESIGHT_PATH="/sys/bus/coresight/devices"
-echo -e "SOURCE\tSINK\tRESULT"
-echo -e "------\t----\t------"
+echo "ls $CORESIGHT_PATH"
+ls $CORESIGHT_PATH
+
+echo -e "SOURCE\t\tSINK\t\tRESULT"
+echo -e "------\t\t----\t\t------"
for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do
for SINK in `ls $CORESIGHT_PATH | grep etb` ; do