SSD_Linux UVC HOST
(Usb Camera免驱支持)


1. Kernel menuconfig配置

在kernel下执行: make menuconfig,然后参照如下选择

Device Drivers  -->  
   <*>USB support  -->
       <*> Support for Host-side USB —>
    <*> USB announce new devices
    <M> EHCI HCD (USB 2.0) support
    <M> Multimedia support  -->  
            [*]   Cameras/video grabbers support
            [*]   Media Controller API
            [*]   V4L2 sub-device userspace API
            [*]   Enable advanced debug functionality on V4L2 drivers                             
            [*]   Enable old-style fixed minor ranges on drivers/video devices   
            [*]   Media USB Adapters  --->
                    <M>   USB Video Class (UVC)
                    [*]     UVC input events device support

配置后,运行 make -j32,即可在kernel/modules生成相关ko。


2. 加载ko

生成的驱动位于kernel/modules目录下,ko之间有相互依赖关系,其加载顺序如下:

project/kbuild/4.9.84/i2m/configs/nvr/011A/glibc/8.2.1/spinand/modules

cd /project/kbuild/4.9.84

./release.sh -k kernel_path -b 011A -p nvr -f nor -c i2m -l glibc -v 8.2.1        //nor glibc
./release.sh -k kernel_path -b 011A -p nvr -f spinand -c i2m -l glibc -v 8.2.1     //spinand glibc
insmod ehci-hcd.ko

insmod media.ko
insmod videodev.ko

insmod videobuf2-core.ko
insmod videobuf2-v4l2.ko
insmod videobuf2-memops.ko
insmod videobuf2-vmalloc.ko
#insmod videobuf2-dma-contig.ko
insmod uvcvideo.ko

insmod v4l2-common.ko
insmod v4l2-dv-timings.ko

#inmod sh_veu.ko

3. 如何将上述ko拷贝到release目录

以SSD20X为例,将ko拷贝到目录:project/kbuild/4.9.84/i2m/configs/nvr/011A/glibc/8.2.1/spinand/modules

cd /project/kbuild/4.9.84
./release.sh -k kernel_path -b 011A -p nvr -f nor -c i2m -l glibc -v 8.2.1        //nor glibc
./release.sh -k kernel_path -b 011A -p nvr -f spinand -c i2m -l glibc -v 8.2.1     //spinand glibc

备注:SSD20X当Host & SSC222当device配合可用