This commit is contained in:
xin
2025-11-04 17:19:32 +08:00
parent 030381aa5c
commit 7c9b5728b9
37 changed files with 677 additions and 191 deletions

34
dpkg/postinst Normal file
View File

@ -0,0 +1,34 @@
#!/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/rtc0
#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
#