RidgeRun / NVIDIA-Jetson-IMX477-RPIV3

NVIDIA Jetson IMX477 HQ RPI V3 camera driver
124 stars 40 forks source link

Flashing issue: Xavier NX #8

Closed zinuok closed 3 years ago

zinuok commented 3 years ago

If we do flash the xavier NX copying Image into NX /boot/ directory, we don't have to do 'Copy the kernel modules' right? I tried to copy the kernel modules following the instructions here. However I failed that since NX is already out of memory after initial setup.

After copying the Image file, I did reboot my NX but it falls in bootloop infinitely.. anyone succeed flahsing after this repository being updated yesterday?

AxelZschutschke commented 3 years ago

Didn't try it yesterday, but other Linux Systems / Kernel images are very sensitive regarding the module build version / compiler / environment used for kernel build. So a custom build kernel image might as well refusing the stock kernel modules. For storage reasons, you can dump the original /lib/modules/4.... folder and copy the new custom build modules there (without rebooting inbetween) Make sure the new folder is named exactly as in your build tree (dont add anything to the module folder name while copying) e.g. original was named 4.9.140-tegra in my case, I moved it away and placed 4.9.140 (without the tegra) as my custom build used that path.

zinuok commented 3 years ago

thank you for reply. I'll try that

I have a question: The last step of this repository is "Flashing", but the ridgerun site also includes "copy the kernel module". Should we do that?

AxelZschutschke commented 3 years ago

Again, did not try without but I would assume yes - you need to do that. Also the custom build "Image" (Kernel) probably searches /lib/modules/4.9.140 (or whatever version you are using), which probably is not present in your case without copying the modules there? Please make sure the /lib/module/XXX path (the XXX part) is exactly the same as in your build folder...

zinuok commented 3 years ago

Thank you!

Sorry to bother you, but I can't find any instruction about "removing symlink".

Does 'make sure to remove the build and source symlinks before copying the modules as written in the ridgerun instructions!' means that we don't need to copy ../4.9.140/build and source directory to Xavier NX?

the symlink build points to '../Linux_for_Tegra/build', which is 7.1GB! ( I can't copy this even if I dump out original one in Xavier NX as you said)

I'm confused cause I think Xavier NX may need those built files..

Thank you

ClonedPuppy commented 3 years ago

Hey @zinuok , I think we are in similar timezones so I'll jump in and answer for @AxelZschutschke :) You can just disregard the build and source directories, you don't need those. Just the modules, it quite large however, close to 1gb. If you used the SDKmanager style of flashing the Nano then your storage is max 16Gb, which is a real pain in the #$%!. What you can do if you need more space is to run a script which will fix the partitions for you, in case you use a larger SD card. Let me know if you need to do that.

So regarding the modules, yes it's a good idea to copy them over. Most likely they will probably be identical to the ones that were there already, but just to be safe. The only difference that we know of, is that the stock kernel that is installed by nvidia, looks for the kernels in a 4.9.140-tegra directory, while the one we built looks for it in the 4.9.140 directory (no -tegra). If you feel adventurous you could create a symlink from your stock 4.9.140-tegra to a 4.9.140 and do a reboot. I guess theoretically it should work, since we didn't really add or remove any of the modules in menuconfig... but again, no guarantees.

zinuok commented 3 years ago

Thank you for your help to @ClonedPuppy and @AxelZschutschke the cause of my problem was I copied as '4.9.140-tegra', not '4.9.140'

Now I can reboot successfully my NX board, but still my board can't recognize IMX477 with this message: "Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No camera available" and I can't find /dev/video0

Did you guys have this kinds of problem? I'm trying to work out that problem.. but it's not easy (I tried to plug the IMX477 into both CAM0, CAM1 ports with powered off)

ClonedPuppy commented 3 years ago

Check this issue, if same, then welcome to the club :D

zinuok commented 3 years ago

close this issue, since I solved it by removing R8 resistor. Refer this: #5