If we were in the Windows world, then every manufacturer would build their own modules, and Microsoft would distribute it (at least for automatic install; manufacturers usually supply the drivers separately too). This isn’t really an “NVIDIA thing”, it is all of Linux. Other people (from multiple organizations) build and maintain individual drivers for desktop PC architecture. Anything which is common probably should be included on a desktop, but embedded systems have limited space…all drivers could be installed, but there would be no space left! Building software is a common practice in the Linux world, which is why some people don’t like it, but also is why it works so incredibly well once learned.
You should use full independent kernel source, not just headers for most cases on a Jetson. Then you configure the whole source as a basic match to the running system with the “tegra_defconfig
” build target. After that, you set CONFIG_LOCALVERSION
to “-tegra
”. This is the starting match to the running system, a prerequisite to making a module load into a given kernel. This is built into the kernel source, and the file kernel_src.tbz2
is what contains the source, but this is a file within another .tbz2
file. I don’t know what your L4T release is, and it would help to know this (use “head -n 1 /etc/nv_tegra_release
” to find this). The sources file would be from here using the correct L4T release:
https://developer.nvidia.com/linux-tegra
You must extract kernel_src.tbz2
from that, and then extract that kernel_src.tbz2
file into full source. You get everything there, no outside reference to /usr/src/linux-headers...
is consulted, nor is any other reference needed. RNDIS should be a symbol within that source, and so there is no RNDIS to download or install…it is there, you just have to configure it. If you’ve replaced all modules, and if that was not the correct module config, then all modules will then fail. The goal is to only add just the file (with .ko
extension) that is the RNDIS driver, and nothing else.
The way you verify existence or failure is from the “/proc/config.gz
” file and/or the output of “lsmod
”. The config.gz
only shows what the kernel config was when compiled, so it might miss updates to module files. The lsmod
command shows which modules are loaded, and those only load if the hardware is present and the driver can function. Drivers not loaded (but in module format) won’t show up in lsmod
.
Regarding networking in general, Linux has its own issues that are unrelated to Jetsons or NVIDIA. Some networks are unmanaged, and other network devices are managed. Wi-Fi in particular, by default, is managed. That means the presence or absence of other networks can cause Wi-Fi to go up or down. Wi-Fi usually runs only when the end user logs in to the GUI…this is active change to the status of Wi-Fi dependent upon circumstances. Wi-Fi also tends to override wired networking, which is another annoying management detail. NVDIA does not design this, nor have anything to do with how Ubuntu works with that. Those issues can in fact be circumvented at times by removing management and making the services static and thus unmanaged. I usually hate dealing with stopping managed services from doing things I don’t like.
If USB actually stops working though, then that is an issue. If you are losing a USB network device, then this is not necessarily USB failing. USB is just a data pipe with some intelligence. I don’t know enough about RNDIS though to be of use in finding out about why its configuration is doing something you don’t want. All I can help with is getting the RNDIS kernel driver in place so that success is possible.
Incidentally, going back to drivers, one only adds a kernel feature with a dependency-aware tool. The menuconfig
and nconfig
build targets are examples…those editors understand dependencies, and if RNDIS has other subdependencies, then it will enable though. If there are no other dependencies, then copying the one file and running sudo depmod -a
would be all that is needed. If there are other dependencies, and if more modules were built, then you must copy all of those .ko
files to their correct location before running sudo depmod -a
.
Observe the exact uname -r
of your running system. You are mentioning multiple suffixes of “-tegra
” (normal) and “-prod-tegra
”. The base kernel, the integrated file, is entirely different if you are getting two answers. You have two kernels. The modules built against one won’t load into the other. Your -tegra
modules need to go in the correct -tegra
module directory, while the -prod-tegra
has to go in the different kernel’s module directory. They most likely will fail if you mix them. If your running system says -tegra
, then those are the modules you should load that were compiled with CONFIG_LOCALVERSION
of “-tegra
”. If the running system says “-prod-tegra
”, then you use the modules compiled with CONFIG_LOCALVERSION
of “-prod-tegra
”. Just beware that having the CONFIG_LOCALVERSION
match is not enough by itself…you still have to have the basic initial configuration used to compile modules match that of the kernel Image
(the Image
is what answers the “uname -r
” command…it’s telling you where it is searching for modules).
If you are missing the tegra_defconfig
target, then I think you are using the wrong source, or the wrong directory within the source.
If you have replaced the base kernel, and not just modules, then you might be getting a mix of content that is breaking your efforts. This is ok if you are picking different kernels during boot. I prefer to leave the old kernel in place if I am building an entire kernel, and adding an alternate boot entry for safety. There is no need to worry about that complication if you are only adding a module.