给安装了 Centos 7 的树莓派安装 vcgencmd

本文将介绍给安装了 Centos 的树莓派安装 vcgencmd (我主要用它查cpu温度)

开始之前:

1、你已经可以使用ssh链接树莓派并正常登录或者你有显示器
2、相关依赖:
cmake

yum install cmake

检查cmake版本(不一定一样,能跑就行)

cmake --version

输出结果:

[root@Jerry-server bin]# cmake --version
cmake version 3.23.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

如果缺少其他依赖,请自行百度进行安装

同步仓库

以下任选一个能用的即可

git clone https://github.com/raspberrypi/userland.git && cd userland
git clone https://gitee.com/openFyde/raspberrypi-userland.git && cd raspberrypi-userland

编译:

中间报错不要管,只要能编译完就行

# 32位系统:
./buildme
# 64位系统
./buildme --aarch64

我编译完后最后几行信息(仅供参考)

-- Installing: /opt/vc/include/interface/debug_sym/debug_sym.h
-- Installing: /opt/vc/bin/dtoverlay
-- Set runtime path of "/opt/vc/bin/dtoverlay" to ""
-- Installing: /opt/vc/man/man1/dtoverlay.1
-- Up-to-date: /opt/vc/bin/dtparam
-- Installing: /opt/vc/man/man1/dtparam.1
-- Installing: /opt/vc/bin/dtoverlay-pre
-- Installing: /opt/vc/bin/dtoverlay-post
-- Installing: /opt/vc/bin/dtmerge
-- Set runtime path of "/opt/vc/bin/dtmerge" to ""
-- Installing: /opt/vc/man/man1/dtmerge.1
-- Installing: /opt/vc/lib/libdtovl.so
~/raspberrypi-userland

等待编译完成
编译好的可执行文件就在 ./build/bin/目录下了
如果你只需要使用vcgencmd执行

cp build/bin/vcgencmd /usr/bin/

如果还想使用编译出来的其他功能dtmerge dtoverlay tvservice vcgencmd vchiq_test vcmailbox
执行

cp build/bin/* /usr/bin/

安装成功?

# 检查cpu温度
vcgencmd measure_temp
# 检查vcgencmd版本
vcgencmd version

原创文章, 未经许可请勿转载

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小白鼠1024

小哥哥小姐姐我想买nas求支持

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值