patjak / facetimehd

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

Unable to build DKMS package on Xanmod 6 #276

Closed Joomsy closed 1 year ago

Joomsy commented 1 year ago

Seems dma_mask is still causing problems. Looks like the code isn't recognizing that this is a kernel above 5.18, as it's trying to use pci_set_consistent_dma_mask. Below is my DKMS build log. It should also be noted that normal installation works fine, I'm just not able to build a DKMS package.

DKMS make.log for facetimehd-0.1 for kernel 6.0.8-x64v1-xanmod1 (x86_64)
Fri Nov 11 12:32:53 PM CST 2022
make: Entering directory '/usr/src/linux-headers-6.0.8-x64v1-xanmod1'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-12 (Debian 12.2.0-9) 12.2.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_ddr.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_hw.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_drv.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_ringbuf.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_isp.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_v4l2.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_buffer.o
  CC [M]  /var/lib/dkms/facetimehd/0.1/build/fthd_debugfs.o
/var/lib/dkms/facetimehd/0.1/build/fthd_drv.c: In function ‘fthd_pci_init’:
/var/lib/dkms/facetimehd/0.1/build/fthd_drv.c:409:9: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Werror=implicit-function-declaration]
  409 |         pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(dev_priv->dma_mask));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:249: /var/lib/dkms/facetimehd/0.1/build/fthd_drv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1985: /var/lib/dkms/facetimehd/0.1/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.0.8-x64v1-xanmod1'
Joomsy commented 1 year ago

I fixed this, somehow. I just updated dkms.conf to use the new version number (PR #270), and moved to a different build area. This can be disregarded.