mikelindner.com

powering the Internet since 1995

| Photography | Computing | Cooking |

Facetime HD Camera with Ubuntu 19.04

September 30th, 2019

Put the following script into /etc/kernel/postinst.d/99-install-facetime-camera.sh which will update each time the kernel gets updated, then run once “/etc/kernel/postinst.d/99-install-facetime-camera.sh $(uname -r)” to start it.  I needed to reboot before it worked.
#!/bin/bash
set -e

export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
export KERNELRELEASE=${1}

echo "Installing FacetimeHD camera for $KERNELRELEASE"
cd /tmp
git clone https://github.com/patjak/bcwc_pcie.git
cd bcwc_pcie/firmware
make
make install
cd ..
make
make install
rm -rf /tmp/bcwc_pcie

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

echo "Install complete."


 

References:
https://github.com/patjak/bcwc_pcie
https://gist.github.com/Stono/990ea9f0b3c41606c292f00382d421bf