mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-12-14 19:03:32 +08:00
35 lines
1.1 KiB
Bash
35 lines
1.1 KiB
Bash
#!/bin/sh
|
||
##安装完执行
|
||
echo "install airbornesystem ok"
|
||
sed -i '/\/root\/start/d' /etc/rc.local
|
||
sed -i '/^exit 0/i/root/start.sh &' /etc/rc.local
|
||
#sudo apt-get install -y timedatectl
|
||
timedatectl set-timezone Asia/Shanghai
|
||
date -R
|
||
sudo hwclock -w -f /dev/rtc1
|
||
#echo "/home/pi/AirbroneSystem/lib" > /etc/ld.so.conf.d/mylib.conf
|
||
#echo "/home/pi/AirbroneSystem/libreh" > /etc/ld.so.conf.d/mylib1.conf
|
||
## 获取系统内存信息,并提取总内存大小
|
||
#total_memory=$(free -m | awk 'NR==2{print $2}')
|
||
#
|
||
## 设置阈值,3GB对应的是3072MB
|
||
#threshold=3072
|
||
#
|
||
## 判断总内存是否大于3GB
|
||
#if [ "$total_memory" -gt "$threshold" ]; then
|
||
# echo "Memory is greater than 3GB"
|
||
# rm /etc/udev/rules.d/12*
|
||
# echo 'ACTION=="add",KERNELS=="6-1:1.0",SUBSYSTEMS=="usb",MODE:="0777",SYMLINK+="ttySBGport"' > /etc/udev/rules.d/12-mybasem.rules
|
||
#else
|
||
# echo "Memory is not greater than 3GB Mybe M4B"
|
||
# rm /etc/udev/rules.d/12*
|
||
# echo 'ACTION=="add",KERNELS=="3-1:1.0",SUBSYSTEMS=="usb",MODE:="0777",SYMLINK+="ttySBGport"' > /etc/udev/rules.d/12-mybasem4b.rules
|
||
#
|
||
#fi
|
||
#
|
||
#
|
||
#
|
||
#
|
||
# ldconfig
|
||
#
|