/lib/modules/4.14.102-rt53-tegra/build: No such file or directory

I flashed Drive SW 10.0 to Drive Xavier through SDKmanager, and I have been trying to install some application sw. But run into this problem: /lib/modules/4.14.102-rt53-tegra/build: No such file or directory. I also checked /usr/src. It is empty. Wonder if I need to build the kernel after flash the platform, but how?

Thank you!

Hi Phil.Chen,

Please refer to https://docs.nvidia.com/drive/drive_os_5.1.6.1L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/Appendix/sys_programming_kernel_toolchain.html. You should be able to get the headers. Thanks!

Thank you VickNV!

I am new to Xavier. Does the SDKmanager come with the kernel file? or need to download the kernel file from nv-git-07?

Appreciate your help!

I’m not sure if you have access to nv-git-07. Could you try if below archive files in your host system helps on your case. Thanks!

~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-foundation_src/kernel/drive-oss-t186-flashing_kernel-src.tar.bz2
~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux_src/kernel/linux.tar.bz2

Thank you VickNV!

I have made to this point.

  1. sudo cp -a ${PWD}/out-t186ref-linux/lib/modules/* /drive-t186ref-linux/targetfs/lib/modules

Does this command executes copying the built kernel to xavier? But the folder, driv-t186ref-linux, on xavier is empty. Could you advise?

many thanks!

Phil

Could you try to copy to either Xavier A or B accordingly as below?

sudo cp -a ${PWD}/out-t186ref-linux/lib/modules/* <top>/drive-t186ref-linux/targetfs_a/lib/modules/
sudo cp -a ${PWD}/out-t186ref-linux/lib/modules/* <top>/drive-t186ref-linux/targetfs_b/lib/modules/

Thank you VickNV!
one question, here, the “” in "sudo cp -a ${PWD}/out-t186ref-linux/lib/modules/* /drive-t186ref-linux/targetfs_a/lib/modules/ " should be the directory in Xavier or host pc?

should be ~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS in host pc. I guess you need to flash Xavier after all the steps.

Thank you VickNV!

After I flashed the Xavier, I saw the the “build” folder under /lib/modules/4.14.102-rt53-tegra/ on Xavier. But it links to the kernel file on the host machine because that is where it was built. I tried to copy the kernel file to the Xavier, and rebuilt the link, but it gave me some other errors. I guess I need to install the kernel header files instead of a direct copy and paste. Would you please advise the next step?

Appreciate your help!

What error messages did you see? What packages are you trying to install?

The error message is /bin/sh: 1: scripts/basic/fixdep: Exec format error. I searched on line, looks like that the executable was built on the host instead of on the target, it suggests recompiling on the target.

I guess this should be a common issue of cross compiling linux kernel (maybe something wrong in makefile) but not nvidia specific. Could you follow other community people’s guidance to fix it? Thanks!

Hi csgo.expertt,

Please check comment #4 of this topic. You can access them on your host system after completing download/installation process of DRIVE Software via SDM Manager.Thanks!