首页 > 开源硬件 > 如何知道 CubieTruck CPU 温度
2015
11-23

如何知道 CubieTruck CPU 温度

1.modprobe sunxi-dbgreg

2.

#! /bin/sh

echo ‘f1c25000:27003f’ > /sys/devices/virtual/misc/sunxi-dbgreg/rw/write;
echo ‘f1c25010:40000’ > /sys/devices/virtual/misc/sunxi-dbgreg/rw/write;
echo ‘f1c25018:10fff’ > /sys/devices/virtual/misc/sunxi-dbgreg/rw/write;
echo ‘f1c25004:10’ > /sys/devices/virtual/misc/sunxi-dbgreg/rw/write;
echo ‘f1c25020’ > /sys/devices/virtual/misc/sunxi-dbgreg/rw/read;

output=$(tail -n 1 /var/log/syslog | awk ‘{print $7}’)
degree=$(((output-1447)/10))
point=$(((output-1447)%10))
printf “Your CubieTruck’s CPU current temperature is ‘\033[31m%d.%d\033[0m’ degree Celsius.\n" $degree $point

如何知道 CubieTruck CPU 温度 - 第1张  | 技术人生

最后编辑:
作者:sunny5156
喜欢技术....

留下一个回复