Skip to content

Commit 2446b4e

Browse files
committed
Add scripts for kernel module aggregation and deployment
- Added deploy_kernel_6.2.sh to package kernel modules and update boot files on target devices. - Created install_to_kernel_6.2.sh for installing kernel modules on the target device. - Added .gitignore to exclude specific directories from version control.
1 parent 4a2f20e commit 2446b4e

4 files changed

Lines changed: 39 additions & 21 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/images
22
/l4t-gcc
3-
/kernel_mod
3+
/kernel_mod
4+
/sources_*

scripts/deploy_kernel_6.2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [ "$#" -eq 0 ]; then
4949
echo "No TARGET specified, skipping copy and reboot."
5050
else
5151
echo "Copying files and setting permissions on remote host..."
52-
cp ${LOCAL_DIR}/install_to_kernel_6.2.sh ${LOCAL_DIR}/kernel_mod/6.2/
52+
cp ${LOCAL_DIR}/scripts/install_to_kernel_6.2.sh ${LOCAL_DIR}/kernel_mod/6.2/
5353
# Use SSH ControlMaster to reuse a single SSH connection
5454
CONTROL_PATH="/tmp/ssh-control-${USERNAME}-${TARGET}"
5555
ssh -o ControlMaster=yes -o ControlPath="${CONTROL_PATH}" -o ControlPersist=10s -fN ${USERNAME}@${TARGET}

scripts/install_to_kernel_6.2.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# Display help message
4+
if [ "$#" -eq 0 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
5+
echo "Usage: $0 [BOOT_FOLDER]"
6+
echo ""
7+
echo "Update the kernel modules and boot files on the local device."
8+
echo ""
9+
echo "Arguments:"
10+
echo " BOOT_FOLDER Folder name under /boot to copy Image (default: dev)"
11+
echo ""
12+
echo "Example:"
13+
echo " $0 foo"
14+
exit 0
15+
fi
16+
17+
# Set default folder name
18+
FOLDER="${1:-dev}"
19+
20+
if [ ! -d /boot/${FOLDER} ]; then
21+
sudo mkdir /boot/${FOLDER}
22+
fi
23+
24+
tar xf rootfs.tar.gz
25+
echo "sudo cp -r lib/modules/5.15.148-tegra /lib/modules/."
26+
sudo cp -r lib/modules/5.15.148-tegra /lib/modules/.
27+
echo "sudo cp boot/tegra234-camera-d4xx-overlay*.dtbo /boot/."
28+
sudo cp boot/tegra234-camera-d4xx-overlay*.dtbo /boot/.
29+
echo "sudo cp boot/dtb/tegra234-p3737-0000+p3701-0005-nv.dtb /boot/dtb/."
30+
sudo cp boot/dtb/tegra234-p3737-0000+p3701-0005-nv.dtb /boot/dtb/.
31+
echo "sudo cp boot/Image /boot/${FOLDER}/."
32+
sudo cp boot/Image /boot/${FOLDER}/.
33+
echo "sudo depmod"
34+
sudo depmod
35+
echo "done - rebooting"
36+
sudo reboot

scripts/install_to_kernel_dev.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)