Skip to content

Commit b5379fc

Browse files
committed
Add instructions for building the additional kernel modules
1 parent bc5c036 commit b5379fc

File tree

1 file changed

+82
-1
lines changed
  • docs_versioned_docs/version-ros2humble/ros/installation

1 file changed

+82
-1
lines changed

docs_versioned_docs/version-ros2humble/ros/installation/nvidia.mdx

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,88 @@ If you see warnings about the following dependencies being uninstallable, you ma
156156
| `sevcon_traction` | Needed by Warthog W200, which cannot use an Nvidia Jetson as its primary computer |
157157
| `ros-humble-gazebo-ros2-control` | Needed for simulation support by `ros2_kortex` (Kinova manipulator driver). Not currently available for ARM CPUs |
158158

159-
## Installing Firmware Updates
159+
## Building additional kernel modules
160+
161+
At the time of writing, JetPack 6.1 installs the kernel `5.15.148-tegra`. This kernel by default does not include the
162+
`uinput` and `slcan` modules. Clearpath has [pre-built copies](https://github.com/clearpathrobotics/clearpath_computer_installer/tree/feature/humble-jetson)
163+
of these modules for kernel `5.15.148-tegra`.
164+
165+
If you have a different kernel, or want to build these modules yourself, follow
166+
[Nvidia's developer guide](https://docs.nvidia.com/jetson/archives/r36.4.4/DeveloperGuide/SD/Kernel/KernelCustomization.html).
167+
The essential steps are summarized below, but refer to Nvidia's kernel customization guide for more details.
168+
169+
:::note
170+
171+
The following instructions assume you are building the kernel and modules directly on the Jetson. To cross-compile,
172+
refer to Nvidia's developer guide.
173+
174+
:::
175+
176+
### Install prerequisites
177+
178+
Run the following command:
179+
180+
```bash
181+
sudo apt-get install build-essential bc flex bison libssl-dev zstd
182+
```
183+
184+
### Download and extract the kernel sources
185+
186+
:::note
187+
188+
At the time of writing, the latest kernel sources are available at https://developer.nvidia.com/embedded/jetson-linux-r3644
189+
190+
:::
191+
192+
Run the following commands:
193+
194+
```bash
195+
cd $HOME
196+
wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.4/sources/public_sources.tbz2
197+
tar xf public_sources.tbz2
198+
cd Linux_for_Tegra/source
199+
tar xf kernel_src.tbz2
200+
```
201+
202+
### Customize the kernel modules
203+
204+
To enable the `slcan` and `uinput` modules you must edit the kernel configuration file.
205+
206+
```bash
207+
echo "CONFIG_CAN_SLCAN=m" >> $HOME/Linux_for_Tegra/source/kernel/kernel-jammy-src/arch/arm64/configs/defconfig
208+
echo "CONFIG_INPUT_UINPUT=m" >> $HOME/Linux_for_Tegra/source/kernel/kernel-jammy-src/arch/arm64/configs/defconfig
209+
```
210+
211+
### Build the kernel and modules
212+
213+
:::note
214+
215+
This step can take some time. Be patient.
216+
217+
:::
218+
219+
Run the following commands to build the kernel and modules:
220+
221+
```bash
222+
cd $HOME/Linux_for_Tegra/source
223+
mkdir kernel_out
224+
./nvbuild.sh
225+
```
226+
227+
### Install the modules
228+
229+
After the build finishes, run the following commands to install the new modules:
230+
231+
```bash
232+
cd $HOME/Linux_for_Tegra/source/kernel_out/kernel/kernel-jammy-src
233+
sudo cp drivers/net/can/socat.ko /lib/modules/$(uname -r)/kernel/drivers/net/can/
234+
sudo cp drivers/input/misc/uinput.ko /lib/modules/$(uname -r)/kernel/drivers/input/misc/
235+
sudo depmod
236+
sudo modprobe slcan
237+
sudo modprobe uinput
238+
```
239+
240+
## Installing firmware updates
160241

161242
If you need to [install firmware updates](robot#firmware-update) for your robot, you must install the
162243
`clearpath_firmware` package on an `amd64` (aka `x64` or `x86_64`) [offboard computer](offboard_pc); the

0 commit comments

Comments
 (0)