Skip to content

Instantly share code, notes, and snippets.

@glycerine102
Forked from aijanai/enableWebcam.sh
Created December 29, 2020 20:00
Show Gist options
  • Save glycerine102/9a3803b995efb47c7687a38dbcd2ed84 to your computer and use it in GitHub Desktop.
Save glycerine102/9a3803b995efb47c7687a38dbcd2ed84 to your computer and use it in GitHub Desktop.
Enables Macbook Pro Retina's FaceTimeHD on Ubuntu/Debian (thanks to patjak)
#!/bin/bash
DRIVER_DIR="bcwc_pcie"
if [ ! -d "$DRIVER_DIR" ]; then
echo "Dir not present. Well, let's bootstrap then"
echo "Cloning code"
git clone https://github.com/patjak/bcwc_pcie.git
fi
echo "Installing utils"
sudo apt-get install -y cpio make curl xz-utils git kmod libssl-dev checkinstall
# enter dir
pushd bcwc_pcie
# extract firmware
pushd firmware
echo "Extracting firmware"
sudo make clean
sudo make -j4
sudo make install
popd
echo "Building driver"
sudo make clean
sudo make -j4
sudo make install
echo "Linking driver"
sudo depmod
echo "Unloading deprecated driver"
sudo modprobe -r bdc_pci
echo "Unloading old driver version"
sudo modprobe -r facetimehd
echo "Loading driver"
sudo modprobe facetimehd
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment