1 2 Previous Next 28 Replies Latest reply on May 10, 2015 10:14 AM by AlexT_Intel

    UVC Driver Support

    VinayNooji

      Hi,

       

      Has anybody enabled UVC driver in config and built the kernel?

       

      I am trying to build the Edison image without any modification. The build fails.
      ERROR: Function failed: do_configure

       

      I tried executing following command, as provided by, intel_jorge on Jul 31, 2014 2:41 PM,
              •       bitbake linux-externalsrc -c menuconfig
      but the execution fails with error message "Nothing provides 'linux-externalsrc'".

       

      I followed the steps as given in the Yocto kernel developer guide:

      To create a configuration fragment using this method, follow these steps:
      1. Complete a build at least through the kernel configuration task as follows:
           $ bitbake linux-yocto -c kernel_configme -f

      2. Run the menuconfig command:
           $ bitbake linux-yocto -c menuconfig

      The command failed with error message "No rule to make target".

       

      Could someone please share the config file with the UVC driver enabled. And also steps where to copy the config file and how to build the Yocto Linux kernel.

       

      Thanks,
      Vinay

        • 1. Re: UVC Driver Support
          AlexT_Intel

          I've built the uvcvideo module. The target for kernel is called linux-yocto, not linux-externalsrc. Or virtual/kernel, which is the same for this purpose.

           

          See the BSP build guide for details of customizing the kernel config: https://communities.intel.com/docs/DOC-23007 Intel® Edison BSP User Guide

           

          I'd rather not share my kernel config due to certain other issues I'm seeing + I'm using a different method of configuting the kernel, so it would be too much hassle for you to set it up.

           

          Feel free to ask further if the BSP build guide is not clear enough.

          1 of 1 people found this helpful
          • 2. Re: UVC Driver Support
            VinayNooji

            Thanks Alex.

             

            I am able to build Kernel. Could you please point me to the location to enable UVC in menuconfig.

             

            Thanks,

            Vinay

            • 3. Re: UVC Driver Support
              AlexT_Intel

              I can't recall where they are is in the menu per se, but the options you need are (these are uvcvideo itself + dependencies, you can use search to find them):

               

              CONFIG_VIDEOBUF2_CORE=m

              CONFIG_VIDEOBUF2_MEMOPS=m

              CONFIG_VIDEOBUF2_VMALLOC=m

              CONFIG_MEDIA_USB_SUPPORT=y

              CONFIG_USB_VIDEO_CLASS=m

              CONFIG_USB_VIDEO_CLASS_INPUT_EDEV=y

              • 4. Re: UVC Driver Support
                VinayNooji

                Even after updating the menuconfig the kernel does not contain UVC driver.

                 

                As per the document, BSP User Guide, the generated .config file should to be copied to
                <work_dir>/linux-kernel/arch/x86/configs/i386_edison_defconfig

                 

                In my build directory I do not have directory “linux-kernel”.

                 

                Do I need to copy the updated .config file to any specific location?
                Am I missing any step here.

                • 5. Re: UVC Driver Support
                  AlexT_Intel

                  I'll check it out in the evening today and get back to you.

                  • 6. Re: UVC Driver Support
                    AlexT_Intel

                    UPDATE11 Nov 2014: The below is no longer applicable, BSP Build Guide was updated since then per my feedback and the command there is correct.

                     

                    Okay, that's a bug in the command example. The text above it outlines the correct way to do it, but the command example is wrong. The correct path to copy to is "edison-src/device-software/metaedison/recipes-kernel/linux/files/defconfig" - this is a recipe with the kernel config used by the bitbake build process.

                     

                    So instead of the "cp" mentioned in the BSP Build Guide, run this one (make a backup copy of the original defconfig file first just in case):

                    cp edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTO*/linux-edison-standard-build/.config edison-src/device-software/metaedison/recipes-kernel/linux/files/defconfig

                     

                    All other commands in the example are okay.

                    1 of 1 people found this helpful
                    • 7. Re: UVC Driver Support
                      gnote

                      Is it possible to provide an idiots step by step guide?

                       

                      thanks

                       

                      I have previously build kernels, but more than 10 years ago...

                       

                      I'd also very much like UVC driver to use with V4L2 on Edison.

                       

                      not clear to me why this was not included into the current binary....

                      • 8. Re: UVC Driver Support
                        intel_dan

                        I built a kernel with UVC drivers this afternoon(i have a logitech C720 webcam that is UVC compatible) . If the kernel/modules work (have not tested yet), I will do my best to post a 'guide' on what I did to make them work.

                        • 9. Re: UVC Driver Support
                          VinayNooji

                          Hi,

                           

                          I have compiled a document.

                           

                          1. Build the image as described in the Board Support Package document.
                          2. Open the menu config to add the UVC driver support in the driver.
                               build> bitbake linux-yocto –c menuconfig
                               The above command opens a config menu window. From the menuconfig window enable the following to enable UVC:
                                     Device Drivers
                                           Multimedia support
                                                 Media USB Adapters [*]
                                                       USB Video Class [M]
                                                             UVC input events device support [*]

                          3. Ensure the following configs are enabled:
                               CONFIG_VIDEOBUF2_CORE=m
                               CONFIG_VIDEOBUF2_MEMOPS=m
                               CONFIG_VIDEOBUF2_VMALLOC=m
                               CONFIG_MEDIA_USB_SUPPORT=y
                               CONFIG_USB_VIDEO_CLASS=m
                               CONFIG_USB_VIDEO_CLASS_INPUT_EDEV=y

                          4. Copy the modified .config file to the Edison build config location.
                               cp edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTO*/linux-edison-standard-build/.config edison-src/device-software/metaedison/recipes-kernel/linux/files/defconfig

                          5. Rebuild the Edison image
                               build> bitbake edison-image

                          6. Flash the new build to Edison. The built image should contain UVC driver support.

                          7. Switch the USB to host mode (switch SW1 towards USB or away from mini-USB).

                          8. Reboot the board.

                          9. Connect the camera to USB host. Camera will be registered as “video0”: /dev/video0.
                               If the UVC driver is added as modular then execute the following command to register camera:
                               $ modprobe uvcvideo


                          Let me know if you any further information.

                           

                          Thanks,

                          Vinay

                          • 10. Re: UVC Driver Support
                            intel_dan

                            Vinay, did you have to do anything special to get the postBuild.sh script to run? I am having trouble with that step of the BSP guide.

                            • 11. Re: UVC Driver Support
                              VinayNooji

                              Hi Dan,

                               

                              No, there was no change required. When postBuild.sh is executed it gives an error as vmLinuz was not found, this is due to error in postBuild.sh script. Edison image built is of type bzImage and not vmLinuz. So please ignore the postBuild.sh script error and flash the image it should work.

                               

                              If you are getting some other error please post what error are you seeing.

                               

                              Thanks,

                              Vinay

                              • 12. Re: UVC Driver Support
                                maeda

                                Hi Vinay, I'm new comer.

                                I already succeed adding alsa to kernel. It works.

                                But I cannot add uvc.

                                At menuconfig, nothing in "Medai USB Adapters[*]".

                                           Device Drivers
                                                 Multimedia support
                                                       Media USB Adapters [*]
                                                             USB Video Class [M] <-- not here? (nothing in Media USB Adapters)

                                 

                                I think uvc is not contained in edison-src-rel1-maint-rel1-ww42-14.tgz.

                                Or missing some process?

                                 

                                • 13. Re: UVC Driver Support
                                  AlexT_Intel

                                  Yes, I think you're messing something here because it must be there, i see it just fine on WW42. Make sure you mark the "Media USB Adapters" option as enabled (press "Y" when the option is highlighted) before hitting Enter to get into the submenu, that might be the reason.

                                   

                                  If the above doesn't work, please make a screenshot and paste here, let's see what's going on there.

                                  • 14. Re: UVC Driver Support
                                    maeda

                                    Alex, Thank you.

                                    UVC appeared on  menuconfig.

                                    It seems very basic thing, sorry.

                                    1 2 Previous Next