Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error when applying the kernel patching V4L #7987

Closed
r91andersson opened this issue Dec 14, 2020 · 21 comments
Closed

Build error when applying the kernel patching V4L #7987

r91andersson opened this issue Dec 14, 2020 · 21 comments

Comments

@r91andersson
Copy link

r91andersson commented Dec 14, 2020

Required Info
Camera Model D435i
Firmware Version -
Operating System & Version Ubuntu 18.04.5 LTS
Kernel Version (Linux Only) Linux 4.9.140-tegra
Platform NVIDIA Xavier AGX
SDK Version 2.40.0
Language C
Segment Robot
V4L Version L4T 32.4.3

Issue Description

When following the guide "Use the V4L Native backend by applying the kernel patching", and building with the script provided : ./scripts/patch-realsense-ubuntu-L4T.sh
the following error is generated:

Apply Librealsense Kernel Patches
patching file drivers/media/usb/uvc/Makefile
patching file drivers/media/usb/uvc/uvc_driver.c
Hunk #1 succeeded at 254 with fuzz 2 (offset 85 lines).
patching file drivers/media/usb/uvc/uvcvideo.h
Hunk #1 succeeded at 122 with fuzz 2 (offset -16 lines).
patching file drivers/media/v4l2-core/v4l2-ioctl.c
Hunk #1 FAILED at 1262.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/v4l2-core/v4l2-ioctl.c.rej
patching file include/uapi/linux/videodev2.h
Hunk #1 FAILED at 641.
1 out of 1 hunk FAILED -- saving rejects to file include/uapi/linux/videodev2.h.rej
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Dec 14, 2020

Hi @r91andersson You can build librealsense with packages on Jetson using the official Intel guide for Jetson in the link below (which it looks as though you have already been using, judging by your quote above about Use the V4L Native backend by applying the kernel patching):

https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md

Or you can build from source code on Jetson with the -DFORCE_RSUSB_BACKEND=true installation method, which requires an internet connection but is not dependent on Linux versions or kernel versions and does not require patching.

#6964 (comment)

@r91andersson
Copy link
Author

@MartyG-RealSense Thats correct, that is the guide I've been following!

I was told to install the drivers by building from source and with the native method (by Yusheng from Intel Business). I've been experience delays in the images from the camera (it seems that the timestamp wasn't correct).

@MartyG-RealSense
Copy link
Collaborator

In the installation_jetson.md guide, the step before running the ./scripts/patch-realsense-ubuntu-L4T.sh script is to be in the librealsense root directory. Are you in this location when you run the script please?

@r91andersson
Copy link
Author

Yes I was in that location when running the script

@MartyG-RealSense
Copy link
Collaborator

I returned to the beginning of the case and researched it extensively from the perspective of the patching errors. Whilst I found cases with similar build errors, the use of Jetson has to be taken into account too. So to ensure correct advice, I will seek advice from Intel. Thanks for your patience.

@RealSenseSupport
Copy link
Collaborator

@r91andersson , could you please double check the L4T version? Is your L4T kernel based on 32.4.3 (provided on this Github) or 32.4.4 (mentioned on the Zendesk)? Our scrip was verified on 32.4.3.
We are are currently working on to check if this is due to the script not compatible with the latest 32.4.4.
Thank you.

@r91andersson
Copy link
Author

I'll check tomorrow. But how to downgrade or install 32.4.3 version if that's the case?

@RealSenseSupport
Copy link
Collaborator

We confirmed the error when running L4T 32.4.4.
Please use the NVidia SDK manager to install JetPack 4.4 (L4T-32.4.3).
Thank you.

@r91andersson
Copy link
Author

I can confirm that by installing JetPack 4.4 (L4T-32.4.3) the installation went successful! Thanks @RealSenseSupport @MartyG-RealSense

@heruiyuan
Copy link

@r91andersson I had the same issue, have you solve it? I want to make d435i work on Xavier NX.

@r91andersson
Copy link
Author

@heruiyuan Use Nvidia SDK Manager and upgrade Xavier Jetpack to version 4.4. Then repeat the whole process. Make sure to do a backup on Xavier, because the process will reflash the OS image as well.

@heruiyuan
Copy link

@r91andersson Flash Xavier NX with JetPack 4.4 (L4T-32.4.3)?

@r91andersson
Copy link
Author

@heruiyuan Correct!

@MartyG-RealSense
Copy link
Collaborator

Hi @r91andersson Do you require further assistance with this case, please? Thanks!

@r91andersson
Copy link
Author

No thanks! Jetpack 4.4 solved the issue 😃

@MartyG-RealSense
Copy link
Collaborator

Okay great, thanks very much for the confirmation!

@juvinski
Copy link

juvinski commented Dec 25, 2020

Hi

I'm facing the same problem but I'm using the 4.4.1 JetPack on a Jetson Nano.
Anyone has problem too ?
Any clue ?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Dec 28, 2020

Hi @juvinski I would refer you to case #8079 in which Intel have advised that the L4T patch script currently supports JetPack 4.4 (L4T-32.4.3) at the time of writing this, and the script will fail on JetPack 4.4.1 (L4T-32.4.4).

@juvinski
Copy link

hi @MartyG-RealSense

thanks a lot

@dlee640
Copy link

dlee640 commented Jan 27, 2021

@RealSenseSupport @juvinski Hello. I am using the 4.4.1 Jetpack on Jetson Xavier. The problem is that Xavier is embedded within the robot so I do not have access to SD card slot, and it seems like I need to reinstall the jetpack 4.4 since 4.4.1 does not work. Is Intel working on getting this to work with 4.4.1? or has anyone able to patch it correctly? I could really use some help here.. Thank you.

My error:

Apply Librealsense Kernel Patches
patching file drivers/media/usb/uvc/Makefile
patching file drivers/media/usb/uvc/uvc_driver.c
Hunk #1 succeeded at 764 with fuzz 2 (offset 595 lines).
patching file drivers/media/usb/uvc/uvcvideo.h
Hunk #1 succeeded at 392 with fuzz 2 (offset 254 lines).
patching file drivers/media/v4l2-core/v4l2-ioctl.c
Hunk #1 FAILED at 1262.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/v4l2-core/v4l2-ioctl.c.rej
patching file include/uapi/linux/videodev2.h
Hunk #1 FAILED at 641.
1 out of 1 hunk FAILED -- saving rejects to file include/uapi/linux/videodev2.h.rej

My jetpack version:
unitree@nx:~/librealsense$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 4.4.1-b50
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.4.1-b50), nvidia-opencv (= 4.4.1-b50), nvidia-cudnn8 (= 4.4.1-b50), nvidia-tensorrt (= 4.4.1-b50), nvidia-visionworks (= 4.4.1-b50), nvidia-container (= 4.4.1-b50), nvidia-vpi (= 4.4.1-b50), nvidia-l4t-jetson-multimedia-api (>> 32.4-0), nvidia-l4t-jetson-multimedia-api (<< 32.5-0)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.4.1-b50_arm64.deb
Size: 29412
SHA256: ec502e1e3672c059d8dd49e5673c5b2d8c606584d4173ee514bbc4376547a171
SHA1: 75a405f1ad533bfcd04280d1f9b237b880c39be5
MD5sum: 1267b31d8b8419d9847b0ec4961b15a4
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.4-b186
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.4-b186), nvidia-opencv (= 4.4-b186), nvidia-cudnn8 (= 4.4-b186), nvidia-tensorrt (= 4.4-b186), nvidia-visionworks (= 4.4-b186), nvidia-container (= 4.4-b186), nvidia-vpi (= 4.4-b186), nvidia-l4t-jetson-multimedia-api (>> 32.4-0), nvidia-l4t-jetson-multimedia-api (<< 32.5-0)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.4-b186_arm64.deb
Size: 29376
SHA256: 7f90f2def712d993bd84855355aec47a1b63ae54edefcbf4c963dbe0cb6fbf92
SHA1: bd1f0b05adbdf8f0df4dce4f655bb9615172594f
MD5sum: f9d2f9a9dfee794ef361b1bd1ec38130
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.4-b144
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 195
Depends: nvidia-container-csv-cuda (= 10.2.89-1), libopencv-python (= 4.1.1-2-gd5a58aa75), libvisionworks-sfm-dev (= 0.90.4.501), libvisionworks-dev (= 1.6.0.501), libnvparsers7 (= 7.1.0-1+cuda10.2), libnvinfer-plugin-dev (= 7.1.0-1+cuda10.2), libnvonnxparsers7 (= 7.1.0-1+cuda10.2), libnvinfer-samples (= 7.1.0-1+cuda10.2), libnvinfer-bin (= 7.1.0-1+cuda10.2), libvisionworks-samples (= 1.6.0.501), libvisionworks-tracking-dev (= 0.88.2.501), vpi-samples (= 0.2.0), tensorrt (= 7.1.0.16-1+cuda10.2), libopencv (= 4.1.1-2-gd5a58aa75), libnvinfer-doc (= 7.1.0-1+cuda10.2), libnvparsers-dev (= 7.1.0-1+cuda10.2), libnvidia-container0 (= 0.9.0beta.1), nvidia-container-csv-visionworks (= 1.6.0.501), cuda-toolkit-10-2 (= 10.2.89-1), graphsurgeon-tf (= 7.1.0-1+cuda10.2), libcudnn8 (= 8.0.0.145-1+cuda10.2), libopencv-samples (= 4.1.1-2-gd5a58aa75), nvidia-container-csv-cudnn (= 8.0.0.145-1+cuda10.2), python-libnvinfer-dev (= 7.1.0-1+cuda10.2), libnvinfer-plugin7 (= 7.1.0-1+cuda10.2), libvisionworks (= 1.6.0.501), libcudnn8-doc (= 8.0.0.145-1+cuda10.2), nvidia-container-toolkit (= 1.0.1-1), libnvinfer-dev (= 7.1.0-1+cuda10.2), nvidia-l4t-jetson-multimedia-api (>> 32.4-0), nvidia-l4t-jetson-multimedia-api (<< 32.5-0), libopencv-dev (= 4.1.1-2-gd5a58aa75), vpi-dev (= 0.2.0), vpi (= 0.2.0), libcudnn8-dev (= 8.0.0.145-1+cuda10.2), python3-libnvinfer (= 7.1.0-1+cuda10.2), python3-libnvinfer-dev (= 7.1.0-1+cuda10.2), opencv-licenses (= 4.1.1-2-gd5a58aa75), nvidia-container-csv-tensorrt (= 7.1.0.16-1+cuda10.2), libnvinfer7 (= 7.1.0-1+cuda10.2), libnvonnxparsers-dev (= 7.1.0-1+cuda10.2), uff-converter-tf (= 7.1.0-1+cuda10.2), nvidia-docker2 (= 2.2.0-1), libvisionworks-sfm (= 0.90.4.501), libnvidia-container-tools (= 0.9.0beta.1), nvidia-container-runtime (= 3.1.0-1), python-libnvinfer (= 7.1.0-1+cuda10.2), libvisionworks-tracking (= 0.88.2.501)
Conflicts: cuda-command-line-tools-10-0, cuda-compiler-10-0, cuda-cublas-10-0, cuda-cublas-dev-10-0, cuda-cudart-10-0, cuda-cudart-dev-10-0, cuda-cufft-10-0, cuda-cufft-dev-10-0, cuda-cuobjdump-10-0, cuda-cupti-10-0, cuda-curand-10-0, cuda-curand-dev-10-0, cuda-cusolver-10-0, cuda-cusolver-dev-10-0, cuda-cusparse-10-0, cuda-cusparse-dev-10-0, cuda-documentation-10-0, cuda-driver-dev-10-0, cuda-gdb-10-0, cuda-gpu-library-advisor-10-0, cuda-libraries-10-0, cuda-libraries-dev-10-0, cuda-license-10-0, cuda-memcheck-10-0, cuda-misc-headers-10-0, cuda-npp-10-0, cuda-npp-dev-10-0, cuda-nsight-compute-addon-l4t-10-0, cuda-nvcc-10-0, cuda-nvdisasm-10-0, cuda-nvgraph-10-0, cuda-nvgraph-dev-10-0, cuda-nvml-dev-10-0, cuda-nvprof-10-0, cuda-nvprune-10-0, cuda-nvrtc-10-0, cuda-nvrtc-dev-10-0, cuda-nvtx-10-0, cuda-samples-10-0, cuda-toolkit-10-0, cuda-tools-10-0, libcudnn7, libcudnn7-dev, libcudnn7-doc, libnvinfer-plugin6, libnvinfer6, libnvonnxparsers6, libnvparsers6
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.4-b144_arm64.deb
Size: 30376
SHA256: 0556dbf2044a9d12e2c26e1a342033d4816f5d84f87dfe7a82916449249bb04b
SHA1: 38e788c5cd84b3e4bd956dcd7c9e018276e17b18
MD5sum: 0a96d0fa91591f10b7c86022d068970d
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

@AndreV84
Copy link

how to patch Jetpack 4.4.1+?
how to patch 4.5.1?
r we doomed to use of 4.4 version if the patch is a hard requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants