Skip to content

added patch scripts for debian 10 and linux vanilla - #6653

Merged
ev-mp merged 1 commit into
realsenseai:developmentfrom
andrewhodel:master
Feb 18, 2021
Merged

added patch scripts for debian 10 and linux vanilla#6653
ev-mp merged 1 commit into
realsenseai:developmentfrom
andrewhodel:master

Conversation

@andrewhodel

Copy link
Copy Markdown
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

andrewhodel commented Jun 19, 2020

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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

andrewhodel commented Jun 22, 2020 via email

Copy link
Copy Markdown
Contributor Author

@ev-mp

ev-mp commented Jun 23, 2020

Copy link
Copy Markdown
Contributor

@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

andrewhodel commented Jun 23, 2020 via email

Copy link
Copy Markdown
Contributor Author

@andrewhodel

andrewhodel commented Jun 23, 2020 via email

Copy link
Copy Markdown
Contributor Author

@ev-mp

ev-mp commented Jul 21, 2020

Copy link
Copy Markdown
Contributor

@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

andrewhodel commented Jul 21, 2020 via email

Copy link
Copy Markdown
Contributor Author

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

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

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 realsenseai: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