Last active
October 18, 2023 06:48
-
-
Save tanpinsiang/4f7127d2268fd02f2969b399c2afcc2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the directory where your driver's source code is located | |
DRIVER_DIR="/home/admin/LINUX/driver" | |
# Navigate to the driver directory | |
cd $DRIVER_DIR | |
# Compile the driver | |
apt update | |
apt install -y linux-headers-$(uname -r) | |
make | |
# Load the driver dynamically | |
sudo make load | |
# Display message | |
echo "Checking the module ch9344.ko..." | |
# Wait for 5 seconds | |
sleep 5s | |
# Unload the driver | |
sudo make unload | |
# Install the driver permanently | |
sudo make install | |
# Display the message | |
echo "RS485 driver installed successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment