-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcgencmd
48 lines (43 loc) · 1.11 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
#!/bin/bash
# 安装vcgencmd
# 编译64位系统
function install_aarch64(){
git clone https://github.com/raspberrypi/userland.git
cd userland
sudo apt-get install cmake build-essential
./buildme --aarch64
echo "/opt/vc/lib" >> /etc/ld.so.conf
echo "export PATH=\"/opc/vc/bin/:\$PATH\"" >> /etc/profile
ldconfig
}
# 已经编译好的64位
function install_aarch64d(){
cd /opt
svn checkout https://github.com/Crazydear/Raspberry-4B/trunk/SoftWare/vc
echo "/opt/vc/lib" >> /etc/ld.so.conf
echo "export PATH=\"/opc/vc/bin/:\$PATH\"" >> /etc/profile
ldconfig
}
# 已经编译好的32位
function install_32(){
cd /opt
svn checkout https://github.com/raspberrypi/firmware/trunk/opt/vc
echo "/opt/vc/lib" >> /etc/ld.so.conf
echo "export PATH=\"/opc/vc/bin/:\$PATH\"" >> /etc/profile
ldconfig
}
# 根据自己的需要选择相应的64位安装方式
version=$(arch)
if [[ $version == "aarch64" ]]; then
echo `arch`
install_aarch64
#install_aarch64d
exit
fi
# 32位系统
if [ ! -d "/opt/vc" ]; then
install_32
echo "install vcgencmd comleted!"
else
echo "vcgencmd 已经安装"
fi