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

added patch scripts for debian 10 and linux vanilla #6653

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

andrewhodel
Copy link
Contributor

L515 working on Debian 10

zip@aware:~/librealsense$ uname -a
Linux aware 5.0.21-rt16 #1 SMP PREEMPT Fri Jun 19 14:05:53 MDT 2020 x86_64 GNU/Linux
zip@aware:~/librealsense$ lsusb
Bus 002 Device 005: ID 8086:0b64 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 2104:0124  
Bus 001 Device 003: ID 1bcf:2b97 Sunplus Innovation Technology Inc. 
Bus 001 Device 002: ID 187c:0550 Alienware Corporation 
Bus 001 Device 006: ID 8087:0025 Intel Corp. 
Bus 001 Device 005: ID 0d62:e90c Darfon Electronics Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
zip@aware:~/librealsense$ modinfo uvcvideo | grep "version:"
version:        1.1.1
srcversion:     D52EDAEED04C3FC3C88AFD1

@andrewhodel
Copy link
Contributor Author

andrewhodel commented Jun 19, 2020

dmesg output

[ 1013.429278] usb 2-6: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[ 1013.450507] usb 2-6: New USB device found, idVendor=8086, idProduct=0b64, bcdDevice=10.41
[ 1013.450515] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1013.450519] usb 2-6: Product: Intel(R) RealSense(TM) 515
[ 1013.450521] usb 2-6: Manufacturer: Intel(R) RealSense(TM) Camera
[ 1013.450524] usb 2-6: SerialNumber: 00000000F0171941
[ 1013.458786] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 515 (8086:0b64)

patch -p1 < ../patch-${KV1}.${KV2}.${KV3}-rt${RT}.patch

# this will apply all patches
patch -p1 < ../*.patch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewhodel , you need to specify and provide the exact patches to be built into the kernel.
Though I don't see how this is going be implemented - Librealsense patches are different from kernel to kernel so you can't have a single version/ fit all approach.

@andrewhodel
Copy link
Contributor Author

andrewhodel commented Jun 22, 2020 via email

@ev-mp
Copy link
Collaborator

ev-mp commented Jun 23, 2020

@andrewhodel hello, as I've explained in #6650 this approach is not viable.

This attempts on any kernel version you specify using all of the patches in your repo.

The patches are managed and specified per specific kernel version. There is no solution that fits all kernel.

The only kernel you have specified in the patches is 4.8, this works with 5.0.21 as specified in the comments.

  1. It is not clear which patch you reviewed to reach this conclusion. The official patches cover all Ubuntu LTS kernels in the range of 4.4 .... 5.3 (Xenial+Bionic).
    In case you're not sure about which patches should be selected you can invoke/review the script from the [installation guide]:(https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md#prerequisites)
    ./scripts/patch-realsense-ubuntu-lts.sh
  2. The script doesn't evaluate the selected patches, so how can one verify that (a) proper patches are selected and (b) the patches were applied correctly ?
    What librealsense-specific tests do you run to validate that the compiled kernel was patched properly ?

Please review #6650 again, as this in its current form this PR cannot lead to merge.

@andrewhodel
Copy link
Contributor Author

andrewhodel commented Jun 23, 2020 via email

@andrewhodel
Copy link
Contributor Author

andrewhodel commented Jun 23, 2020 via email

@ev-mp
Copy link
Collaborator

ev-mp commented Jul 21, 2020

@andrewhodel hello,
In order to proceed with the PR we'll need your cooperation to address the comments.

  1. This question was already raised but I need to reiterate it - what method did you use to ensure that the patches were properly applied?
    As already stated Realsense Depth cameras are UVC-compliant devices that run with vanilla kernels. Hence the lsusb's cannot be used to assert that the correctness of the patches. See Question: how to confirm that the kernel module is patched correctly? #6837 for alternative methods.
  2. Recompiling the whole kernel is not a method we recommend, and the script need to be refactored such that instead of recompiling and replacing the kernel only the affected loadable modules will be rebuilt as in Ubuntu's case.

@andrewhodel
Copy link
Contributor Author

andrewhodel commented Jul 21, 2020 via email

@ev-mp ev-mp changed the base branch from master to development February 17, 2021 21:56
Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewhodel , thank you for the contribution.

@ev-mp ev-mp merged commit db56f4c into IntelRealSense:development Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants