patjak / facetimehd

Reverse engineered Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam
GNU General Public License v2.0
1.36k stars 160 forks source link

errors on build In redhat 7.3, 7.4(beta) #120

Open rovocuj opened 7 years ago

rovocuj commented 7 years ago
make -C /lib/modules/3.10.0-663.el7.x86_64/build M=/tmp/bcwc_pcie-master modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-663.el7.x86_64'
  CC [M]  /tmp/bcwc_pcie-master/fthd_ddr.o
  CC [M]  /tmp/bcwc_pcie-master/fthd_hw.o
  CC [M]  /tmp/bcwc_pcie-master/fthd_drv.o
  CC [M]  /tmp/bcwc_pcie-master/fthd_ringbuf.o
  CC [M]  /tmp/bcwc_pcie-master/fthd_isp.o
/tmp/bcwc_pcie-master/fthd_isp.c: In function ‘fthd_isp_cmd_channel_camera_config’:
/tmp/bcwc_pcie-master/fthd_isp.c:662:2: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return ret;
  ^
  CC [M]  /tmp/bcwc_pcie-master/fthd_v4l2.o
/tmp/bcwc_pcie-master/fthd_v4l2.c: In function ‘fthd_buffer_prepare’:
/tmp/bcwc_pcie-master/fthd_v4l2.c:207:13: warning: assignment from incompatible pointer type [enabled by default]
     sgtable = vb2_dma_sg_plane_desc(vb, i);
             ^
/tmp/bcwc_pcie-master/fthd_v4l2.c: At top level:
/tmp/bcwc_pcie-master/fthd_v4l2.c:306:2: warning: initialization from incompatible pointer type [enabled by default]
  .queue_setup            = fthd_buffer_queue_setup,
  ^
/tmp/bcwc_pcie-master/fthd_v4l2.c:306:2: warning: (near initialization for ‘vb2_queue_ops.queue_setup’) [enabled by default]
/tmp/bcwc_pcie-master/fthd_v4l2.c:310:2: warning: initialization from incompatible pointer type [enabled by default]
  .stop_streaming         = fthd_stop_streaming,
  ^
/tmp/bcwc_pcie-master/fthd_v4l2.c:310:2: warning: (near initialization for ‘vb2_queue_ops.stop_streaming’) [enabled by default]
/tmp/bcwc_pcie-master/fthd_v4l2.c: In function ‘fthd_v4l2_register’:
/tmp/bcwc_pcie-master/fthd_v4l2.c:697:3: error: ‘struct vb2_queue’ has no member named ‘timestamp_flags’
  q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
   ^
/tmp/bcwc_pcie-master/fthd_v4l2.c:698:3: error: ‘struct vb2_queue’ has no member named ‘min_buffers_needed’
  q->min_buffers_needed = 1;
   ^
/tmp/bcwc_pcie-master/fthd_v4l2.c:723:2: error: implicit declaration of function ‘vb2_dma_sg_init_ctx’ [-Werror=implicit-function-declaration]
  dev_priv->alloc_ctx = vb2_dma_sg_init_ctx(&dev_priv->pdev->dev);
  ^
/tmp/bcwc_pcie-master/fthd_v4l2.c:723:22: warning: assignment makes pointer from integer without a cast [enabled by default]
  dev_priv->alloc_ctx = vb2_dma_sg_init_ctx(&dev_priv->pdev->dev);
                      ^
/tmp/bcwc_pcie-master/fthd_v4l2.c: In function ‘fthd_v4l2_unregister’:
/tmp/bcwc_pcie-master/fthd_v4l2.c:760:2: error: implicit declaration of function ‘vb2_dma_sg_cleanup_ctx’ [-Werror=implicit-function-declaration]
  vb2_dma_sg_cleanup_ctx(dev_priv->alloc_ctx);
  ^
cc1: some warnings being treated as errors
make[2]: *** [/tmp/bcwc_pcie-master/fthd_v4l2.o] Error 1
make[1]: *** [_module_/tmp/bcwc_pcie-master] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-663.el7.x86_64'
make: *** [all] Error 2

How i can fix it:

/tmp/bcwc_pcie-master/fthd_v4l2.c:697:3: error: ‘struct vb2_queue’ has no member named ‘timestamp_flags’
  q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
   ^

/tmp/bcwc_pcie-master/fthd_v4l2.c:698:3: error: ‘struct vb2_queue’ has no member named ‘min_buffers_needed’
  q->min_buffers_needed = 1;
   ^
rovocuj commented 7 years ago

after comment all error strings

[ 2001.760034] facetimehd: loading out-of-tree module taints kernel.
[ 2001.760139] facetimehd: module verification failed: signature and/or required key missing - tainting kernel
[ 2001.760215] facetimehd: Unknown symbol vb2_dma_sg_memops (err 0)