1 #!/bin/sh
2 # Module: utilities_main
3 #
4 # Description: This script is used to run the utilities application demo
5 #
6 # Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
7 #
8 # Redistribution and use in source and binary forms, with or withou
9 # modification, are permitted provided that the following conditions
10 # are met:
11 #
12 # Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 #
15 # Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in the
17 # documentation and/or other materials provided with the
18 # distribution.
19 #
20 # Neither the name of Texas Instruments Incorporated nor the names of
21 # its contributors may be used to endorse or promote products derived
22 # from this software without specific prior written permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 #
37 # Check platform type based on device tree compatible entry
38 compatible=$(cat /proc/device-tree/compatible)
39 case "$compatible" in
40 *k2hk-evm*)
41 platform=k2hk-evm
42 num_dsps=8
43 dsp_image=messageq_single.xe66
44 ;;
45 *k2l-evm*)
46 platform=k2l-evm
47 num_dsps=4
48 dsp_image=messageq_single.k2l.xe66
49 ;;
50 *k2e-evm*)
51 platform=k2e-evm
52 num_dsps=1
53 dsp_image=messageq_single.k2e.xe66
54 ;;
55 *)
56 platform=unknown
57 num_dsps=0
58 ;;
59 esac
60 echo platform : $platform num_dsps: $num_dsps
62 max_dsp_num=$((num_dsps-1))
63 echo Loading DSP Images
64 for i in `seq 0 $max_dsp_num`
65 do
66 echo "Resetting core $i..."
67 mpmcl reset dsp$i
68 mpmcl status dsp$i
69 done
70 echo "Done"
71 echo "Loading and Running " $1 "..."
72 for i in `seq 0 $max_dsp_num`
73 do
74 echo "/lib/firmware/$dsp_image"
75 mpmcl load dsp$i "/lib/firmware/$dsp_image"
76 mpmcl run dsp$i
77 done
79 echo Running MessageQBench:
80 /usr/bin/MessageQBench