Regarding as how to update module file to Target system

Currently, I rebuild the kernel then cp Image to /boot/ and , But the usb disk and wifi is not working.
I guess that I maybe miss to update the module file to board.
I try to following steps to do that, But I still not sure the steps:

  1. Replace the contents of Linux_for_Tegra/kernel/dtb/ with the contents of:
  2. Execute the following commands to install the kernel modules:
    $ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install
  3. Optionally, archive the installed kernel modules using the following command:
    cd <modules_install_path> tar --owner root --group root -cjf kernel_supplements.tbz2

The installed modules can be used to provide the contents of /lib/modules/<kernel_version> on the target system.
My question is:
I have got the kernel_supplements.tbz2 file in the directory Linux_for_Tegra/rootfs/
I don’t understand the following steps, can you provide me more detail instuction?
Use the archive to replace the one in the kernel directory of the extracted release package prior to running


Set below environment value before build the kernel Image.

export LOCALVERSION=-tegra

Hi ShaneCCC,

Thank you for your replay quckly.
After export LOCALVERSION=-tegra
Need I to copy kernel_supplements.tbz2 to some directory on Jetson TX2 Board?
OR Need to use to flash kernel_supplements.tbz2 to Board?


Just need to copy the Image to /boot/Image

Hi ShaneCCC,

Maybe, you don’t understand my question.
I make update on driver and compiled to module(*.ko file, not kernel Image) on host PC.
I don’t need to copy related module file to Board?


If you have any modify for the loadable module? Then yes you need copy them to the device.

Just FYI, the DTB content can be built with the kernel, but it is neither kernel nor module. I would not recommend adding changes to this at the same time as modules or kernel Image.

The module install location is just a file copy. The location is a subdirectory of:

/lib/modules/$(uname -r)/kernel/

If you look at where the kernel module was found in the kernel source, then that is the rest of the tree path for where you copy it. Just as a contrived example, imagine you built a driver which was in your kernel source as “drivers/i2c/algos/i2c-algo-bit.ko”. Then the final path would be that appended to the above module base directory:

/lib/modules/$(uname -r)/kernel/drivers/i2c/algos/i2c-algo-bit.ko

Either rebooting or running “sudo depmod -a” would update the kernel’s knowledge of the new module.

In the case where you add this to the “rootfs/lib/modules/$(uname -r)/kernel/” it should work as expected after the flash so long as the kernel which runs has the correct “uname -r”.