How to install Intel realsense D435i driver on TX2(JetPack4.2)?

Who can help me?Please~T^T

Hi,
You may refer to

Hi~DaneLLL,thank you for your response.
In order to use this guide(https://www.jetsonhacks.com/2019/01/21/intel-realsense-d435i-on-nvidia-jetson-agx-xavier/#comment-4574) on TX2(Jetpack4.2+kernel4.9.140+librealsense_v2.22),I have changed some code.Everything is ok but applying realsense metadata patch.There are some error I get.

Applying realsense-metadata patch
patching file drivers/media/usb/uvc/uvc_driver.c
Hunk #1 succeeded at 2770 (offset 3 lines).
patching file drivers/media/usb/uvc/uvc_video.c
Hunk #1 succeeded at 1241 (offset 12 lines).
Hunk #2 succeeded at 1279 (offset 12 lines).
patching file drivers/media/usb/uvc/uvcvideo.h
Hunk #2 FAILED at 222.
1 out of 2 hunks FAILED -- saving rejects to file drivers/media/usb/uvc/uvcvideo.h.rej

How can I fix it?I never change anything under patches folder.

Hi~DaneLLL,thank you for your response.
In order to use this guide(https://www.jetsonhacks.com/2019/01/21/intel-realsense-d435i-on-nvidia-jetson-agx-xavier/#comment-4574) on TX2(Jetpack4.2+kernel4.9.140+librealsense_v2.22),I have changed some code.Everything is ok but applying realsense metadata patch.There are some error I get.

Applying realsense-metadata patch
patching file drivers/media/usb/uvc/uvc_driver.c
Hunk #1 succeeded at 2770 (offset 3 lines).
patching file drivers/media/usb/uvc/uvc_video.c
Hunk #1 succeeded at 1241 (offset 12 lines).
Hunk #2 succeeded at 1279 (offset 12 lines).
patching file drivers/media/usb/uvc/uvcvideo.h
Hunk #2 FAILED at 222.
1 out of 2 hunks FAILED -- saving rejects to file drivers/media/usb/uvc/uvcvideo.h.rej

How can I fix it?I never change anything under patches folder.

Hi,
Kernel is open source code. You should be able to compare different versions and check further. You may try to trace uvc video driver.

Thank you again,I have fixed it successfully.There is a solution that how to fix it.
https://github.com/Tengyun-Mo/buildLibrealsense2TX2