如何知道 CubieTruck CPU 温度

开源硬件 sunny5156 4年前 (2015-11-23) 847次浏览 0个评论

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

image


转载请注明原文链接:如何知道 CubieTruck CPU 温度
喜欢 (0)

您必须 登录 才能发表评论!