Hello, I have been trying to get the SLCAN kernel module working on my jetson orin nano running Jetpack 6.2. First I tried follow the instruction from this post. After building with the same kernel version build attempting to modprobe the slcan module let to an error similar to the one in this Ubuntu forum post. Implying that the module was compiled for a different version. However the kernel unames matched exactly.
Next I attempted to follow these instructions(specifically building the kernel and to prepare a Kernel source tree that is not built.). After successfully compiling the kernel with the SLCAN module included in the config I used the flash script to flash the Jetson Orin Nano. The flash was successful but running lsmod revealed that SLCAN was not loaded but all other expected modules were. Attempting to modprobe the module lead to the same exec format error.
What can I do to include the SLCAN module into my Jetson Image successfully?
Can you provide me the SLCAN kernel module source file name? I have been trying to find it on JP 6.2 but I haven’t found it yet. With this, I can be able to set the module into your device.
Thank you for responding Ricardo. I’m not entirely sure what you are asking for but If i’m understanding correctly it is called slcan.c. It is located in after extracting.
Please share the full steps how did you update kernel config and build kernel image.
From your picture, it seems SD can not be found and it enters in to recovery kernel.
We need to check the full serial console log. You can refer to the following instruction to capture them on the devkit. Jetson Nano & NX Style - Serial Debug Console - JetsonHacks
I got the kernel by dowloading the Jetson_Linux_R36.4.3_aarch64.tbz2 file from the jetson downloads page. I then extracted it and used source sync with the tag from the release notes.
after sourcing
to update the kernel config I went into /Linux_for_Tegra/source/kernel/kernel-jammy-src/arch/arm64/configs and added the two following lines to the defconfig file.
CONFIG_CAN_SLCAN=m
CONFIG_TTY=y
I then followed the build instructions that you sent except I ommited the out of tree modules. to get the /rootfs folder I downloaded the sample filesystem and extracted it to /rootfs in accordance with the readme I found there.
Next I followed this page to flash my image to the jetson sd. Specifically the Basic Flashing Procedures.
After flashing I got the error in the attached log/shown above.
Since you built it as a kernel module, do you get slcan.ko in output directory?
Do you perform the following steps?
Run the following commands to install the kernel and in-tree modules:
$ export INSTALL_MOD_PATH=<install-path>/Linux_for_Tegra/rootfs/
$ sudo -E make install -C kernel
$ cp kernel/kernel-jammy-src/arch/arm64/boot/Image \
<install-path>/Linux_for_Tegra/kernel/Image
Actually no slcan.ko did not appear in the output kernel directory in the root file system. I didn’t see that before. I did run the steps you posted. I just rechecked that the defconfig still contains the lines I added and it does.
I’m not really familiar with building the Linux kernel should I have changed the defconfig differently? I just added the lines for the components with a text editor.
I think it should be included under the folder you build the kernel source.
Please run the following command to search it.
$ cd <Linux_for_Tegra>/source
$ sudo find -name slcan.ko
Alternative, you can try to build it into kernel image through specifying CONFIG_CAN_SLCAN=y in defconfig.
In this way, it should be included in the kernel image(Image).
It seems the file you updated can not be accessed from me.
Please upload the log as simple text file here and share the result of lsmod|grep slcan on your board.