Why won’t the module driver be deleted?
Issue Overview
Users are experiencing issues with the Nvidia Jetson Orin Nano Dev board related to the inability to delete specific built-in kernel module drivers, namely cdc_ncm
and ax88179_178a
.
Symptoms include:
- Attempting to remove the drivers using the command
sudo rmmod ax88179_178a
results in an error message:rmmod: ERROR: Module ax88179_178a is builtin.
- Similarly, trying to remove
cdc_ncm
yields the same error. - The drivers do not appear in the output of
lsmod
, indicating they are not recognized as removable modules.
This issue occurs after users have customized the kernel and installed the operating system, specifically when they try to replace these drivers due to the discontinuation of the ax88179 chip. The problem seems consistent among users who have attempted similar configurations, impacting their ability to utilize alternative drivers effectively.
Possible Causes
Several potential causes for this issue have been identified:
-
Kernel Configuration Errors: The kernel may not be properly configured to modularize the specified drivers, leading them to remain built-in.
-
Incomplete Kernel Update: If the new kernel image is not correctly placed in the appropriate directory or flashed to the board, the system may continue using an outdated kernel.
-
Driver Compilation Issues: Errors during the compilation process could prevent proper installation of modularized drivers.
-
User Misconfiguration: Incorrect commands or paths during installation may lead to failures in updating or replacing drivers.
-
Environmental Factors: Issues such as power supply inconsistencies could affect kernel behavior during boot.
Troubleshooting Steps, Solutions & Fixes
To address this issue, follow these comprehensive troubleshooting steps:
-
Verify Kernel Configuration:
- Check that both
cdc_ncm
andax88179_178a
are configured as modules in your kernel configuration. - Use the command:
zcat /proc/config.gz
Ensure that you see:
CONFIG_USB_NET_AX88179_178A=m CONFIG_USB_NET_CDC_NCM=m
- Check that both
-
Rebuild and Install Kernel:
- Ensure you rebuild your kernel with a unique local version suffix. Instead of using
-tegra
, consider something like-ncm_mod
. - Run:
make ARCH=arm64 LOCALVERSION=-ncm_mod tegra_defconfig make ARCH=arm64 LOCALVERSION=-ncm_mod menuconfig
- Compile and install the modules:
sudo make ARCH=arm64 modules_install INSTALL_MOD_PATH=/{BSP Directory}/Linux_for_Tegra/rootfs
- Ensure you rebuild your kernel with a unique local version suffix. Instead of using
-
Update Kernel Image:
- Place the newly built kernel image in the correct directory:
cp path/to/new/Image Linux_for_Tegra/kernel/Image
- Ensure that you also replace any necessary device tree blobs (
*.dtb
files).
- Place the newly built kernel image in the correct directory:
-
Flash the Board:
- After updating both the kernel image and modules, flash your board again to ensure it uses the updated files.
-
Check Boot Logs:
- Use
sudo dmesg
to check for boot logs and confirm that your new kernel is being used. Look for messages indicating build time and any potential errors.
- Use
-
Confirm Module Removal:
- After rebooting, attempt to remove the modules again using:
sudo rmmod ax88179_178a sudo rmmod cdc_ncm
- After rebooting, attempt to remove the modules again using:
-
Review Serial Console Logs:
- If issues persist, provide a full serial console boot log and check
/boot/extlinux/extlinux.conf
for any misconfigurations.
- If issues persist, provide a full serial console boot log and check
-
Best Practices:
- Always maintain backups of your kernel configurations before making changes.
- Document each step taken during kernel modifications for easier troubleshooting in future attempts.
By following these steps, users should be able to resolve issues related to driver removal on their Nvidia Jetson Orin Nano Dev board. If problems continue, further investigation into specific configurations or environmental factors may be necessary.