-
Notifications
You must be signed in to change notification settings - Fork 14
/
vcgencmd
executable file
·54 lines (53 loc) · 2.02 KB
/
vcgencmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
# try and keep this pure bourne shell
# minimal clone of raspberry tool vcgencmd - for use with Android rpicheck and rock64 SBC
command=$1
case ${1} in
measure_clock)
case ${2} in
arm)
# awk is probably overkill....
/usr/local/sbin/rock64_health.sh | awk '/CPU freq/{print "frequency(45)=" $4 * 1000000}'
#value=`/usr/local/sbin/rock64_health.sh | awk '/CPU freq/{print $4 * 1000000}'`
#echo 'frequency(45)='${value}
exit
;;
core)
value=0 # TODO / FIXME
echo 'frequency(1)='${value}
exit
;;
# TODO anything else thrown an error/debug
esac
exit
;;
measure_temp)
# awk is probably overkill....
#/usr/local/sbin/rock64_health.sh | awk '/SoC Temp/{print $4 "\\\'C"}'
#value=`/usr/local/sbin/rock64_health.sh | awk '/SoC Temp/{print $4}'`
#value=`46'
#echo 'temp='${value}"'C"
echo "temp=46.7'C"
exit
;;
get_throttled)
echo 'throttled=0x50000'
exit
;;
measure_volts)
case ${2} in
core)
value=0 # TODO / FIXME
echo 'volt='${value}'.0000V'
exit
;;
# TODO anything else thrown an error/debug
esac
;;
version)
echo 'Nov 4 2018 16:31:07'
echo 'Copyright (c) 2012 rock64'
echo 'version rock64_TODO (clean) (release)'
exit
;;
esac