This commit is contained in:
huoji
2023-05-07 16:29:16 +08:00
commit 9c4c45ef38
49 changed files with 4928 additions and 0 deletions

27
linux_kernel/build.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# 该脚本可执行make编译safe_duck模块然后将其移动到指定位置
# 设定变量
MODULE_NAME=safe_duck.ko
TARGET_DIR="/run/user/1000/gvfs/smb-share:server=192.168.1.2,share=dev_share/safe_duck.ko"
# 编译模块
if make; then
# 移动模块文件至目标目录
if mv ${MODULE_NAME} ${TARGET_DIR}; then
echo "${MODULE_NAME} moved to ${TARGET_DIR}"
else
echo "Failed to move ${MODULE_NAME} to ${TARGET_DIR}"
fi
else
echo "Failed to build ${MODULE_NAME}"
fi
make clean