$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
/home/rei-jetson/Tegra186_Linux_R32.5.1_aarch64/Linux_for_Tegra/rootfs/.
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?
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).