I followed,= below link to install 4g dongle driver but it failed to build.
here is the error while building :
nvidia@nvidia:~/simcom_wwan$ sudo make
[sudo] password for nvidia:
**make -C /lib/modules/4.9.140/build SUBDIRS= modules ** make[1]: *** /lib/modules/4.9.140/build: No such file or directory. Stop.
Makefile:6: recipe for target ‘default’ failed
make: *** [default] Error 2
How about telling us what is the machine you are using for this work?
Does the wiki page ask you to try this on x64 ubuntu host machine or jetson nano?
Also, by default the “build” folder is under /lib/modules/{uname -r}/ folder. I can see that on my jetson nano.
Does your command “uname -r” give you 4.9.140? That is not the one from default jetapck.
Didn’t you try to build kernel image before? If you don’t know what I am saying, then how did you upgrade kernel image at that time?
Your current problem is just the makefile fails to find the path under /lib/modules/{uname -r}.
If you are using default jetpack, the result of “uname -r” will be something like 4.9.140-tegra. Thus, the makefile will go to /lib/modules/4.9.140-tegra and search what it needs. However, the makefile fails to find it on your device. Why? Because there is no such folder. And why no such folder here? Because the “uname -r” gives the different path. And why “uname -r” gives different result? Because your kernel has been re-built before and you didn’t give the LOCALVERSION during compilation.
Now I see uname -r gives image with -tegra suffix.
but issue is not yet resolved:
I get belwo error:
nvidia@nvidia-desktop:~/Desktop/GSM$ ls
Simcom_wwan.zip
nvidia@nvidia-desktop:~/Desktop/GSM$ unzip Simcom_wwan.zip
Archive: Simcom_wwan.zip
creating: simcom_wwan/
inflating: simcom_wwan/Makefile
inflating: simcom_wwan/simcom_wwan.c
nvidia@nvidia-desktop:~/Desktop/GSM$ ls
simcom_wwan Simcom_wwan.zip
nvidia@nvidia-desktop:~/Desktop/GSM$ cd simcom_wwan/ nvidia@nvidia-desktop:~/Desktop/GSM/simcom_wwan$ sudo make
[sudo] password for nvidia: make -C /lib/modules/4.9.140-tegra/build SUBDIRS= modules make[1]: *** /lib/modules/4.9.140-tegra/build: No such file or directory. Stop. Makefile:6: recipe for target ‘default’ failed make: *** [default] Error 2
nvidia@nvidia-desktop:~/Desktop/GSM/simcom_wwan$ cd /lib/modules/4.9.140-tegra/
nvidia@nvidia-desktop:/lib/modules/4.9.140-tegra$ ls
build kernel modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols source
extra modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
nvidia@nvidia-desktop:/lib/modules/4.9.140-tegra$ cd /usr/src/ nvidia@nvidia-desktop:/usr/src$ ls linux-headers-4.9.140-tegra-linux_x86_64 linux-headers-4.9.140-tegra-ubuntu18.04_aarch64 nvidia
nvidia@nvidia-desktop:/usr/src$ pwd
still get this error:
nvidia@nvidia-desktop:~/Desktop/GSM$ cd simcom_wwan/ nvidia@nvidia-desktop:~/Desktop/GSM/simcom_wwan$ sudo make
make -C /lib/modules/4.9.140-tegra/build SUBDIRS= modules
make[1]: Entering directory ‘/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64’
make[1]: *** No rule to make target ‘modules’. Stop.
make[1]: Leaving directory ‘/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64’
Makefile:6: recipe for target ‘default’ failed
make: *** [default] Error 2 nvidia@nvidia-desktop:~/Desktop/GSM/simcom_wwan$ make
make -C /lib/modules/4.9.140-tegra/build SUBDIRS=/home/nvidia/Desktop/GSM/simcom_wwan modules
make[1]: Entering directory ‘/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64’
make[1]: *** No rule to make target ‘modules’. Stop.
make[1]: Leaving directory ‘/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64’
Makefile:6: recipe for target ‘default’ failed
make: *** [default] Error 2
Further to this I have flashed Nano Stock BSP (L4T 32.3.1)and tried to follow driver building (native ) and installing steps and still I get some issues like below, Please help:
SIM7X00-Driver simcom_wwan Simcom_wwan.zip
nvidia@nvidia-desktop:~/test$ cd simcom_wwan/
nvidia@nvidia-desktop:~/test/simcom_wwan$ ls
Makefile simcom_wwan.c
nvidia@nvidia-desktop:~/test/simcom_wwan$ sudo make
[sudo] password for nvidia:
make -C /lib/modules/4.9.140-tegra/build SUBDIRS= modules
make[1]: Entering directory ‘/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9’
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/net/ethernet/nvidia/Kconfig:30: can’t open file “drivers/net/ethernet/nvidia/eqos/Kconfig”
scripts/kconfig/Makefile:37: recipe for target ‘silentoldconfig’ failed
make[3]: *** [silentoldconfig] Error 1
Makefile:565: recipe for target ‘silentoldconfig’ failed
make[2]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/kernel.release’. Stop.
make[1]: Leaving directory ‘/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9’
Makefile:6: recipe for target ‘default’ failed
make: *** [default] Error 2
nvidia@nvidia-desktop:~/test/simcom_wwan$