Skip to content

Instantly share code, notes, and snippets.

@petrstepanov
Created September 28, 2020 04:22
Show Gist options
  • Save petrstepanov/73e1eeaeca8b56bf4bca2a367f18fe95 to your computer and use it in GitHub Desktop.
Save petrstepanov/73e1eeaeca8b56bf4bca2a367f18fe95 to your computer and use it in GitHub Desktop.
Linux Install FaceTimeHD Camera
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
cd $temp_dir
git clone https://github.com/patjak/facetimehd-firmware.git
git clone https://github.com/patjak/bcwc_pcie.git
cd $temp_dir/facetimehd-firmware
pwd
make
make install
cd $temp_dir/bcwc_pcie
pwd
make
make install
rm -rf $temp_dir
if [ ! -d "/etc/modules-load.d" ]; then
mkdir -p "/etc/modules-load.d"
fi
cat > "/etc/modules-load.d/facetimehd.conf" << EOL
videobuf2-core
videobuf2_v4l2
videobuf2-dma-sg
facetimehd
EOL
# Workaround for depmod being skipped above with error:
# Warning: modules_install: missing 'System.map' file. Skipping depmod
echo "Generate modules.dep and map files"
sudo depmod
echo "Adding kernel modules"
# sudo modprobe -r bdc_pci
sudo modprobe facetimehd
echo "Install complete"
@ca4ti
Copy link

ca4ti commented Nov 23, 2024

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.10
Release: 24.10
Codename: oracular

apt-get install pahole

ln -sf /boot/System.map-$(uname -r) /usr/src/linux-headers-$(uname -r)/System.map

ln -sf /usr/lib/modules/$(uname -r)/vmlinux.xz /boot/

install this version : https://gist.github.com/petrstepanov/73e1eeaeca8b56bf4bca2a367f18fe95

@ca4ti
Copy link

ca4ti commented Dec 19, 2024

git clone https://github.com/patjak/bcwc_pcie.git
cd bcwc_pcie

mkdir /usr/src/facetimehd-0.1
cp -Rf ./* /usr/src/facetimehd-0.1
dkms add -m facetimehd -v 0.1
dkms build -m facetimehd -v 0.1
dkms install -m facetimehd -v 0.1 --force
modprobe facetimehd

@petrstepanov
Copy link
Author

Thank you, starred your repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment