How to load the driver modules at kernel booting up?

Dear sir:

I am bringing up the 4G module on nano. The 3 driver modules(GobiNet.ko,option.ko and usb_wwan.ko) are built. Then, i edited the file etc/modules as following, but i found the option and usb_wwan cannot loaded after the kernel is running. Because i add the log message in these driver.

/etc/modules: kernel modules to load at boot time.

This file contains the names of kernel modules that should be loaded

at boot time, one per line. Lines beginning with “#” are ignored.

usb_wwan
option
GobiNet

Some modules might require a certain order of insert. Also, I think your copy and paste of the file content did not show up correctly in the forums. Let’s start over and see if manual insmod does the job.

What are the exact module file names, and where are they located? What is the output of the command “uname -r”? Modules will only be searched for in this directory or its subdirectories:
/lib/modules/$(uname -r)/kernel

If we know the path to those modules, and that they are visible in “/lib/modules/$(uname -r)/kernel”, then there are some simple experiments you an run to see what the kernel thinks of the modules and module insert order.

Dear sir:
Tks for your reply.

I have a try for different order:
usb_wwan
option
GobiNet

and

option
usb_wwan
GobiNet

They are all failed.

The file names are option.ko and usb_wwan.ko. They are located at rootfs/lib/modules/4.9.253-tegra/kernel/drivers/usb/serial

Can you help me? Tks.

If you look for the actual files in “/lib/modules/$(uname -r)/kernel”, what do you see?

cd `uname -r`
find . -iname 'option*'
find . -iname 'usb_wwan*'
find . -iname 'gobinet*'

I am slightly suspicious of the capital letters in the “GobiNet” name, not sure if this would be honored or not during insmod. One can cd to the location of a module and specify to “sudo insmod <name>”, but the name would be the actual file name (including a “.ko” suffix). You already know the names of two of the modules, and I suggest you try (perhaps in different order):

cd ...wherever the module is, which might change depending on module...
sudo insmod option.ko
sudo insmod usb_wwan.ko
sudo insmod GobiNet.ko

Dear sir:

I have found in the dir, the results as following:
hy@he-Lenovo:~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/lib$ find . -name “option*”
./modules/4.9.253-tegra/kernel/drivers/usb/serial/option.ko
hy@he-Lenovo:~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/lib$ find . -name “usb_wwan*”
./modules/4.9.253-tegra/kernel/drivers/usb/serial/usb_wwan.ko
hy@he-Lenovo:~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/lib$ find . -name “Gobi*”
./modules/4.9.253-tegra/kernel/drivers/net/usb/GobiNet.ko

You’d need to run that from the actual Jetson. We can’t test insmod of a Jetson module on the host PC. Those modules you see would be populated to the Jetson when flashed with that rootfs, but it does not say if the Jetson would or could load the modules (which is what we’re looking for). Are the modules here on the actual Jetson?

/lib/modules/4.9.253-tegra/kernel/drivers/usb/serial/option.ko
/lib/modules/4.9.253-tegra/kernel/drivers/usb/serial/usb_wwan.ko
/lib/modules/4.9.253-tegra/kernel/drivers/net/usb/GobiNet.ko

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