mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-19 09:52:31 +01:00
update:add luckfox-pico Ultra support
This commit is contained in:
committed by
luckfox-eng33
parent
1e160dee55
commit
d3153ac97e
25
sysdrv/tools/board/emmc/emmc_filesystem_resize.sh
Normal file
25
sysdrv/tools/board/emmc/emmc_filesystem_resize.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if the filesystem has been resized previously
|
||||
if [ ! -f /etc/.filesystem_resized ]; then
|
||||
# Perform filesystem resize
|
||||
sudo resize2fs /dev/mmcblk0p5
|
||||
sudo resize2fs /dev/mmcblk0p6
|
||||
sudo resize2fs /dev/mmcblk0p7
|
||||
|
||||
# Create a marker file indicating filesystem resize has been done
|
||||
sudo touch /etc/.filesystem_resized
|
||||
|
||||
echo "Filesystem resized successfully."
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/.filesystem_swap ]; then
|
||||
sudo fallocate -l 1G /swapfile
|
||||
sudo chmod 600 /swapfile
|
||||
sudo mkswap /swapfile >/dev/null
|
||||
sudo swapon /swapfile >/dev/null
|
||||
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab >/dev/null
|
||||
|
||||
sudo touch /etc/.filesystem_swap
|
||||
echo "Swap successfully."
|
||||
fi
|
||||
4
sysdrv/tools/board/emmc/emmc_fstab
Normal file
4
sysdrv/tools/board/emmc/emmc_fstab
Normal file
@@ -0,0 +1,4 @@
|
||||
# UNCONFIGURED FSTAB FOR BASE SYSTEM
|
||||
/dev/mmcblk0p7 / ext4 rw 0 0
|
||||
/dev/mmcblk0p5 /oem ext4 defaults 0 0
|
||||
/dev/mmcblk0p6 /userdata ext4 defaults 0 0
|
||||
29
sysdrv/tools/board/emmc/emmc_rc.local
Normal file
29
sysdrv/tools/board/emmc/emmc_rc.local
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/bin/filesystem_resize.sh
|
||||
/etc/init.d/S50usbdevice start
|
||||
|
||||
# WIFI/BT
|
||||
if [ -f /oem/usr/ko/install_wifi.sh ]; then
|
||||
#wifi
|
||||
cd /oem/usr/ko
|
||||
sh insmod_wifi.sh
|
||||
cd -
|
||||
|
||||
#BT
|
||||
if command -v hciattach &>/dev/null; then
|
||||
if lsmod | grep -q "aic8800_fdrv"; then
|
||||
hciattach -s 115200 /dev/ttyS1 any 115200 flow nosleep &
|
||||
sleep 2
|
||||
if hciconfig -a | grep -q "hci0"; then
|
||||
hciconfig hci0 up &
|
||||
else
|
||||
echo "hci0 not found or not available."
|
||||
fi
|
||||
else
|
||||
echo "aic8800_fdrv not found."
|
||||
fi
|
||||
else
|
||||
echo "You need install hci tools"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user