Issue trying to install kernel modules in Jetson Xavier NX Tegra186_Linux_R32.5.1_aarch64

I am using the instructions available in to install kernel module. I am able to successfully build a kernel module with custom configurations related to i2c, I have also downloaded the drivers L4T Driver Package r32.5.1 for Xavier NX and performed steps 5 and 6 mentioned in the link above to install kernel. However, I am getting the following error when trying to run step 7 -

make: *** No rule to make target ‘modules_install’. Stop.

Could you kindly help. Thanks

What was the exact complete command line you used? What was your “$TEGRA_KERNEL_OUT” set to? What was your “$INSTALL_MOD_PATH” set to?

$TEGRA_KERNEL_OUT was set to /usr/src/newkernel where newkernel is the kernel that got built after executing step 4 in instructions. $INSTALL_MOD_PATH was set to
I got this path after downloading the drivers and extracting them to that location. Not sure if this is the right approach.
Any guidance on this will be appreciated.

Those paths should work, but there may be additional details of install required. The path to the “rootfs/” would create or set up any modules into “rootfs/lib/modules/$(uname -r)/kernel/”, but beware that the “uname -r” is the one from the kernel being built, and if you just run something with “$(uname -r)” embedded in a command on the host PC, then it will reply with the host PC’s “uname -r”.

None of these are actually installed before flashing the Jetson. If the kernel Image was built as an exact match to the default kernel configuration, then you are probably ok without installing the new “Image” file. If there are enough changes in the features of the “Image” file, then in some cases the default kernel would not be able to load those modules…but you’d get a module load error in that case, which is different from an inability to find the modules.

Did you run the make command for target “tegra_defconfig” prior to making your i2c changes? Did you either make the kernel before making the modules, or else perhaps make the target “modules_depend” prior to building modules? Some places in kernel build propagate configuration, and if done out of order (or if some steps are skipped), then other commands must be used to propagate configuration prior to building modules.

I forgot to ask: What were the exact kernel build command lines you used, in the order you used them?

I ran the make command for target “tegra_defconfig” after making i2c changes. I made the kernel after making the modules. After I manually downloaded and expanded the kernel sources, I made the changes to i2c. After that, I followed the steps mentioned in “Building the NVIDIA kernel” link - and got stuck at step 7.

The above guarantees failure. This will overwrite your changes with the default. The kernel would still build, but it would build without your i2c changes.

The above guarantees misconfiguration. Building the kernel as a whole (e.g., “make Image”) will properly propagate any configuration to modules. Alternatively, you could “make modules_prepare”, but I highly recommend building Image at least once as an “acid test”. Then build target modules. Building modules does not propagate configuration, but building Image does propagate configuration.

Note that if you build to a temporary location, then you should completely remove the temporary content and start again. If anything was built directly in the kernel source location (not recommended), then you should run “sudo make mrproper” there prior to starting again (this will completely clean out any previous configuration).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.