This isn’t complete information, but it sounds like if you run this command:
zcat /proc/config.gz | grep 'CONFIG_BLK_DEV_SR'
…then it’ll show not configured.
Before I go further I’m going to describe module search. The kernel has a base version, and during build, someone would have set up a string for “CONFIG_LOCALVERSION
” (this is what so many people fail to think of until module load fails). If your kernel is release 5.10.104
, and if your CONFIG_LOCALVERSION
was “-tegra
” during that kernel build, then the command “uname -r
” will output “5.10.104-tegra
”. This means the kernel Image
will search for modules at:
/lib/modules/$(uname -r)/kernel/
…which is:
/lib/modules/5.10.104-tegra/kernel/
Within that location the module file is in the same subdirectory as the subdirectory of the kernel source that built that module. If you fail to use the same kernel source version, or if you fail to set CONFIG_LOCALVERSION
, then modules will fail to be found. The “/proc/config.gz
” reflects the current configuration except for CONFIG_LOCALVERSION
. The default for all Jetsons is:
CONFIG_LOCALVERSION="-tegra"
Please note that this is the first requirement to being able to simply build a module and copy it in place instead of replacing the entire kernel and 100% of the modules. The other requirement is that the integrated features of the kernel (those in the actual Image
file) should be the same during the build of a module as that of the Image
which will load those modules. If you were to build sr_mod.ko
, but the source was not correctly configured to match the existing kernel, then the module would not load. If you were to build sr_mod.ko
without a valid CONFIG_LOCALVERSION
, then you can expect load to fail. If all of this is correct, then you can expect this to be as simple as a copy of the module as a file, and perhaps telling the kernel to note its presence.
When you build a kernel for a Jetson there is a configuration target “tegra_defconfig
”. This, in combination with setting CONFIG_LOCALVERSION
to “-tegra
”, matches the default Jetson kernel.
The Jetson’s L4T release version is found via “head -n 1 /etc/nv_tegra_release
”. You can find the kernel source that ships with that L4T release here:
https://developer.nvidia.com/linux-tegra
(the kernel source is a tar archive within another tar archive)
Documentation for cross compile also exists there. The installation information if far more complicated than what you actually need. Those instructions are for updating the flash software and installing this via flash. Just copy the .ko
to the correct location in the subdirectory that mirrors the kernel source subdirectory the .ko
is actually placed in. Then run “sudo depmod -a
” (and maybe reboot). This adds your module without flash.
Do note that if you boot to external media, then there might be other requirements (especially if the content is required for boot and not just after the o/s is up and running).